sprof 0.2.12 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(W,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("quasar"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","quasar","vuedraggable","vue-router"],t):(W=typeof globalThis<"u"?globalThis:W||self,t(W.sprof={},W.Vue,W.Quasar,W.draggable,W.VueRouter))})(this,function(W,t,V,ho,Fl){"use strict";var bw=Object.defineProperty;var Sw=(W,t,V)=>t in W?bw(W,t,{enumerable:!0,configurable:!0,writable:!0,value:V}):W[t]=V;var l=(W,t,V)=>Sw(W,typeof t!="symbol"?t+"":t,V);var Ot,_t,tt,Ln,oe,ot,Xt,kr;var wn=typeof document<"u"?document.currentScript:null,ve=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(ve||{}),me=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(me||{});class Zt{constructor(e,i,o,r){l(this,"text","Сохранить");l(this,"type",me.Success);l(this,"condition",!0);l(this,"action");l(this,"id","button");l(this,"disabled",!1);this.text=e,this.type=o,this.action=i,r!==void 0&&(this.condition=r)}static Primary(e,i,o){return new Zt(e,i,me.Primary,o)}static Success(e,i,o){return new Zt(e,i,me.Success,o)}static Warning(e,i,o){return new Zt(e,i,me.Warning,o)}static Error(e,i,o){return new Zt(e,i,me.Error,o)}}class gi extends Zt{constructor(){super();l(this,"id","auth-button");l(this,"chunk",ve.Login);l(this,"text","");l(this,"isSubmit",!1);l(this,"isLink",!0)}GetChunk(){return this.chunk}}let mo=class extends gi{constructor(){super(...arguments);l(this,"id","auth-button-login");l(this,"text","Войти");l(this,"isSubmit",!1);l(this,"chunk",ve.Login)}};class vr extends gi{constructor(){super(...arguments);l(this,"id","auth-button-refresh");l(this,"text","Обновить пароль");l(this,"isSubmit",!1);l(this,"chunk",ve.Refresh)}}class po extends gi{constructor(){super(...arguments);l(this,"id","auth-button-register");l(this,"text","Зарегистрироваться");l(this,"isSubmit",!1);l(this,"chunk",ve.Register)}}class yi extends gi{constructor(){super(...arguments);l(this,"id","auth-button-restore");l(this,"text","Забыли пароль?");l(this,"isSubmit",!1);l(this,"chunk",ve.Restore)}}class Ar{constructor(){l(this,"value","");l(this,"label","");l(this,"placeholder","");l(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var Pt=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(Pt||{});class wi extends Ar{constructor(){super(...arguments);l(this,"method");l(this,"id","field-auth");l(this,"name","")}get IsPassword(){return this.id===Pt.Password||this.id===Pt.PasswordRepeat}}var bn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(bn||{});const Ol=/\S+@\S+\.\S+/;class zr{constructor(){l(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),Ol.test(e)||this.errors.push("Некорректный email"),this.errors}}let _l=class extends wi{constructor(){super(...arguments);l(this,"id",Pt.Email);l(this,"label","Email");l(this,"name","email");l(this,"placeholder","Введите email");l(this,"validator",new zr);l(this,"method",bn.Email)}};const bi=new _l;class Ll{constructor(){l(this,"errors",[]);l(this,"length",3)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let Hl=class extends wi{constructor(){super(...arguments);l(this,"label","Пароль");l(this,"validator",new Ll);l(this,"name","password");l(this,"placeholder","Введите пароль");l(this,"id",Pt.Password)}};const Si=new Hl;let Ul=class extends wi{constructor(){super(...arguments);l(this,"label","Повторите пароль");l(this,"id",Pt.PasswordRepeat)}};const Dr=new Ul,Fr={allowRestore:!1,[ve.Login]:{methods:[bn.Email],title:"Вход в систему",action:"login",buttons:[new mo,new po,new yi],fields:[bi,Si],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[ve.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new po,new mo,new yi],fields:[bi,Si,Dr],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[ve.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new yi],fields:[bi]},[ve.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new vr],fields:[Si]}};class ql{constructor(){l(this,"block",!1);l(this,"settings",Fr);l(this,"chunk",ve.Login);l(this,"selectedMethod",bn.Email)}async Block(e){this.block=!0,await e(),this.block=!1}get IsBlock(){return this.block}GetValues(){const e=this.GetFields(),i=new Map;return e.forEach(o=>{o.value&&i.set(o.name,o.value)}),Object.fromEntries(i)}Validate(){if(this.IsRegister){const e=this.GetField(Pt.Password),i=this.GetField(Pt.PasswordRepeat);if((e==null?void 0:e.value)!==(i==null?void 0:i.value))return["Пароли не совпадают"]}return this.GetFields().map(e=>e.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Chunk(){return this.chunk}get Settings(){return this.settings}GetCurSet(){return this.settings[this.chunk]}get IsLogin(){return this.chunk===ve.Login}get IsRegister(){return this.chunk===ve.Register}get IsRestore(){return this.chunk===ve.Restore}get IsRefresh(){return this.chunk===ve.Refresh}SetChunk(e){this.chunk=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(i=>{i.isSubmit=!1}),e[0].isSubmit=!0,e}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(e=>e.Reset())}Reset(){this.SetChunk(ve.Login),this.ResetFields()}GetField(e){return this.GetFields().find(i=>i.id===e)}}class jl{constructor(){l(this,"visible",!1);l(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class Sn{constructor(){l(this,"type",me.Success);l(this,"text","");l(this,"title","")}static ToQuasarColor(e){switch(e){case me.Success:return"positive";case me.Warning:return"warning";case me.Error:return"negative";case me.Info:return"info";default:return"primary"}}static ContainsHtml(e){return/<[a-z][\s\S]*>/i.test(e)}showMessage(e,i){this.type=i,typeof e=="string"?(this.text=e,this.title=""):(this.text=e.text,this.title=e.title??"")}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}GetQuasarColor(){return Sn.ToQuasarColor(this.type)}Info(e){this.showMessage(e,me.Info)}Success(e){this.showMessage(e,me.Success)}Error(e){this.showMessage(e,me.Error)}Warning(e){this.showMessage(e,me.Warning)}FormMessage(e){let i="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const o of Object.keys(e))e[o][0]&&e[o][0].message&&(i+=`<li>${e[o][0].message}</li>`);return i+="</ul>",i}}class go{static Get(e,i,o="-"){return!e||!i?"":`${e}${o}${i}`}static In(e,i,o){return e>=i&&e<=o}static Intersects(e,i,o,r){return e===o||i===r||e>o&&e<r||i>o&&i<r||i>r&&e<o}}const Or=1e3,_r=60*Or,yo=60*_r;var qn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(qn||{});const Ci={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class ie{static S(e){return Or*e}static M(e){return _r*e}static H(e){return yo*e}static D(e){return yo*e}static W(e){return yo*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const i=ie.SplitHM(e);return i.length>1?ie.HtoM(i[0])+i[1]:ie.HtoM(i[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const i=e.split(":");return[Number(i[0]),Number(i[1])]}static HmsToHm(e){const i=ie.SplitHM(e);return ie.ConcatHM(i[0],i[1])}static AddMtoHM(e,i){const o=new Date,r=ie.SplitHM(e);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),d=s.getMinutes();return ie.ConcatHM(a,d)}static ConcatHM(e,i){return`${e}:${ie.NormalizeTime(i)}`}static DiffM(e,i){return ie.Gt(i,e)?ie.HMtoM(i)-ie.HMtoM(e):ie.HMtoM(e)-ie.HMtoM(i)}static GetPeriod(e,i){return go.Get(e,i)}static Gt(e,i){return ie.HMtoM(e)>ie.HMtoM(i)}static GtOrEq(e,i){return ie.Gt(e,i)||ie.Eq(e,i)}static Eq(e,i){return ie.HMtoM(e)===ie.HMtoM(i)}static PeriodInPeriod(e,i,o,r){return ie.HMtoM(e)>=ie.HMtoM(o)&&ie.HMtoM(i)<=ie.HMtoM(r)}static PeriodsIntersects(e,i,o,r){return go.Intersects(ie.HMtoM(e),ie.HMtoM(i),ie.HMtoM(o),ie.HMtoM(r))}}const Wl="top";class Gl extends Sn{constructor(){super(...arguments);l(this,"duration",ie.S(3))}showMessage(i,o){if(super.showMessage(i,o),typeof V.Notify.create!="function"){console.warn("[sprof] Quasar Notify plugin is not installed. Add `app.use(Quasar, { plugins: { Notify } })` (imported from 'quasar') to your app.");return}const r=typeof i=="string"?{}:i;V.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:Sn.ContainsHtml(this.text),position:Wl})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",me.Warning)}Save(){this.showMessage("Изменения успешно сохранены",me.Success)}}const Ct=new Gl;class kt{static Get(e){const i=localStorage.getItem(e);if(i)return JSON.parse(i)}static Set(e,i){i&&localStorage.setItem(e,JSON.stringify(i))}static Remove(e){localStorage.removeItem(e)}}var lt=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(lt||{});class Ql{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return kt.Get(lt.AccessToken)}getRefreshToken(){return kt.Get(lt.RefreshToken)}setAccessToken(e){kt.Set(lt.AccessToken,e)}setRefreshToken(e){kt.Set(lt.RefreshToken,e)}reset(){kt.Remove(lt.AccessToken),kt.Remove(lt.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class Yl{constructor(){l(this,"user");l(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),kt.Set(lt.User,this.user))}reset(){this.user=void 0,kt.Remove(lt.User)}actualize(){const e=kt.Get(lt.User);e&&this.set(e)}}class Xl{constructor(){l(this,"isAuth",!1);l(this,"user",new Yl);l(this,"tokens",new Ql);l(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(e){this.user.setUserConstructor(e)}SetUser(e){this.user.set(e)}SetState(e){this.SetUser(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){Ct.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.user.actualize(),this.tokens.actualize(),this.tokens.getAccessToken()){this.isAuth=!0;return}this.Logout()}}let Zl=(Ot=class{constructor(){l(this,"form",t.reactive(new ql));l(this,"status",t.reactive(new Xl));l(this,"modal",t.reactive(new jl));if(Ot.instance)return Ot.instance;Ot.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},l(Ot,"instance"),Ot);const Ae=new Zl;var Lr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
1
+ (function(W,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("quasar"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","quasar","vuedraggable","vue-router"],t):(W=typeof globalThis<"u"?globalThis:W||self,t(W.sprof={},W.Vue,W.Quasar,W.draggable,W.VueRouter))})(this,function(W,t,V,mo,Fl){"use strict";var bw=Object.defineProperty;var Sw=(W,t,V)=>t in W?bw(W,t,{enumerable:!0,configurable:!0,writable:!0,value:V}):W[t]=V;var l=(W,t,V)=>Sw(W,typeof t!="symbol"?t+"":t,V);var Dt,Ft,tt,Ln,oe,ot,Yt,xr;var yn=typeof document<"u"?document.currentScript:null,ve=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(ve||{}),me=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(me||{});class Xt{constructor(e,i,o,r){l(this,"text","Сохранить");l(this,"type",me.Success);l(this,"condition",!0);l(this,"action");l(this,"id","button");l(this,"disabled",!1);this.text=e,this.type=o,this.action=i,r!==void 0&&(this.condition=r)}static Primary(e,i,o){return new Xt(e,i,me.Primary,o)}static Success(e,i,o){return new Xt(e,i,me.Success,o)}static Warning(e,i,o){return new Xt(e,i,me.Warning,o)}static Error(e,i,o){return new Xt(e,i,me.Error,o)}}class gi extends Xt{constructor(){super();l(this,"id","auth-button");l(this,"chunk",ve.Login);l(this,"text","");l(this,"isSubmit",!1);l(this,"isLink",!0)}GetChunk(){return this.chunk}}let po=class extends gi{constructor(){super(...arguments);l(this,"id","auth-button-login");l(this,"text","Войти");l(this,"isSubmit",!1);l(this,"chunk",ve.Login)}};class Ar extends gi{constructor(){super(...arguments);l(this,"id","auth-button-refresh");l(this,"text","Обновить пароль");l(this,"isSubmit",!1);l(this,"chunk",ve.Refresh)}}class go extends gi{constructor(){super(...arguments);l(this,"id","auth-button-register");l(this,"text","Зарегистрироваться");l(this,"isSubmit",!1);l(this,"chunk",ve.Register)}}class yi extends gi{constructor(){super(...arguments);l(this,"id","auth-button-restore");l(this,"text","Забыли пароль?");l(this,"isSubmit",!1);l(this,"chunk",ve.Restore)}}class zr{constructor(){l(this,"value","");l(this,"label","");l(this,"placeholder","");l(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var Tt=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(Tt||{});class wi extends zr{constructor(){super(...arguments);l(this,"method");l(this,"id","field-auth");l(this,"name","")}get IsPassword(){return this.id===Tt.Password||this.id===Tt.PasswordRepeat}}var wn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(wn||{});const Ol=/\S+@\S+\.\S+/;class Dr{constructor(){l(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),Ol.test(e)||this.errors.push("Некорректный email"),this.errors}}let _l=class extends wi{constructor(){super(...arguments);l(this,"id",Tt.Email);l(this,"label","Email");l(this,"name","email");l(this,"placeholder","Введите email");l(this,"validator",new Dr);l(this,"method",wn.Email)}};const bi=new _l;class Ll{constructor(){l(this,"errors",[]);l(this,"length",3)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let Hl=class extends wi{constructor(){super(...arguments);l(this,"label","Пароль");l(this,"validator",new Ll);l(this,"name","password");l(this,"placeholder","Введите пароль");l(this,"id",Tt.Password)}};const Si=new Hl;let Ul=class extends wi{constructor(){super(...arguments);l(this,"label","Повторите пароль");l(this,"id",Tt.PasswordRepeat)}};const Fr=new Ul,Or={allowRestore:!1,[ve.Login]:{methods:[wn.Email],title:"Вход в систему",action:"login",buttons:[new po,new go,new yi],fields:[bi,Si],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[ve.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new go,new po,new yi],fields:[bi,Si,Fr],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[ve.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new yi],fields:[bi]},[ve.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Ar],fields:[Si]}};class ql{constructor(){l(this,"block",!1);l(this,"settings",Or);l(this,"chunk",ve.Login);l(this,"selectedMethod",wn.Email)}async Block(e){this.block=!0,await e(),this.block=!1}get IsBlock(){return this.block}GetValues(){const e=this.GetFields(),i=new Map;return e.forEach(o=>{o.value&&i.set(o.name,o.value)}),Object.fromEntries(i)}Validate(){if(this.IsRegister){const e=this.GetField(Tt.Password),i=this.GetField(Tt.PasswordRepeat);if((e==null?void 0:e.value)!==(i==null?void 0:i.value))return["Пароли не совпадают"]}return this.GetFields().map(e=>e.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Chunk(){return this.chunk}get Settings(){return this.settings}GetCurSet(){return this.settings[this.chunk]}get IsLogin(){return this.chunk===ve.Login}get IsRegister(){return this.chunk===ve.Register}get IsRestore(){return this.chunk===ve.Restore}get IsRefresh(){return this.chunk===ve.Refresh}SetChunk(e){this.chunk=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(i=>{i.isSubmit=!1}),e[0].isSubmit=!0,e}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(e=>e.Reset())}Reset(){this.SetChunk(ve.Login),this.ResetFields()}GetField(e){return this.GetFields().find(i=>i.id===e)}}class jl{constructor(){l(this,"visible",!1);l(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class bn{constructor(){l(this,"type",me.Success);l(this,"text","");l(this,"title","")}static ToQuasarColor(e){switch(e){case me.Success:return"positive";case me.Warning:return"warning";case me.Error:return"negative";case me.Info:return"info";default:return"primary"}}static ContainsHtml(e){return/<[a-z][\s\S]*>/i.test(e)}showMessage(e,i){this.type=i,typeof e=="string"?(this.text=e,this.title=""):(this.text=e.text,this.title=e.title??"")}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}GetQuasarColor(){return bn.ToQuasarColor(this.type)}Info(e){this.showMessage(e,me.Info)}Success(e){this.showMessage(e,me.Success)}Error(e){this.showMessage(e,me.Error)}Warning(e){this.showMessage(e,me.Warning)}FormMessage(e){let i="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const o of Object.keys(e))e[o][0]&&e[o][0].message&&(i+=`<li>${e[o][0].message}</li>`);return i+="</ul>",i}}class yo{static Get(e,i,o="-"){return!e||!i?"":`${e}${o}${i}`}static In(e,i,o){return e>=i&&e<=o}static Intersects(e,i,o,r){return e===o||i===r||e>o&&e<r||i>o&&i<r||i>r&&e<o}}const _r=1e3,Lr=60*_r,wo=60*Lr;var qn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(qn||{});const Ci={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class ie{static S(e){return _r*e}static M(e){return Lr*e}static H(e){return wo*e}static D(e){return wo*e}static W(e){return wo*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const i=ie.SplitHM(e);return i.length>1?ie.HtoM(i[0])+i[1]:ie.HtoM(i[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const i=e.split(":");return[Number(i[0]),Number(i[1])]}static HmsToHm(e){const i=ie.SplitHM(e);return ie.ConcatHM(i[0],i[1])}static AddMtoHM(e,i){const o=new Date,r=ie.SplitHM(e);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),d=s.getMinutes();return ie.ConcatHM(a,d)}static ConcatHM(e,i){return`${e}:${ie.NormalizeTime(i)}`}static DiffM(e,i){return ie.Gt(i,e)?ie.HMtoM(i)-ie.HMtoM(e):ie.HMtoM(e)-ie.HMtoM(i)}static GetPeriod(e,i){return yo.Get(e,i)}static Gt(e,i){return ie.HMtoM(e)>ie.HMtoM(i)}static GtOrEq(e,i){return ie.Gt(e,i)||ie.Eq(e,i)}static Eq(e,i){return ie.HMtoM(e)===ie.HMtoM(i)}static PeriodInPeriod(e,i,o,r){return ie.HMtoM(e)>=ie.HMtoM(o)&&ie.HMtoM(i)<=ie.HMtoM(r)}static PeriodsIntersects(e,i,o,r){return yo.Intersects(ie.HMtoM(e),ie.HMtoM(i),ie.HMtoM(o),ie.HMtoM(r))}}const Wl="top";class Gl extends bn{constructor(){super(...arguments);l(this,"duration",ie.S(3))}showMessage(i,o){if(super.showMessage(i,o),typeof V.Notify.create!="function"){console.warn("[sprof] Quasar Notify plugin is not installed. Add `app.use(Quasar, { plugins: { Notify } })` (imported from 'quasar') to your app.");return}const r=typeof i=="string"?{}:i;V.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:bn.ContainsHtml(this.text),position:Wl})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",me.Warning)}Save(){this.showMessage("Изменения успешно сохранены",me.Success)}}const Sn=new Gl;class Ct{static Get(e){const i=localStorage.getItem(e);if(i)return JSON.parse(i)}static Set(e,i){i&&localStorage.setItem(e,JSON.stringify(i))}static Remove(e){localStorage.removeItem(e)}}var lt=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(lt||{});class Ql{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return Ct.Get(lt.AccessToken)}getRefreshToken(){return Ct.Get(lt.RefreshToken)}setAccessToken(e){Ct.Set(lt.AccessToken,e)}setRefreshToken(e){Ct.Set(lt.RefreshToken,e)}reset(){Ct.Remove(lt.AccessToken),Ct.Remove(lt.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class Yl{constructor(){l(this,"user");l(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),Ct.Set(lt.User,this.user))}reset(){this.user=void 0,Ct.Remove(lt.User)}actualize(){const e=Ct.Get(lt.User);e&&this.set(e)}}class Xl{constructor(){l(this,"isAuth",!1);l(this,"user",new Yl);l(this,"tokens",new Ql);l(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(e){this.user.setUserConstructor(e)}SetUser(e){this.user.set(e)}SetState(e){this.SetUser(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){Sn.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.user.actualize(),this.tokens.actualize(),this.tokens.getAccessToken()){this.isAuth=!0;return}this.Logout()}}let Zl=(Dt=class{constructor(){l(this,"form",t.reactive(new ql));l(this,"status",t.reactive(new Xl));l(this,"modal",t.reactive(new jl));if(Dt.instance)return Dt.instance;Dt.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},l(Dt,"instance"),Dt);const Ae=new Zl;var Hr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
2
2
  Copyright (C) Microsoft. All rights reserved.
3
3
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
4
  this file except in compliance with the License. You may obtain a copy of the
@@ -11,23 +11,23 @@
11
11
 
12
12
  See the Apache Version 2.0 License for specific language governing permissions
13
13
  and limitations under the License.
14
- ***************************************************************************** */var Hr;(function(n){(function(e){var i=typeof globalThis=="object"?globalThis:typeof Lr=="object"?Lr:typeof self=="object"?self:typeof this=="object"?this:d(),o=r(n);typeof i.Reflect<"u"&&(o=r(i.Reflect,o)),e(o,i),typeof i.Reflect>"u"&&(i.Reflect=n);function r(c,u){return function(f,h){Object.defineProperty(c,f,{configurable:!0,writable:!0,value:h}),u&&u(f,h)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function d(){return s()||a()}})(function(e,i){var o=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",d=typeof Object.create=="function",c={__proto__:[]}instanceof Array,u=!d&&!c,f={create:d?function(){return fi(Object.create(null))}:c?function(){return fi({__proto__:null})}:function(){return fi({})},has:u?function(S,E){return o.call(S,E)}:function(S,E){return E in S},get:u?function(S,E){return o.call(S,E)?S[E]:void 0}:function(S,E){return S[E]}},h=Object.getPrototypeOf(Function),m=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Un(),b=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Br(),C=typeof WeakMap=="function"?WeakMap:$r(),B=r?Symbol.for("@reflect-metadata:registry"):void 0,$=co(),x=xr($);function M(S,E,N,A){if(j(N)){if(!Ht(S))throw new TypeError;if(!mn(E))throw new TypeError;return ke(S,E)}else{if(!Ht(S))throw new TypeError;if(!ge(E))throw new TypeError;if(!ge(A)&&!j(A)&&!Le(A))throw new TypeError;return Le(A)&&(A=void 0),N=Xe(N),hn(S,E,N,A)}}e("decorate",M);function k(S,E){function N(A,Y){if(!ge(A))throw new TypeError;if(!j(Y)&&!be(Y))throw new TypeError;mt(S,E,A,Y)}return N}e("metadata",k);function P(S,E,N,A){if(!ge(N))throw new TypeError;return j(A)||(A=Xe(A)),mt(S,E,N,A)}e("defineMetadata",P);function D(S,E,N){if(!ge(E))throw new TypeError;return j(N)||(N=Xe(N)),Ye(S,E,N)}e("hasMetadata",D);function Z(S,E,N){if(!ge(E))throw new TypeError;return j(N)||(N=Xe(N)),It(S,E,N)}e("hasOwnMetadata",Z);function K(S,E,N){if(!ge(E))throw new TypeError;return j(N)||(N=Xe(N)),Vt(S,E,N)}e("getMetadata",K);function fe(S,E,N){if(!ge(E))throw new TypeError;return j(N)||(N=Xe(N)),Lt(S,E,N)}e("getOwnMetadata",fe);function ht(S,E){if(!ge(S))throw new TypeError;return j(E)||(E=Xe(E)),wt(S,E)}e("getMetadataKeys",ht);function Qe(S,E){if(!ge(S))throw new TypeError;return j(E)||(E=Xe(E)),nt(S,E)}e("getOwnMetadataKeys",Qe);function Pe(S,E,N){if(!ge(E))throw new TypeError;if(j(N)||(N=Xe(N)),!ge(E))throw new TypeError;j(N)||(N=Xe(N));var A=gn(E,N,!1);return j(A)?!1:A.OrdinaryDeleteMetadata(S,E,N)}e("deleteMetadata",Pe);function ke(S,E){for(var N=S.length-1;N>=0;--N){var A=S[N],Y=A(E);if(!j(Y)&&!Le(Y)){if(!mn(Y))throw new TypeError;E=Y}}return E}function hn(S,E,N,A){for(var Y=S.length-1;Y>=0;--Y){var Ee=S[Y],Be=Ee(E,N,A);if(!j(Be)&&!Le(Be)){if(!ge(Be))throw new TypeError;A=Be}}return A}function Ye(S,E,N){var A=It(S,E,N);if(A)return!0;var Y=bt(E);return Le(Y)?!1:Ye(S,Y,N)}function It(S,E,N){var A=gn(E,N,!1);return j(A)?!1:We(A.OrdinaryHasOwnMetadata(S,E,N))}function Vt(S,E,N){var A=It(S,E,N);if(A)return Lt(S,E,N);var Y=bt(E);if(!Le(Y))return Vt(S,Y,N)}function Lt(S,E,N){var A=gn(E,N,!1);if(!j(A))return A.OrdinaryGetOwnMetadata(S,E,N)}function mt(S,E,N,A){var Y=gn(N,A,!0);Y.OrdinaryDefineOwnMetadata(S,E,N,A)}function wt(S,E){var N=nt(S,E),A=bt(S);if(A===null)return N;var Y=wt(A,E);if(Y.length<=0)return N;if(N.length<=0)return Y;for(var Ee=new b,Be=[],ne=0,F=N;ne<F.length;ne++){var _=F[ne],L=Ee.has(_);L||(Ee.add(_),Be.push(_))}for(var U=0,te=Y;U<te.length;U++){var _=te[U],L=Ee.has(_);L||(Ee.add(_),Be.push(_))}return Be}function nt(S,E){var N=gn(S,E,!1);return N?N.OrdinaryOwnMetadataKeys(S,E):[]}function we(S){if(S===null)return 1;switch(typeof S){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return S===null?1:6;default:return 6}}function j(S){return S===void 0}function Le(S){return S===null}function Tt(S){return typeof S=="symbol"}function ge(S){return typeof S=="object"?S!==null:typeof S=="function"}function se(S,E){switch(we(S)){case 0:return S;case 1:return S;case 2:return S;case 3:return S;case 4:return S;case 5:return S}var N="string",A=ee(S,s);if(A!==void 0){var Y=A.call(S,N);if(ge(Y))throw new TypeError;return Y}return je(S)}function je(S,E){var N,A;{var Y=S.toString;if(Me(Y)){var A=Y.call(S);if(!ge(A))return A}var N=S.valueOf;if(Me(N)){var A=N.call(S);if(!ge(A))return A}}throw new TypeError}function We(S){return!!S}function Hn(S){return""+S}function Xe(S){var E=se(S);return Tt(E)?E:Hn(E)}function Ht(S){return Array.isArray?Array.isArray(S):S instanceof Object?S instanceof Array:Object.prototype.toString.call(S)==="[object Array]"}function Me(S){return typeof S=="function"}function mn(S){return typeof S=="function"}function be(S){switch(we(S)){case 3:return!0;case 4:return!0;default:return!1}}function Ze(S,E){return S===E||S!==S&&E!==E}function ee(S,E){var N=S[E];if(N!=null){if(!Me(N))throw new TypeError;return N}}function Ie(S){var E=ee(S,a);if(!Me(E))throw new TypeError;var N=E.call(S);if(!ge(N))throw new TypeError;return N}function rt(S){return S.value}function st(S){var E=S.next();return E.done?!1:E}function pn(S){var E=S.return;E&&E.call(S)}function bt(S){var E=Object.getPrototypeOf(S);if(typeof S!="function"||S===h||E!==h)return E;var N=S.prototype,A=N&&Object.getPrototypeOf(N);if(A==null||A===Object.prototype)return E;var Y=A.constructor;return typeof Y!="function"||Y===S?E:Y}function Rt(){var S;!j(B)&&typeof i.Reflect<"u"&&!(B in i.Reflect)&&typeof i.Reflect.defineMetadata=="function"&&(S=Er(i.Reflect));var E,N,A,Y=new C,Ee={registerProvider:Be,getProvider:F,setProvider:L};return Ee;function Be(U){if(!Object.isExtensible(Ee))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case S===U:break;case j(E):E=U;break;case E===U:break;case j(N):N=U;break;case N===U:break;default:A===void 0&&(A=new b),A.add(U);break}}function ne(U,te){if(!j(E)){if(E.isProviderFor(U,te))return E;if(!j(N)){if(N.isProviderFor(U,te))return E;if(!j(A))for(var he=Ie(A);;){var ye=st(he);if(!ye)return;var at=rt(ye);if(at.isProviderFor(U,te))return pn(he),at}}}if(!j(S)&&S.isProviderFor(U,te))return S}function F(U,te){var he=Y.get(U),ye;return j(he)||(ye=he.get(te)),j(ye)&&(ye=ne(U,te),j(ye)||(j(he)&&(he=new m,Y.set(U,he)),he.set(te,ye))),ye}function _(U){if(j(U))throw new TypeError;return E===U||N===U||!j(A)&&A.has(U)}function L(U,te,he){if(!_(he))throw new Error("Metadata provider not registered.");var ye=F(U,te);if(ye!==he){if(!j(ye))return!1;var at=Y.get(U);j(at)&&(at=new m,Y.set(U,at)),at.set(te,he)}return!0}}function co(){var S;return!j(B)&&ge(i.Reflect)&&Object.isExtensible(i.Reflect)&&(S=i.Reflect[B]),j(S)&&(S=Rt()),!j(B)&&ge(i.Reflect)&&Object.isExtensible(i.Reflect)&&Object.defineProperty(i.Reflect,B,{enumerable:!1,configurable:!1,writable:!1,value:S}),S}function xr(S){var E=new C,N={isProviderFor:function(_,L){var U=E.get(_);return j(U)?!1:U.has(L)},OrdinaryDefineOwnMetadata:Be,OrdinaryHasOwnMetadata:Y,OrdinaryGetOwnMetadata:Ee,OrdinaryOwnMetadataKeys:ne,OrdinaryDeleteMetadata:F};return $.registerProvider(N),N;function A(_,L,U){var te=E.get(_),he=!1;if(j(te)){if(!U)return;te=new m,E.set(_,te),he=!0}var ye=te.get(L);if(j(ye)){if(!U)return;if(ye=new m,te.set(L,ye),!S.setProvider(_,L,N))throw te.delete(L),he&&E.delete(_),new Error("Wrong provider for target.")}return ye}function Y(_,L,U){var te=A(L,U,!1);return j(te)?!1:We(te.has(_))}function Ee(_,L,U){var te=A(L,U,!1);if(!j(te))return te.get(_)}function Be(_,L,U,te){var he=A(U,te,!0);he.set(_,L)}function ne(_,L){var U=[],te=A(_,L,!1);if(j(te))return U;for(var he=te.keys(),ye=Ie(he),at=0;;){var uo=st(ye);if(!uo)return U.length=at,U;var pt=rt(uo);try{U[at]=pt}catch(Nr){try{pn(ye)}finally{throw Nr}}at++}}function F(_,L,U){var te=A(L,U,!1);if(j(te)||!te.delete(_))return!1;if(te.size===0){var he=E.get(L);j(he)||(he.delete(U),he.size===0&&E.delete(he))}return!0}}function Er(S){var E=S.defineMetadata,N=S.hasOwnMetadata,A=S.getOwnMetadata,Y=S.getOwnMetadataKeys,Ee=S.deleteMetadata,Be=new C,ne={isProviderFor:function(F,_){var L=Be.get(F);return!j(L)&&L.has(_)?!0:Y(F,_).length?(j(L)&&(L=new b,Be.set(F,L)),L.add(_),!0):!1},OrdinaryDefineOwnMetadata:E,OrdinaryHasOwnMetadata:N,OrdinaryGetOwnMetadata:A,OrdinaryOwnMetadataKeys:Y,OrdinaryDeleteMetadata:Ee};return ne}function gn(S,E,N){var A=$.getProvider(S,E);if(!j(A))return A;if(N){if($.setProvider(S,E,x))return x;throw new Error("Illegal state.")}}function Un(){var S={},E=[],N=function(){function ne(F,_,L){this._index=0,this._keys=F,this._values=_,this._selector=L}return ne.prototype["@@iterator"]=function(){return this},ne.prototype[a]=function(){return this},ne.prototype.next=function(){var F=this._index;if(F>=0&&F<this._keys.length){var _=this._selector(this._keys[F],this._values[F]);return F+1>=this._keys.length?(this._index=-1,this._keys=E,this._values=E):this._index++,{value:_,done:!1}}return{value:void 0,done:!0}},ne.prototype.throw=function(F){throw this._index>=0&&(this._index=-1,this._keys=E,this._values=E),F},ne.prototype.return=function(F){return this._index>=0&&(this._index=-1,this._keys=E,this._values=E),{value:F,done:!0}},ne}(),A=function(){function ne(){this._keys=[],this._values=[],this._cacheKey=S,this._cacheIndex=-2}return Object.defineProperty(ne.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),ne.prototype.has=function(F){return this._find(F,!1)>=0},ne.prototype.get=function(F){var _=this._find(F,!1);return _>=0?this._values[_]:void 0},ne.prototype.set=function(F,_){var L=this._find(F,!0);return this._values[L]=_,this},ne.prototype.delete=function(F){var _=this._find(F,!1);if(_>=0){for(var L=this._keys.length,U=_+1;U<L;U++)this._keys[U-1]=this._keys[U],this._values[U-1]=this._values[U];return this._keys.length--,this._values.length--,Ze(F,this._cacheKey)&&(this._cacheKey=S,this._cacheIndex=-2),!0}return!1},ne.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=S,this._cacheIndex=-2},ne.prototype.keys=function(){return new N(this._keys,this._values,Y)},ne.prototype.values=function(){return new N(this._keys,this._values,Ee)},ne.prototype.entries=function(){return new N(this._keys,this._values,Be)},ne.prototype["@@iterator"]=function(){return this.entries()},ne.prototype[a]=function(){return this.entries()},ne.prototype._find=function(F,_){if(!Ze(this._cacheKey,F)){this._cacheIndex=-1;for(var L=0;L<this._keys.length;L++)if(Ze(this._keys[L],F)){this._cacheIndex=L;break}}return this._cacheIndex<0&&_&&(this._cacheIndex=this._keys.length,this._keys.push(F),this._values.push(void 0)),this._cacheIndex},ne}();return A;function Y(ne,F){return ne}function Ee(ne,F){return F}function Be(ne,F){return[ne,F]}}function Br(){var S=function(){function E(){this._map=new m}return Object.defineProperty(E.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),E.prototype.has=function(N){return this._map.has(N)},E.prototype.add=function(N){return this._map.set(N,N),this},E.prototype.delete=function(N){return this._map.delete(N)},E.prototype.clear=function(){this._map.clear()},E.prototype.keys=function(){return this._map.keys()},E.prototype.values=function(){return this._map.keys()},E.prototype.entries=function(){return this._map.entries()},E.prototype["@@iterator"]=function(){return this.keys()},E.prototype[a]=function(){return this.keys()},E}();return S}function $r(){var S=16,E=f.create(),N=A();return function(){function F(){this._key=A()}return F.prototype.has=function(_){var L=Y(_,!1);return L!==void 0?f.has(L,this._key):!1},F.prototype.get=function(_){var L=Y(_,!1);return L!==void 0?f.get(L,this._key):void 0},F.prototype.set=function(_,L){var U=Y(_,!0);return U[this._key]=L,this},F.prototype.delete=function(_){var L=Y(_,!1);return L!==void 0?delete L[this._key]:!1},F.prototype.clear=function(){this._key=A()},F}();function A(){var F;do F="@@WeakMap@@"+ne();while(f.has(E,F));return E[F]=!0,F}function Y(F,_){if(!o.call(F,N)){if(!_)return;Object.defineProperty(F,N,{value:f.create()})}return F[N]}function Ee(F,_){for(var L=0;L<_;++L)F[L]=Math.random()*255|0;return F}function Be(F){if(typeof Uint8Array=="function"){var _=new Uint8Array(F);return typeof crypto<"u"?crypto.getRandomValues(_):typeof msCrypto<"u"?msCrypto.getRandomValues(_):Ee(_,F),_}return Ee(new Array(F),F)}function ne(){var F=Be(S);F[6]=F[6]&79|64,F[8]=F[8]&191|128;for(var _="",L=0;L<S;++L){var U=F[L];(L===4||L===6||L===8)&&(_+="-"),U<16&&(_+="0"),_+=U.toString(16).toLowerCase()}return _}}function fi(S){return S.__=void 0,delete S.__,S}})})(Hr||(Hr={}));const ze=[];for(let n=0;n<256;++n)ze.push((n+256).toString(16).slice(1));function Jl(n,e=0){return(ze[n[e+0]]+ze[n[e+1]]+ze[n[e+2]]+ze[n[e+3]]+"-"+ze[n[e+4]]+ze[n[e+5]]+"-"+ze[n[e+6]]+ze[n[e+7]]+"-"+ze[n[e+8]]+ze[n[e+9]]+"-"+ze[n[e+10]]+ze[n[e+11]]+ze[n[e+12]]+ze[n[e+13]]+ze[n[e+14]]+ze[n[e+15]]).toLowerCase()}const Kl=new Uint8Array(16);function ec(){return crypto.getRandomValues(Kl)}function Ut(n,e,i){return crypto.randomUUID?crypto.randomUUID():tc(n)}function tc(n,e,i){var r;n=n||{};const o=n.random??((r=n.rng)==null?void 0:r.call(n))??ec();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Jl(o)}class De{static UUID(){return Ut()}static GUID(){const e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}function nc(n){var e=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var i=n.shift();n[0]=i+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<n.length;o++){var r=n[o];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(o>0&&(r=r.replace(/^[\/]+/,"")),o<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),e.push(r))}var s=e.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function wo(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),nc(n)}class re{static Capitalize(e){return e?e[0].toUpperCase()+e.slice(1):""}static BuildSafeUrl(e,i,o){try{const r=new URL(e);return i&&(r.port=i.toString()),wo(r.toString(),o)}catch{throw new Error(`Invalid host URL: ${e}`)}}static ToCamelCase(e){const i=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return e.match(i).map((r,s)=>s===0?r.toLowerCase():re.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(e,i,o){return e.substring(e.indexOf(i)+2,e.lastIndexOf(o))}static Translit(e,i){const o={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return i&&/[а-яА-Я]/g.test(e)?e.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(o).find(d=>o[d]===r);return a||""}const s=Object.keys(o).find(a=>o[a]===r.toLowerCase());return s?s.toUpperCase():""}):e.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?o[r]:o[r.toLowerCase()].toUpperCase())}static RemoveEmoji(e){const i=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return e.replace(i,"")}static CanBeTranslited(e){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(e)}static StringsEquals(e,i){const o=e.toLowerCase().replaceAll(/\s/g,""),r=i.toLowerCase().replaceAll(/\s/g,""),s=re.Translit(o),a=re.Translit(r);return o.includes(r)||s.includes(r)||o.includes(a)}static SearchIn(e,i){return re.StringsEquals(e,i)}static SearchInFields(e,i){let o=!1;for(let r=0;r<i.length;r++)if(re.SearchIn(i[r],e)){o=!0;break}return o}static FormatToPercentage(e){return`${e}%`}static ApplyClassToSubStr(e,i,o){const r=o??"highlight-text",s=new RegExp(re.GetVariants(i).join("|"),"gi");return e.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(e){const i=re.Translit(e);return[e,re.Capitalize(e),e.toLowerCase(),e.toUpperCase(),i,re.Capitalize(i),i.toLowerCase(),i.toUpperCase()]}static ContainsNum(e){return/\d/.test(e)}static JoinSnake(...e){return e.join("_")}static GetDynamicCountName(e,i){const o=[2,0,1,1,1,2];return e.length+" "+i[e.length%100>4&&e.length%100<20?2:o[e.length%10<5?e.length%10:5]]}static TrimText(e){return typeof e=="string"?e.trim():e}}const Yt=class Yt{static BuildClass(e,i){i&&Object.keys(i).forEach(o=>{const r=i[o];if(this.isPrimitive(r))e[o]instanceof Date?e[o]=new Date(r):e[o]=r;else if(r!=null&&!Array.isArray(r))if(e[o]&&e[o].constructor)e[o]=new e[o].constructor(r);else{const s=Reflect.getMetadata(o,e);s&&(e[o]=new s[o](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(o,e);r.length!==0&&!s&&(e[o]=r),s&&(e[o]=r.map(a=>new s[o](a)))}})}static isPrimitive(e){return e!==null&&typeof e<"u"&&e!==Object(e)}static RemoveFromClassByIndex(e,i,o){Yt.RemoveFromClass(e,i,o)}static RemoveFromClassById(e,i,o){if(!e)return;const r=i.findIndex(s=>s.id===e);Yt.RemoveFromClass(r,i,o)}static RemoveFromClass(e,i,o){if(e<0)return;const r=i[e].id;r&&o&&o.push(r),i.splice(e,1)}static GetPropertyName(e){const i=new e;return new Proxy(i,{get(o,r){return r}})}static InitClassInstance(e,i){const o=e.constructor(i);return Yt.BuildClass(o),o.id=De.UUID(),o}static ExistsWithId(e,i){return e.some(o=>o.id===i)}static DeepMap(e){return i=>Array.isArray(i)?i.map(Yt.DeepMap(e)):Object(i)===i?Object.fromEntries(Object.entries(i).map(([o,r])=>[o,Yt.DeepMap(e)(r)])):e(i)}static DeepTrim(e){return this.DeepMap(re.TrimText)(e)}};l(Yt,"GetClassConstructor",e=>(i,o)=>{const r=Reflect.getMetadata(`property:${o}`,i)||{};r[o]=e,Reflect.defineMetadata(o,r,i)});let O=Yt;class Jt{constructor(e){l(this,"id");l(this,"address");l(this,"description");l(this,"contactId");O.BuildClass(this,e)}static Create(){const e=new Jt;return e.id=De.UUID(),e}}class bo{static Setup(e="http://localhost",i="9000",o="api"){this.staticUrl=re.BuildSafeUrl(e,i,o),this.staticUrl=wo(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}l(bo,"staticUrl","");class Ge{constructor(e){l(this,"name","");l(this,"url","");l(this,"src","");l(this,"raw");l(this,"blob");l(this,"file");l(this,"type","");l(this,"id");l(this,"originalName","");l(this,"fileSystemPath","");l(this,"itemId");l(this,"itemOneId");l(this,"description","");l(this,"order",0);O.BuildClass(this,e)}getFileUrl(){const e=this.url?this.url:`${bo.StaticUrl}/${this.fileSystemPath}`;return new URL(e,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:wn&&wn.tagName.toUpperCase()==="SCRIPT"&&wn.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(e,i){const o=new Ge;return o.id=i??De.UUID(),o.originalName=e.name,o.file=e.blob,o.fileSystemPath=De.UUID(),o}setFile(e){this.id||(this.id=De.UUID()),this.originalName=e.name,this.file=e,this.fileSystemPath=De.UUID(),this.url=e.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(e,i){if(e.target){let o="";return i&&(o=`@/assets/img/${i}`),new URL(o,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:wn&&wn.tagName.toUpperCase()==="SCRIPT"&&wn.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(e){const i=e.split(".");return i[i.length-1]}}class Ur{constructor(e){l(this,"id");l(this,"name","");l(this,"surname","");l(this,"patronymic","");l(this,"isMale",!0);l(this,"dateBirth",new Date);l(this,"contactId");l(this,"slug","");l(this,"postIndex","");l(this,"address","");l(this,"editNameMode",!1);O.BuildClass(this,e)}setEditNameMode(e){this.editNameMode=e}getFullName(){return!this.surname.length&&!this.name.length&&!this.patronymic.length?"":`${this.surname} ${this.name} ${this.patronymic}`}getInitialsName(){return`${this.name.slice(0,1)}.${this.patronymic.slice(0,1)}. ${this.surname}`}getGender(e){return e?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=re.Capitalize(this.name),this.surname=re.Capitalize(this.surname),this.patronymic=re.Capitalize(this.patronymic)}trimName(){this.name=this.name.trim(),this.surname=this.surname.trim(),this.patronymic=this.patronymic.trim()}sanitizeName(){this.trimName(),this.capitalizeName()}setFullName(e){this.surname=e.surname,this.name=e.name,this.patronymic=e.patronymic}}class Kt{constructor(e){l(this,"id");l(this,"number");l(this,"description");l(this,"contactId");O.BuildClass(this,e)}static Create(){const e=new Kt;return e.id=De.UUID(),e}}class ki{constructor(e){l(this,"id");l(this,"address");l(this,"description");O.BuildClass(this,e)}}class xi{constructor(e){l(this,"id");l(this,"login","");l(this,"email","");l(this,"password","");O.BuildClass(this,e)}static Create(){const e=new xi;return e.id=De.UUID(),e}}class So{constructor(e){l(this,"id");l(this,"address");l(this,"description");O.BuildClass(this,e)}}let ic=(_t=class{},l(_t,"Phone",Kt),l(_t,"FileInfo",Ge),l(_t,"Website",So),l(_t,"Email",Jt),l(_t,"Human",Ur),l(_t,"PostAddress",ki),l(_t,"UserAccount",xi),_t);var Se=(n=>(n.Eq="=",n.Ne="!=",n.Gt=">",n.Lt="<",n.Btw="between",n.In="in",n.Like="like",n.Null="is null",n.NotNull="is not null",n))(Se||{});class Ei{constructor(e){l(this,"field","");l(this,"operator",Se.Eq);l(this,"value","");O.BuildClass(this,e)}setValue(e){this.value=e}static Create(e,i){return new Ei({operator:i,field:e})}eq(e){return this.field===e.field&&this.operator===e.operator}isUnary(){return this.operator===Se.Eq||this.operator===Se.Gt||this.operator===Se.Lt}isBetween(){return this.operator===Se.Btw}isSet(){return this.operator===Se.In}}class Co{constructor(e){l(this,"model","");l(this,"field","");l(this,"value","");l(this,"wheres",[]);O.BuildClass(this,e)}static Create(e){const i=new Co;return i.model=e.GetClassName(),i}eq(e){return e.model===this.model&&e.field===this.field}addWhere(e,i){const o=this.findWhere({field:e,operator:i});if(o)return o;const r=Ei.Create(e,i);return this.wheres.push(r),r}findWhere(e){return this.wheres.find(i=>i.eq(e))}}let qr=class Nl{constructor(e){l(this,"id");l(this,"model","");l(this,"wheres",[]);l(this,"joins",[]);O.BuildClass(this,e)}static Create(e){const i=new Nl;return i.model=e.GetClassName(),i}addWhere(e,i){const o=this.findWhere({field:e,operator:i});if(o)return o;const r=Ei.Create(e,i);return this.wheres.push(r),r}removeWhere(e){const i=this.wheres.findIndex(o=>o.eq(e));i>-1&&this.wheres.splice(i,1)}addJoin(e){const i=this.findJoin({model:e.GetClassName()});if(i)return i;const o=Co.Create(e);return this.joins.push(o),o}findJoin(e){return this.joins.find(i=>i.eq(e))}findWhere(e){return this.wheres.find(i=>i.eq(e))}toRef(){return t.ref(this)}};class vt{static Shuffle(e){for(let i=e.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1));[e[i],e[o]]=[e[o],e[i]]}}static GenerateNumsRange(e,i,o=1){return Array.from({length:(i-e)/o+1},(r,s)=>e+s*o)}static GetLast(e){return e[e.length-1]}static GetFirst(e){return e[0]}static GetRandEL(e){return e[Math.floor(Math.random()*e.length)]}static Sort(e){e.forEach((i,o)=>i.order=o)}static Refill(e,i){e.splice(0,e.length),e.push(...i)}static Eq(e,i){return e.length===i.length&&(e==null?void 0:e.every((o,r)=>e[r]==i[r]))}static SwipeById(e,i,o){const r=e.findIndex(a=>i.id===a.id),s=e.findIndex(a=>o.id===a.id);r||s||([e[r],e[s]]=[e[s],e[r]])}static Swap(e,i,o){if(i<0||i>=e.length||o<0||o>=e.length)return;const r=e[i];e[i]=e[o],e[o]=r}static MoveUp(e,i){e[i].order=i-1,e[i-1]&&(e[i-1].order=i),[e[i],e[i-1]]=[e[i-1],e[i]]}static MoveDown(e,i){e[i].order=i+1,e[i+1]&&(e[i+1].order=i),[e[i],e[i+1]]=[e[i+1],e[i]]}}var Te=(n=>(n.Date="date",n.String="string",n.Boolean="boolean",n.Number="number",n.Set="set",n.Join="join",n.ArrayString="arrayString",n.ArrayNumber="arrayNumber",n))(Te||{}),oc=Object.defineProperty,rc=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&oc(e,i,r),r};const jr=class pi{constructor(e){l(this,"id");l(this,"model","");l(this,"label","");l(this,"col","");l(this,"operator",Se.Eq);l(this,"date1");l(this,"date2");l(this,"value1","");l(this,"boolean",!1);l(this,"number",0);l(this,"type",Te.String);l(this,"set",[]);l(this,"isSet",!1);l(this,"joinTable","");l(this,"joinTableModel","");l(this,"joinTableFk","");l(this,"joinTablePk","");l(this,"joinTableId","");l(this,"joinTableIdCol","");O.BuildClass(this,e)}eq(e){if(!e)return!1;if(this.type===Te.Join){const i=e.model===this.model&&e.operator===this.operator&&this.joinTableModel===e.joinTableModel;return e.operator===Se.In?i&&vt.Eq(this.set,e.set):i}return e.model===this.model&&e.col===this.col&&e.operator===this.operator}valueEq(e){return!this||!e||!this.eq(e)?!1:this.type===Te.Boolean?this.boolean===(e==null?void 0:e.boolean):this.type===Te.String?this.value1===(e==null?void 0:e.value1):this.type===Te.Join&&this.set.length?vt.Eq(this.set,e.set):!1}toUrlQuery(){const e=this.type?`"type":"${this.type}"`:"",i=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Te.Boolean?`"boolean":${this.boolean}`:"",d=this.type===Te.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",c=this.type===Te.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Te.Number?`"number":${this.number}`:"",f=this.type===Te.Set||this.operator===Se.In?`"set":${JSON.stringify(this.set)}`:"",h=this.type===Te.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[e,i,o,r,s,a,d,c,u,f,h].filter(m=>m!=="").toString()}fromUrlQuery(e){this.model=e.get("model")??"",this.col=e.get("col")??"",this.label=e.get("label")??"",this.operator=e.get("operator")??"",this.value1=e.get("value1")??"",this.type=e.get("type")??"",this.boolean=!!(e.get("boolean")??""),this.joinTableModel=e.get("joinTableModel")??"",this.joinTableId=e.get("joinTableId")??"",this.joinTableFk=e.get("joinTableFk")??"",this.joinTableIdCol=e.get("joinTableIdCol")??"",this.joinTablePk=e.get("joinTablePk")??""}isUnaryFilter(){return this.operator===Se.Eq||this.operator===Se.Gt||this.operator===Se.Lt}isBetweenFilter(){return this.operator===Se.Btw}isSetFilter(){return this.operator===Se.In}static Create(e,i,o){const r=new pi;return r.model=e.GetClassName(),r.col=i??"",r.type=o,r.type===Te.Number&&(r.value1="0"),r.type===Te.String&&(r.value1=""),r.type===Te.Boolean&&(r.value1="false",r.operator=Se.Eq),r}static CreateFilterModelWithJoin(e,i,o,r,s,a,d,c){const u=new pi;return u.id=Ut(),u.joinTable=o,u.joinTablePk=r,u.joinTableFk=s,u.col=i,u.type=a,d&&(u.joinTableId=d),c&&(u.joinTableIdCol=c),u}static CreateFilterModelWithJoinV2(e,i,o,r,s,a,d){const c=new pi;return c.model=e,c.joinTableModel=o,c.joinTablePk=r,c.joinTableFk=s,c.col=i,c.type=Te.Join,a&&(c.joinTableId=a),d&&(c.joinTableIdCol=d),c}static OnlyIfSecondModelExists(e,i){const o=new pi;return o.id=Ut(),o.model=re.ToCamelCase(e.GetClassName()),o.joinTableModel=re.ToCamelCase(i.GetClassName()),o.type=Te.Join,o}addToSet(...e){e.forEach(i=>{if(this.set.indexOf(i)===-1){this.set.push(i);return}this.set=this.set.filter(o=>o!==i)})}pushToSet(...e){e.forEach(i=>{this.set.indexOf(i)===-1&&this.set.push(i)})}replaceSet(...e){this.set=e}setBoolean(e){this.boolean=e}toRef(){return t.ref(this)}setDate1(e){this.date1=e}setDate2(e){this.date2=e}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(e,i){if(!e&&!i){this.dropDates();return}if(!i){this.setDate1(e),this.operator=Se.Eq;return}this.setDate2(i),this.operator=Se.Btw}};rc([O.GetClassConstructor(String)],jr.prototype,"set");let ko=jr;class sc{constructor(){l(this,"operation",Se.Lt);l(this,"column","");l(this,"value");l(this,"initial",!0);l(this,"tableName","");l(this,"version","");l(this,"model","")}toUrlQuery(){const e=this.operation?`"operation":"${this.operation}"`:"",i=this.column?`"column":"${this.column}"`:"",o=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=o?`"value":"${o}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[e,i,r,s,a].filter(d=>d!=="").toString()}fromUrlQuery(e){e.cursvalue&&(this.value=e.cursvalue),e.curscolumn&&(this.column=String(e.curscolumn)),e.cursinitial!==void 0&&(this.initial=!!e.cursinitial),e.curstableName&&(this.tableName=String(e.curstableName)),e.cursoperation&&(this.operation=e.cursoperation)}}class Bi{constructor(e){l(this,"page",0);l(this,"rowsPerPage",25);l(this,"rowsNumber",0);l(this,"cursor",new sc);l(this,"cursorMode",!1);l(this,"append",!1);l(this,"allLoaded",!1);l(this,"version","");O.BuildClass(this,e)}setLoadMore(e,i,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=i,this.cursor.tableName=o,this.cursorMode=!0}setLoadMoreV2(e,i,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=i,this.cursor.model=o,this.cursorMode=!0,this.version="v2"}setOffset(e){this.page=e}toUrlQuery(){const e=`"offset":${this.offset}`,i=`"limit":${this.limit}`,o=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[e,i,o,r,s,a].toString()}fromUrlQuery(){const e=window.location.search,i=e.substring(e.indexOf("p=")+2,e.lastIndexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.page=Number(o.get("offset")),this.rowsPerPage=Number(o.get("col"))}setAllLoaded(e){this.allLoaded=!(e>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,O.BuildClass(this)}}var ct=(n=>(n.Asc="asc",n.Desc="desc",n))(ct||{});class $i{constructor(e){l(this,"model","");l(this,"col","");l(this,"order");l(this,"label","");l(this,"default",!1);l(this,"selected",!1);O.BuildClass(this,e)}static Create(e,i,o=ct.Asc,r,s){const a=new $i;return a.model=e.GetClassName(),a.col=i??"",a.order=o??ct.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===ct.Asc}isDesc(){return this.order===ct.Desc}eq(e){return e.model===this.model&&e.col===this.col&&e.order===this.order}toUrlQuery(){const e=this.model?`"model":"${this.model}"`:"",i=this.col?`"col":"${this.col}"`:"",o=this.order?`"order":"${this.order}"`:"";return[e,i,o].toString()}async fromUrlQuery(){const e=window.location.search,i=e.substring(e.indexOf("s=")+2,e.indexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.model=o.get("model")??"",this.col=o.get("col")??"",this.label=o.get("label")??"",this.default=!!o.get("default"),this.order=o.get("order")??""}asc(){this.order=ct.Asc}desc(){this.order=ct.Desc}}class Ni{constructor(){l(this,"model","");l(this,"cols",[]);l(this,"models",[])}static Create(e,i){const o=new Ni;return o.model=e.GetClassName(),o.cols=i,o}}var ac=Object.defineProperty,jn=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&ac(e,i,r),r};const Cn=(tt=class{constructor(e){l(this,"id");l(this,"f",[]);l(this,"f2",[]);l(this,"s",[]);l(this,"p",new Bi);l(this,"t",new Ni);O.BuildClass(this,e)}static Get(){return this.instance||(this.instance=new tt),this.instance}createFrom(e){const i=new tt(JSON.parse(e));this.f=i.f}clearForHTTP(){const e=new tt(this);return e.f=this.f.map(i=>tt.EmptyEntiries(i)),e.f2=this.f2.map(i=>tt.EmptyEntiries(i)),e.s=this.s.map(i=>tt.EmptyEntiries(i)),e.p=tt.EmptyEntiries(this.p),e.t=tt.EmptyEntiries(this.t),e}static EmptyEntiries(e){if(!e)return;const o=Object.entries(e).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(o)}findFilterModel(e){return this.f.find(i=>e.id===i.id)}getFirstSortModel(){return vt.GetLast(this.s)}setSortModel(e){e&&(this.s[0]=e)}setS(e){this.s[0]=e}setF(e){this.f.push(e)}setF2(e){this.f2.push(e)}replaceF(e,i){this.removeF(i),e&&this.setF(e)}removeF(e){const i=this.f.findIndex(o=>o.eq(e));O.RemoveFromClassByIndex(i,this.f)}reset(){this.f=[],this.s=[],this.p=new Bi}resetF(){this.f=[]}},l(tt,"instance"),tt);jn([O.GetClassConstructor(ko)],Cn.prototype,"f"),jn([O.GetClassConstructor(qr)],Cn.prototype,"f2"),jn([O.GetClassConstructor($i)],Cn.prototype,"s"),jn([O.GetClassConstructor(Bi)],Cn.prototype,"p"),jn([O.GetClassConstructor(Ni)],Cn.prototype,"t");let At=Cn,lc=(Ln=class{},l(Ln,"SortModel",$i),l(Ln,"FilterModel",ko),l(Ln,"FilterModelV2",qr),l(Ln,"FTSP",At),Ln);function Wr(n,e){return function(){return n.apply(e,arguments)}}const{toString:cc}=Object.prototype,{getPrototypeOf:kn}=Object,{iterator:Wn,toStringTag:Gr}=Symbol,Mi=(({hasOwnProperty:n})=>(e,i)=>n.call(e,i))(Object.prototype),Gn=(n,e)=>{let i=n;const o=[];for(;i!=null&&i!==Object.prototype;){if(o.indexOf(i)!==-1)return!1;if(o.push(i),Mi(i,e))return!0;i=kn(i)}return!1},dc=(n,e)=>n!=null&&Gn(n,e)?n[e]:void 0,xo=(n=>e=>{const i=cc.call(e);return n[i]||(n[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),gt=n=>(n=n.toLowerCase(),e=>xo(e)===n),Ii=n=>e=>typeof e===n,{isArray:en}=Array,xn=Ii("undefined");function En(n){return n!==null&&!xn(n)&&n.constructor!==null&&!xn(n.constructor)&&Je(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Qr=gt("ArrayBuffer");function uc(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Qr(n.buffer),e}const fc=Ii("string"),Je=Ii("function"),Yr=Ii("number"),Bn=n=>n!==null&&typeof n=="object",hc=n=>n===!0||n===!1,Vi=n=>{if(!Bn(n))return!1;const e=kn(n);return(e===null||e===Object.prototype||kn(e)===null)&&!Gn(n,Gr)&&!Gn(n,Wn)},mc=n=>{if(!Bn(n)||En(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},pc=gt("Date"),gc=gt("File"),yc=n=>!!(n&&typeof n.uri<"u"),wc=n=>n&&typeof n.getParts<"u",bc=gt("Blob"),Sc=gt("FileList"),Cc=n=>Bn(n)&&Je(n.pipe);function kc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Xr=kc(),Zr=typeof Xr.FormData<"u"?Xr.FormData:void 0,xc=n=>{if(!n)return!1;if(Zr&&n instanceof Zr)return!0;const e=kn(n);if(!e||e===Object.prototype||!Je(n.append))return!1;const i=xo(n);return i==="formdata"||i==="object"&&Je(n.toString)&&n.toString()==="[object FormData]"},Ec=gt("URLSearchParams"),[Bc,$c,Nc,Mc]=["ReadableStream","Request","Response","Headers"].map(gt),Ic=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qn(n,e,{allOwnKeys:i=!1}={}){if(n===null||typeof n>"u")return;let o,r;if(typeof n!="object"&&(n=[n]),en(n))for(o=0,r=n.length;o<r;o++)e.call(null,n[o],o,n);else{if(En(n))return;const s=i?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let d;for(o=0;o<a;o++)d=s[o],e.call(null,n[d],d,n)}}function Jr(n,e){if(En(n))return null;e=e.toLowerCase();const i=Object.keys(n);let o=i.length,r;for(;o-- >0;)if(r=i[o],e===r.toLowerCase())return r;return null}const tn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Kr=n=>!xn(n)&&n!==tn;function Eo(...n){const{caseless:e,skipUndefined:i}=Kr(this)&&this||{},o={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const d=e&&typeof a=="string"&&Jr(o,a)||a,c=Mi(o,d)?o[d]:void 0;Vi(c)&&Vi(s)?o[d]=Eo(c,s):Vi(s)?o[d]=Eo({},s):en(s)?o[d]=s.slice():(!i||!xn(s))&&(o[d]=s)};for(let s=0,a=n.length;s<a;s++){const d=n[s];if(!d||En(d)||(Qn(d,r),typeof d!="object"||en(d)))continue;const c=Object.getOwnPropertySymbols(d);for(let u=0;u<c.length;u++){const f=c[u];Lc.call(d,f)&&r(d[f],f)}}return o}const Vc=(n,e,i,{allOwnKeys:o}={})=>(Qn(e,(r,s)=>{i&&Je(r)?Object.defineProperty(n,s,{__proto__:null,value:Wr(r,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),n),Tc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Rc=(n,e,i,o)=>{n.prototype=Object.create(e.prototype,o),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:e.prototype}),i&&Object.assign(n.prototype,i)},Pc=(n,e,i,o)=>{let r,s,a;const d={};if(e=e||{},n==null)return e;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!o||o(a,n,e))&&!d[a]&&(e[a]=n[a],d[a]=!0);n=i!==!1&&kn(n)}while(n&&(!i||i(n,e))&&n!==Object.prototype);return e},vc=(n,e,i)=>{n=String(n),(i===void 0||i>n.length)&&(i=n.length),i-=e.length;const o=n.indexOf(e,i);return o!==-1&&o===i},Ac=n=>{if(!n)return null;if(en(n))return n;let e=n.length;if(!Yr(e))return null;const i=new Array(e);for(;e-- >0;)i[e]=n[e];return i},zc=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&kn(Uint8Array)),Dc=(n,e)=>{const o=(n&&n[Wn]).call(n);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(n,s[0],s[1])}},Fc=(n,e)=>{let i;const o=[];for(;(i=n.exec(e))!==null;)o.push(i);return o},Oc=gt("HTMLFormElement"),_c=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,o,r){return o.toUpperCase()+r}),{propertyIsEnumerable:Lc}=Object.prototype,Hc=gt("RegExp"),es=(n,e)=>{const i=Object.getOwnPropertyDescriptors(n),o={};Qn(i,(r,s)=>{let a;(a=e(r,s,n))!==!1&&(o[s]=a||r)}),Object.defineProperties(n,o)},Uc=n=>{es(n,(e,i)=>{if(Je(n)&&["arguments","caller","callee"].includes(i))return!1;const o=n[i];if(Je(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},qc=(n,e)=>{const i={},o=r=>{r.forEach(s=>{i[s]=!0})};return en(n)?o(n):o(String(n).split(e)),i},jc=()=>{},Wc=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function Gc(n){return!!(n&&Je(n.append)&&n[Gr]==="FormData"&&n[Wn])}const Qc=n=>{const e=new WeakSet,i=o=>{if(Bn(o)){if(e.has(o))return;if(En(o))return o;if(!("toJSON"in o)){e.add(o);const r=en(o)?[]:{};return Qn(o,(s,a)=>{const d=i(s);!xn(d)&&(r[a]=d)}),e.delete(o),r}}return o};return i(n)},Yc=gt("AsyncFunction"),Xc=n=>n&&(Bn(n)||Je(n))&&Je(n.then)&&Je(n.catch),ts=((n,e)=>n?setImmediate:e?((i,o)=>(tn.addEventListener("message",({source:r,data:s})=>{r===tn&&s===i&&o.length&&o.shift()()},!1),r=>{o.push(r),tn.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Je(tn.postMessage)),Zc=typeof queueMicrotask<"u"?queueMicrotask.bind(tn):typeof process<"u"&&process.nextTick||ts,ns=n=>n!=null&&Je(n[Wn]),y={isArray:en,isArrayBuffer:Qr,isBuffer:En,isFormData:xc,isArrayBufferView:uc,isString:fc,isNumber:Yr,isBoolean:hc,isObject:Bn,isPlainObject:Vi,isEmptyObject:mc,isReadableStream:Bc,isRequest:$c,isResponse:Nc,isHeaders:Mc,isUndefined:xn,isDate:pc,isFile:gc,isReactNativeBlob:yc,isReactNative:wc,isBlob:bc,isRegExp:Hc,isFunction:Je,isStream:Cc,isURLSearchParams:Ec,isTypedArray:zc,isFileList:Sc,forEach:Qn,merge:Eo,extend:Vc,trim:Ic,stripBOM:Tc,inherits:Rc,toFlatObject:Pc,kindOf:xo,kindOfTest:gt,endsWith:vc,toArray:Ac,forEachEntry:Dc,matchAll:Fc,isHTMLForm:Oc,hasOwnProperty:Mi,hasOwnProp:Mi,hasOwnInPrototypeChain:Gn,getSafeProp:dc,reduceDescriptors:es,freezeMethods:Uc,toObjectSet:qc,toCamelCase:_c,noop:jc,toFiniteNumber:Wc,findKey:Jr,global:tn,isContextDefined:Kr,isSpecCompliantForm:Gc,toJSONObject:Qc,isAsyncFn:Yc,isThenable:Xc,setImmediate:ts,asap:Zc,isIterable:ns,isSafeIterable:n=>n!=null&&Gn(n,Wn)&&ns(n)},Jc=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Kc=n=>{const e={};let i,o,r;return n&&n.split(`
15
- `).forEach(function(a){r=a.indexOf(":"),i=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!i||e[i]&&Jc[i])&&(i==="set-cookie"?e[i]?e[i].push(o):e[i]=[o]:e[i]=e[i]?e[i]+", "+o:o)}),e};function ed(n){let e=0,i=n.length;for(;e<i;){const o=n.charCodeAt(e);if(o!==9&&o!==32)break;e+=1}for(;i>e;){const o=n.charCodeAt(i-1);if(o!==9&&o!==32)break;i-=1}return e===0&&i===n.length?n:n.slice(e,i)}const td=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),nd=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Bo(n,e){return y.isArray(n)?n.map(i=>Bo(i,e)):ed(String(n).replace(e,""))}const id=n=>Bo(n,td),od=n=>Bo(n,nd);function is(n){const e=Object.create(null);return y.forEach(n.toJSON(),(i,o)=>{e[o]=od(i)}),e}const os=Symbol("internals");function Yn(n){return n&&String(n).trim().toLowerCase()}function Ti(n){return n===!1||n==null?n:y.isArray(n)?n.map(Ti):id(String(n))}function rd(n){const e=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=i.exec(n);)e[o[1]]=o[2];return e}const sd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function $o(n,e,i,o,r){if(y.isFunction(o))return o.call(this,e,i);if(r&&(e=i),!!y.isString(e)){if(y.isString(o))return e.indexOf(o)!==-1;if(y.isRegExp(o))return o.test(e)}}function ad(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,i,o)=>i.toUpperCase()+o)}function ld(n,e){const i=y.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+i,{__proto__:null,value:function(r,s,a){return this[o].call(this,e,r,s,a)},configurable:!0})})}let He=class{constructor(e){e&&this.set(e)}set(e,i,o){const r=this;function s(d,c,u){const f=Yn(c);if(!f)return;const h=y.findKey(r,f);(!h||r[h]===void 0||u===!0||u===void 0&&r[h]!==!1)&&(r[h||c]=Ti(d))}const a=(d,c)=>y.forEach(d,(u,f)=>s(u,f,c));if(y.isPlainObject(e)||e instanceof this.constructor)a(e,i);else if(y.isString(e)&&(e=e.trim())&&!sd(e))a(Kc(e),i);else if(y.isObject(e)&&y.isSafeIterable(e)){let d=Object.create(null),c,u;for(const f of e){if(!y.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],y.hasOwnProp(d,u)?(c=d[u],d[u]=y.isArray(c)?[...c,f[1]]:[c,f[1]]):d[u]=f[1]}a(d,i)}else e!=null&&s(i,e,o);return this}get(e,i){if(e=Yn(e),e){const o=y.findKey(this,e);if(o){const r=this[o];if(!i)return r;if(i===!0)return rd(r);if(y.isFunction(i))return i.call(this,r,o);if(y.isRegExp(i))return i.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,i){if(e=Yn(e),e){const o=y.findKey(this,e);return!!(o&&this[o]!==void 0&&(!i||$o(this,this[o],o,i)))}return!1}delete(e,i){const o=this;let r=!1;function s(a){if(a=Yn(a),a){const d=y.findKey(o,a);d&&(!i||$o(o,o[d],d,i))&&(delete o[d],r=!0)}}return y.isArray(e)?e.forEach(s):s(e),r}clear(e){const i=Object.keys(this);let o=i.length,r=!1;for(;o--;){const s=i[o];(!e||$o(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const i=this,o={};return y.forEach(this,(r,s)=>{const a=y.findKey(o,s);if(a){i[a]=Ti(r),delete i[s];return}const d=e?ad(s):String(s).trim();d!==s&&delete i[s],i[d]=Ti(r),o[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const i=Object.create(null);return y.forEach(this,(o,r)=>{o!=null&&o!==!1&&(i[r]=e&&y.isArray(o)?o.join(", "):o)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,i])=>e+": "+i).join(`
16
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...i){const o=new this(e);return i.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[os]=this[os]={accessors:{}}).accessors,r=this.prototype;function s(a){const d=Yn(a);o[d]||(ld(r,a),o[d]=!0)}return y.isArray(e)?e.forEach(s):s(e),this}};He.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),y.reduceDescriptors(He.prototype,({value:n},e)=>{let i=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(o){this[i]=o}}}),y.freezeMethods(He);const cd="[REDACTED ****]";function dd(n){if(y.hasOwnProp(n,"toJSON"))return!0;let e=Object.getPrototypeOf(n);for(;e&&e!==Object.prototype;){if(y.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function ud(n,e){const i=new Set(e.map(s=>String(s).toLowerCase())),o=[],r=s=>{if(s===null||typeof s!="object"||y.isBuffer(s))return s;if(o.indexOf(s)!==-1)return;s instanceof He&&(s=s.toJSON()),o.push(s);let a;if(y.isArray(s))a=[],s.forEach((d,c)=>{const u=r(d);y.isUndefined(u)||(a[c]=u)});else{if(!y.isPlainObject(s)&&dd(s))return o.pop(),s;a=Object.create(null);for(const[d,c]of Object.entries(s)){const u=i.has(d.toLowerCase())?cd:r(c);y.isUndefined(u)||(a[d]=u)}}return o.pop(),a};return r(n)}let z=class Ml extends Error{static from(e,i,o,r,s,a){const d=new Ml(e.message,i||e.code,o,r,s);return Object.defineProperty(d,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),d.name=e.name,e.status!=null&&d.status==null&&(d.status=e.status),a&&Object.assign(d,a),d}constructor(e,i,o,r,s){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,i&&(this.code=i),o&&(this.config=o),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const e=this.config,i=e&&y.hasOwnProp(e,"redact")?e.redact:void 0,o=y.isArray(i)&&i.length>0?ud(e,i):y.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};z.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",z.ERR_BAD_OPTION="ERR_BAD_OPTION",z.ECONNABORTED="ECONNABORTED",z.ETIMEDOUT="ETIMEDOUT",z.ECONNREFUSED="ECONNREFUSED",z.ERR_NETWORK="ERR_NETWORK",z.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",z.ERR_DEPRECATED="ERR_DEPRECATED",z.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",z.ERR_BAD_REQUEST="ERR_BAD_REQUEST",z.ERR_CANCELED="ERR_CANCELED",z.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",z.ERR_INVALID_URL="ERR_INVALID_URL",z.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const fd=null,rs=100;function No(n){return y.isPlainObject(n)||y.isArray(n)}function ss(n){return y.endsWith(n,"[]")?n.slice(0,-2):n}function Mo(n,e,i){return n?n.concat(e).map(function(r,s){return r=ss(r),!i&&s?"["+r+"]":r}).join(i?".":""):e}function hd(n){return y.isArray(n)&&!n.some(No)}const md=y.toFlatObject(y,{},null,function(e){return/^is[A-Z]/.test(e)});function Ri(n,e,i){if(!y.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,i=y.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(M,k){return!y.isUndefined(k[M])});const o=i.metaTokens,r=i.visitor||C,s=i.dots,a=i.indexes,d=i.Blob||typeof Blob<"u"&&Blob,c=i.maxDepth===void 0?rs:i.maxDepth,u=d&&y.isSpecCompliantForm(e),f=[];if(!y.isFunction(r))throw new TypeError("visitor must be a function");function h(x){if(x===null)return"";if(y.isDate(x))return x.toISOString();if(y.isBoolean(x))return x.toString();if(!u&&y.isBlob(x))throw new z("Blob is not supported. Use a Buffer instead.");if(y.isArrayBuffer(x)||y.isTypedArray(x)){if(u&&typeof d=="function")return new d([x]);if(typeof Buffer<"u")return Buffer.from(x);throw new z("Blob is not supported. Use a Buffer instead.",z.ERR_NOT_SUPPORT)}return x}function m(x){if(x>c)throw new z("Object is too deeply nested ("+x+" levels). Max depth: "+c,z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function b(x,M){if(c===1/0)return JSON.stringify(x);const k=[];return JSON.stringify(x,function(D,Z){if(!y.isObject(Z))return Z;for(;k.length&&k[k.length-1]!==this;)k.pop();return k.push(Z),m(M+k.length-1),Z})}function C(x,M,k){let P=x;if(y.isReactNative(e)&&y.isReactNativeBlob(x))return e.append(Mo(k,M,s),h(x)),!1;if(x&&!k&&typeof x=="object"){if(y.endsWith(M,"{}"))M=o?M:M.slice(0,-2),x=b(x,1);else if(y.isArray(x)&&hd(x)||(y.isFileList(x)||y.endsWith(M,"[]"))&&(P=y.toArray(x)))return M=ss(M),P.forEach(function(Z,K){!(y.isUndefined(Z)||Z===null)&&e.append(a===!0?Mo([M],K,s):a===null?M:M+"[]",h(Z))}),!1}return No(x)?!0:(e.append(Mo(k,M,s),h(x)),!1)}const B=Object.assign(md,{defaultVisitor:C,convertValue:h,isVisitable:No});function $(x,M,k=0){if(!y.isUndefined(x)){if(m(k),f.indexOf(x)!==-1)throw new Error("Circular reference detected in "+M.join("."));f.push(x),y.forEach(x,function(D,Z){(!(y.isUndefined(D)||D===null)&&r.call(e,D,y.isString(Z)?Z.trim():Z,M,B))===!0&&$(D,M?M.concat(Z):[Z],k+1)}),f.pop()}}if(!y.isObject(n))throw new TypeError("data must be an object");return $(n),e}function as(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(o){return e[o]})}function Io(n,e){this._pairs=[],n&&Ri(n,this,e)}const ls=Io.prototype;ls.append=function(e,i){this._pairs.push([e,i])},ls.toString=function(e){const i=e?o=>e.call(this,o,as):as;return this._pairs.map(function(r){return i(r[0])+"="+i(r[1])},"").join("&")};function pd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function cs(n,e,i){if(!e)return n;n=n||"";const o=y.isFunction(i)?{serialize:i}:i,r=y.getSafeProp(o,"encode")||pd,s=y.getSafeProp(o,"serialize");let a;if(s?a=s(e,o):a=y.isURLSearchParams(e)?e.toString():new Io(e,o).toString(r),a){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class ds{constructor(){this.handlers=[]}use(e,i,o){return this.handlers.push({fulfilled:e,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){y.forEach(this.handlers,function(o){o!==null&&e(o)})}}const Vo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},gd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Io,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},To=typeof window<"u"&&typeof document<"u",Ro=typeof navigator=="object"&&navigator||void 0,yd=To&&(!Ro||["ReactNative","NativeScript","NS"].indexOf(Ro.product)<0),wd=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bd=To&&window.location.href||"http://localhost",Fe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:To,hasStandardBrowserEnv:yd,hasStandardBrowserWebWorkerEnv:wd,navigator:Ro,origin:bd},Symbol.toStringTag,{value:"Module"})),...gd};function Sd(n,e){return Ri(n,new Fe.classes.URLSearchParams,{visitor:function(i,o,r,s){return Fe.isNode&&y.isBuffer(i)?(this.append(o,i.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}const us=rs;function fs(n){if(n>us)throw new z("FormData field is too deeply nested ("+n+" levels). Max depth: "+us,z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Cd(n){const e=[],i=/\w+|\[(\w*)]/g;let o;for(;(o=i.exec(n))!==null;)fs(e.length),e.push(o[0]==="[]"?"":o[1]||o[0]);return e}function kd(n){const e={},i=Object.keys(n);let o;const r=i.length;let s;for(o=0;o<r;o++)s=i[o],e[s]=n[s];return e}function hs(n){function e(i,o,r,s){fs(s);let a=i[s++];if(a==="__proto__")return!0;const d=Number.isFinite(+a),c=s>=i.length;return a=!a&&y.isArray(r)?r.length:a,c?(y.hasOwnProp(r,a)?r[a]=y.isArray(r[a])?r[a].concat(o):[r[a],o]:r[a]=o,!d):((!y.hasOwnProp(r,a)||!y.isObject(r[a]))&&(r[a]=[]),e(i,o,r[a],s)&&y.isArray(r[a])&&(r[a]=kd(r[a])),!d)}if(y.isFormData(n)&&y.isFunction(n.entries)){const i={};return y.forEachEntry(n,(o,r)=>{e(Cd(o),r,i,0)}),i}return null}const $n=(n,e)=>n!=null&&y.hasOwnProp(n,e)?n[e]:void 0;function xd(n,e,i){if(y.isString(n))try{return(e||JSON.parse)(n),y.trim(n)}catch(o){if(o.name!=="SyntaxError")throw o}return(i||JSON.stringify)(n)}const Xn={transitional:Vo,adapter:["xhr","http","fetch"],transformRequest:[function(e,i){const o=i.getContentType()||"",r=o.indexOf("application/json")>-1,s=y.isObject(e);if(s&&y.isHTMLForm(e)&&(e=new FormData(e)),y.isFormData(e))return r?JSON.stringify(hs(e)):e;if(y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)||y.isReadableStream(e))return e;if(y.isArrayBufferView(e))return e.buffer;if(y.isURLSearchParams(e))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(s){const c=$n(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return Sd(e,c).toString();if((d=y.isFileList(e))||o.indexOf("multipart/form-data")>-1){const u=$n(this,"env"),f=u&&u.FormData;return Ri(d?{"files[]":e}:e,f&&new f,c)}}return s||r?(i.setContentType("application/json",!1),xd(e)):e}],transformResponse:[function(e){const i=$n(this,"transitional")||Xn.transitional,o=i&&i.forcedJSONParsing,r=$n(this,"responseType"),s=r==="json";if(y.isResponse(e)||y.isReadableStream(e))return e;if(e&&y.isString(e)&&(o&&!r||s)){const d=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(e,$n(this,"parseReviver"))}catch(c){if(d)throw c.name==="SyntaxError"?z.from(c,z.ERR_BAD_RESPONSE,this,null,$n(this,"response")):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch","query"],n=>{Xn.headers[n]={}});function Po(n,e){const i=this||Xn,o=e||i,r=He.from(o.headers);let s=o.data;return y.forEach(n,function(d){s=d.call(i,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function ms(n){return!!(n&&n.__CANCEL__)}let Zn=class extends z{constructor(e,i,o){super(e??"canceled",z.ERR_CANCELED,i,o),this.name="CanceledError",this.__CANCEL__=!0}};function ps(n,e,i){const o=i.config.validateStatus;!i.status||!o||o(i.status)?n(i):e(new z("Request failed with status code "+i.status,i.status>=400&&i.status<500?z.ERR_BAD_REQUEST:z.ERR_BAD_RESPONSE,i.config,i.request,i))}function Ed(n){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return e&&e[1]||""}function Bd(n,e){n=n||10;const i=new Array(n),o=new Array(n);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),f=o[s];a||(a=u),i[r]=c,o[r]=u;let h=s,m=0;for(;h!==r;)m+=i[h++],h=h%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<e)return;const b=f&&u-f;return b?Math.round(m*1e3/b):void 0}}function $d(n,e){let i=0,o=1e3/e,r,s;const a=(u,f=Date.now())=>{i=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),h=f-i;h>=o?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-h)))},()=>r&&a(r)]}const Pi=(n,e,i=3)=>{let o=0;const r=Bd(50,250);return $d(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,d=s.lengthComputable?s.total:void 0,c=d!=null?Math.min(a,d):a,u=Math.max(0,c-o),f=r(u);o=Math.max(o,c);const h={loaded:c,total:d,progress:d?c/d:void 0,bytes:u,rate:f||void 0,estimated:f&&d?(d-c)/f:void 0,event:s,lengthComputable:d!=null,[e?"download":"upload"]:!0};n(h)},i)},gs=(n,e)=>{const i=n!=null;return[o=>e[0]({lengthComputable:i,total:n,loaded:o}),e[1]]},ys=n=>(...e)=>y.asap(()=>n(...e)),Nd=Fe.hasStandardBrowserEnv?((n,e)=>i=>(i=new URL(i,Fe.origin),n.protocol===i.protocol&&n.host===i.host&&(e||n.port===i.port)))(new URL(Fe.origin),Fe.navigator&&/(msie|trident)/i.test(Fe.navigator.userAgent)):()=>!0,Md=Fe.hasStandardBrowserEnv?{write(n,e,i,o,r,s,a){if(typeof document>"u")return;const d=[`${n}=${encodeURIComponent(e)}`];y.isNumber(i)&&d.push(`expires=${new Date(i).toUTCString()}`),y.isString(o)&&d.push(`path=${o}`),y.isString(r)&&d.push(`domain=${r}`),s===!0&&d.push("secure"),y.isString(a)&&d.push(`SameSite=${a}`),document.cookie=d.join("; ")},read(n){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let i=0;i<e.length;i++){const o=e[i].replace(/^\s+/,""),r=o.indexOf("=");if(r!==-1&&o.slice(0,r)===n)try{return decodeURIComponent(o.slice(r+1))}catch{return o.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Id(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Vd(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}const Td=/^https?:(?!\/\/)/i,Rd=/[\t\n\r]/g;function Pd(n){let e=0;for(;e<n.length&&n.charCodeAt(e)<=32;)e++;return n.slice(e)}function vd(n){return Pd(n).replace(Rd,"")}function ws(n,e){if(typeof n=="string"&&Td.test(vd(n)))throw new z('Invalid URL: missing "//" after protocol',z.ERR_INVALID_URL,e)}function bs(n,e,i,o){ws(e,o);let r=!Id(e);return n&&(r||i===!1)?(ws(n,o),Vd(n,e)):e}const Ss=n=>n instanceof He?{...n}:n;function nn(n,e){n=n||{},e=e||{};const i=Object.create(null);Object.defineProperty(i,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(f,h,m,b){return y.isPlainObject(f)&&y.isPlainObject(h)?y.merge.call({caseless:b},f,h):y.isPlainObject(h)?y.merge({},h):y.isArray(h)?h.slice():h}function r(f,h,m,b){if(y.isUndefined(h)){if(!y.isUndefined(f))return o(void 0,f,m,b)}else return o(f,h,m,b)}function s(f,h){if(!y.isUndefined(h))return o(void 0,h)}function a(f,h){if(y.isUndefined(h)){if(!y.isUndefined(f))return o(void 0,f)}else return o(void 0,h)}function d(f){const h=y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!y.isUndefined(h))if(y.isPlainObject(h)){if(y.hasOwnProp(h,f))return h[f]}else return;const m=y.hasOwnProp(n,"transitional")?n.transitional:void 0;if(y.isPlainObject(m)&&y.hasOwnProp(m,f))return m[f]}function c(f,h,m){if(y.hasOwnProp(e,m))return o(f,h);if(y.hasOwnProp(n,m))return o(void 0,f)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:c,headers:(f,h,m)=>r(Ss(f),Ss(h),m,!0)};return y.forEach(Object.keys({...n,...e}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const m=y.hasOwnProp(u,h)?u[h]:r,b=y.hasOwnProp(n,h)?n[h]:void 0,C=y.hasOwnProp(e,h)?e[h]:void 0,B=m(b,C,h);y.isUndefined(B)&&m!==c||(i[h]=B)}),y.hasOwnProp(e,"validateStatus")&&y.isUndefined(e.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(y.hasOwnProp(n,"validateStatus")?i.validateStatus=o(void 0,n.validateStatus):delete i.validateStatus),i}const Ad=["content-type","content-length"];function zd(n,e,i){if(i!=="content-only"){n.set(e);return}Object.entries(e||{}).forEach(([o,r])=>{Ad.includes(o.toLowerCase())&&n.set(o,r)})}const Dd=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,i)=>String.fromCharCode(parseInt(i,16)));function Cs(n){const e=nn({},n),i=m=>y.hasOwnProp(e,m)?e[m]:void 0,o=i("data");let r=i("withXSRFToken");const s=i("xsrfHeaderName"),a=i("xsrfCookieName");let d=i("headers");const c=i("auth"),u=i("baseURL"),f=i("allowAbsoluteUrls"),h=i("url");if(e.headers=d=He.from(d),e.url=cs(bs(u,h,f,e),i("params"),i("paramsSerializer")),c){const m=y.getSafeProp(c,"username")||"",b=y.getSafeProp(c,"password")||"";try{d.set("Authorization","Basic "+btoa(m+":"+(b?Dd(b):"")))}catch(C){throw z.from(C,z.ERR_BAD_OPTION_VALUE,n)}}if(y.isFormData(o)&&(Fe.hasStandardBrowserEnv||Fe.hasStandardBrowserWebWorkerEnv||y.isReactNative(o)?d.setContentType(void 0):y.isFunction(o.getHeaders)&&zd(d,o.getHeaders(),i("formDataHeaderPolicy"))),Fe.hasStandardBrowserEnv&&(y.isFunction(r)&&(r=r(e)),r===!0||r==null&&Nd(e.url))){const b=s&&a&&Md.read(a);b&&d.set(s,b)}return e}const Fd=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(i,o){const r=Cs(n);let s=r.data;const a=He.from(r.headers).normalize();let{responseType:d,onUploadProgress:c,onDownloadProgress:u}=r,f,h,m,b,C;function B(){b&&b(),C&&C(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let $=new XMLHttpRequest;$.open(r.method.toUpperCase(),r.url,!0),$.timeout=r.timeout;function x(){if(!$)return;const k=He.from("getAllResponseHeaders"in $&&$.getAllResponseHeaders()),D={data:!d||d==="text"||d==="json"?$.responseText:$.response,status:$.status,statusText:$.statusText,headers:k,config:n,request:$};ps(function(K){i(K),B()},function(K){o(K),B()},D),$=null}"onloadend"in $?$.onloadend=x:$.onreadystatechange=function(){!$||$.readyState!==4||$.status===0&&!($.responseURL&&$.responseURL.startsWith("file:"))||setTimeout(x)},$.onabort=function(){$&&(o(new z("Request aborted",z.ECONNABORTED,n,$)),B(),$=null)},$.onerror=function(P){const D=P&&P.message?P.message:"Network Error",Z=new z(D,z.ERR_NETWORK,n,$);Z.event=P||null,o(Z),B(),$=null},$.ontimeout=function(){let P=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const D=r.transitional||Vo;r.timeoutErrorMessage&&(P=r.timeoutErrorMessage),o(new z(P,D.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,n,$)),B(),$=null},s===void 0&&a.setContentType(null),"setRequestHeader"in $&&y.forEach(is(a),function(P,D){$.setRequestHeader(D,P)}),y.isUndefined(r.withCredentials)||($.withCredentials=!!r.withCredentials),d&&d!=="json"&&($.responseType=r.responseType),u&&([m,C]=Pi(u,!0),$.addEventListener("progress",m)),c&&$.upload&&([h,b]=Pi(c),$.upload.addEventListener("progress",h),$.upload.addEventListener("loadend",b)),(r.cancelToken||r.signal)&&(f=k=>{$&&(o(!k||k.type?new Zn(null,n,$):k),$.abort(),B(),$=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const M=Ed(r.url);if(M&&!Fe.protocols.includes(M)){o(new z("Unsupported protocol "+M+":",z.ERR_BAD_REQUEST,n)),B();return}$.send(s||null)})},Od=(n,e)=>{if(n=n?n.filter(Boolean):[],!e&&!n.length)return;const i=new AbortController;let o=!1;const r=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;i.abort(u instanceof z?u:new Zn(u instanceof Error?u.message:u))}};let s=e&&setTimeout(()=>{s=null,r(new z(`timeout of ${e}ms exceeded`,z.ETIMEDOUT))},e);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),n=null)};n.forEach(c=>c.addEventListener("abort",r,{once:!0}));const{signal:d}=i;return d.unsubscribe=()=>y.asap(a),d},_d=function*(n,e){let i=n.byteLength;if(i<e){yield n;return}let o=0,r;for(;o<i;)r=o+e,yield n.slice(o,r),o=r},Ld=async function*(n,e){for await(const i of Hd(n))yield*_d(i,e)},Hd=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:i,value:o}=await e.read();if(i)break;yield o}}finally{await e.cancel()}},ks=(n,e,i,o)=>{const r=Ld(n,e);let s=0,a,d=c=>{a||(a=!0,o&&o(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await r.next();if(u){d(),c.close();return}let h=f.byteLength;if(i){let m=s+=h;i(m)}c.enqueue(new Uint8Array(f))}catch(u){throw d(u),u}},cancel(c){return d(c),r.return()}},{highWaterMark:2})},vi=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,Ud=(n,e,i)=>e+2<i&&vi(n.charCodeAt(e+1))&&vi(n.charCodeAt(e+2));function qd(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const e=n.indexOf(",");if(e<0)return 0;const i=n.slice(5,e),o=n.slice(e+1);if(/;base64/i.test(i)){let a=o.length;const d=o.length;for(let b=0;b<d;b++)if(o.charCodeAt(b)===37&&b+2<d){const C=o.charCodeAt(b+1),B=o.charCodeAt(b+2);vi(C)&&vi(B)&&(a-=2,b+=2)}let c=0,u=d-1;const f=b=>b>=2&&o.charCodeAt(b-2)===37&&o.charCodeAt(b-1)===51&&(o.charCodeAt(b)===68||o.charCodeAt(b)===100);u>=0&&(o.charCodeAt(u)===61?(c++,u--):f(u)&&(c++,u-=3)),c===1&&u>=0&&(o.charCodeAt(u)===61||f(u))&&c++;const m=Math.floor(a/4)*3-(c||0);return m>0?m:0}let s=0;for(let a=0,d=o.length;a<d;a++){const c=o.charCodeAt(a);if(c===37&&Ud(o,a,d))s+=1,a+=2;else if(c<128)s+=1;else if(c<2048)s+=2;else if(c>=55296&&c<=56319&&a+1<d){const u=o.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const vo="1.18.1",xs=64*1024,{isFunction:Ai}=y,jd=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,i)=>String.fromCharCode(parseInt(i,16))),Es=n=>{if(!y.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Bs=(n,...e)=>{try{return!!n(...e)}catch{return!1}},Wd=n=>{const e=n.indexOf("://");let i=n;return e!==-1&&(i=i.slice(e+3)),i.includes("@")||i.includes(":")},Gd=n=>{const e=y.global!==void 0&&y.global!==null?y.global:globalThis,{ReadableStream:i,TextEncoder:o}=e;n=y.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},n);const{fetch:r,Request:s,Response:a}=n,d=r?Ai(r):typeof fetch=="function",c=Ai(s),u=Ai(a);if(!d)return!1;const f=d&&Ai(i),h=d&&(typeof o=="function"?(x=>M=>x.encode(M))(new o):async x=>new Uint8Array(await new s(x).arrayBuffer())),m=c&&f&&Bs(()=>{let x=!1;const M=new s(Fe.origin,{body:new i,method:"POST",get duplex(){return x=!0,"half"}}),k=M.headers.has("Content-Type");return M.body!=null&&M.body.cancel(),x&&!k}),b=u&&f&&Bs(()=>y.isReadableStream(new a("").body)),C={stream:b&&(x=>x.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!C[x]&&(C[x]=(M,k)=>{let P=M&&M[x];if(P)return P.call(M);throw new z(`Response type '${x}' is not supported`,z.ERR_NOT_SUPPORT,k)})});const B=async x=>{if(x==null)return 0;if(y.isBlob(x))return x.size;if(y.isSpecCompliantForm(x))return(await new s(Fe.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(y.isArrayBufferView(x)||y.isArrayBuffer(x))return x.byteLength;if(y.isURLSearchParams(x)&&(x=x+""),y.isString(x))return(await h(x)).byteLength},$=async(x,M)=>{const k=y.toFiniteNumber(x.getContentLength());return k??B(M)};return async x=>{let{url:M,method:k,data:P,signal:D,cancelToken:Z,timeout:K,onDownloadProgress:fe,onUploadProgress:ht,responseType:Qe,headers:Pe,withCredentials:ke="same-origin",fetchOptions:hn,maxContentLength:Ye,maxBodyLength:It}=Cs(x);const Vt=y.isNumber(Ye)&&Ye>-1,Lt=y.isNumber(It)&&It>-1,mt=se=>y.hasOwnProp(x,se)?x[se]:void 0;let wt=r||fetch;Qe=Qe?(Qe+"").toLowerCase():"text";let nt=Od([D,Z&&Z.toAbortSignal()],K),we=null;const j=nt&&nt.unsubscribe&&(()=>{nt.unsubscribe()});let Le,Tt=null;const ge=()=>new z("Request body larger than maxBodyLength limit",z.ERR_BAD_REQUEST,x,we);try{let se;const je=mt("auth");if(je){const ee=y.getSafeProp(je,"username")||"",Ie=y.getSafeProp(je,"password")||"";se={username:ee,password:Ie}}if(Wd(M)){const ee=new URL(M,Fe.origin);if(!se&&(ee.username||ee.password)){const Ie=Es(ee.username),rt=Es(ee.password);se={username:Ie,password:rt}}(ee.username||ee.password)&&(ee.username="",ee.password="",M=ee.href)}if(se&&(Pe.delete("authorization"),Pe.set("Authorization","Basic "+btoa(jd((se.username||"")+":"+(se.password||""))))),Vt&&typeof M=="string"&&M.startsWith("data:")&&qd(M)>Ye)throw new z("maxContentLength size of "+Ye+" exceeded",z.ERR_BAD_RESPONSE,x,we);if(Lt&&k!=="get"&&k!=="head"){const ee=await B(P);if(typeof ee=="number"&&isFinite(ee)&&(Le=ee,ee>It))throw ge()}const We=Lt&&(y.isReadableStream(P)||y.isStream(P)),Hn=(ee,Ie,rt)=>ks(ee,xs,st=>{if(Lt&&st>It)throw Tt=ge();Ie&&Ie(st)},rt);if(m&&k!=="get"&&k!=="head"&&(ht||We)){if(Le=Le??await $(Pe,P),Le!==0||We){let ee=new s(M,{method:"POST",body:P,duplex:"half"}),Ie;if(y.isFormData(P)&&(Ie=ee.headers.get("content-type"))&&Pe.setContentType(Ie),ee.body){const[rt,st]=ht&&gs(Le,Pi(ys(ht)))||[];P=Hn(ee.body,rt,st)}}}else if(We&&!c&&f&&k!=="get"&&k!=="head")P=Hn(P);else if(We&&c&&!m&&k!=="get"&&k!=="head")throw new z("Stream request bodies are not supported by the current fetch implementation",z.ERR_NOT_SUPPORT,x,we);y.isString(ke)||(ke=ke?"include":"omit");const Xe=c&&"credentials"in s.prototype;if(y.isFormData(P)){const ee=Pe.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Pe.delete("content-type")}Pe.set("User-Agent","axios/"+vo,!1);const Ht={...hn,signal:nt,method:k.toUpperCase(),headers:is(Pe.normalize()),body:P,duplex:"half",credentials:Xe?ke:void 0};we=c&&new s(M,Ht);let Me=await(c?wt(we,hn):wt(M,Ht));const mn=He.from(Me.headers);if(Vt){const ee=y.toFiniteNumber(mn.getContentLength());if(ee!=null&&ee>Ye)throw new z("maxContentLength size of "+Ye+" exceeded",z.ERR_BAD_RESPONSE,x,we)}const be=b&&(Qe==="stream"||Qe==="response");if(b&&Me.body&&(fe||Vt||be&&j)){const ee={};["status","statusText","headers"].forEach(Rt=>{ee[Rt]=Me[Rt]});const Ie=y.toFiniteNumber(mn.getContentLength()),[rt,st]=fe&&gs(Ie,Pi(ys(fe),!0))||[];let pn=0;const bt=Rt=>{if(Vt&&(pn=Rt,pn>Ye))throw new z("maxContentLength size of "+Ye+" exceeded",z.ERR_BAD_RESPONSE,x,we);rt&&rt(Rt)};Me=new a(ks(Me.body,xs,bt,()=>{st&&st(),j&&j()}),ee)}Qe=Qe||"text";let Ze=await C[y.findKey(C,Qe)||"text"](Me,x);if(Vt&&!b&&!be){let ee;if(Ze!=null&&(typeof Ze.byteLength=="number"?ee=Ze.byteLength:typeof Ze.size=="number"?ee=Ze.size:typeof Ze=="string"&&(ee=typeof o=="function"?new o().encode(Ze).byteLength:Ze.length)),typeof ee=="number"&&ee>Ye)throw new z("maxContentLength size of "+Ye+" exceeded",z.ERR_BAD_RESPONSE,x,we)}return!be&&j&&j(),await new Promise((ee,Ie)=>{ps(ee,Ie,{data:Ze,headers:He.from(Me.headers),status:Me.status,statusText:Me.statusText,config:x,request:we})})}catch(se){if(j&&j(),nt&&nt.aborted&&nt.reason instanceof z){const je=nt.reason;throw je.config=x,we&&(je.request=we),se!==je&&Object.defineProperty(je,"cause",{__proto__:null,value:se,writable:!0,enumerable:!1,configurable:!0}),je}if(Tt)throw we&&!Tt.request&&(Tt.request=we),Tt;if(se instanceof z)throw we&&!se.request&&(se.request=we),se;if(se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)){const je=new z("Network Error",z.ERR_NETWORK,x,we,se&&se.response);throw Object.defineProperty(je,"cause",{__proto__:null,value:se.cause||se,writable:!0,enumerable:!1,configurable:!0}),je}throw z.from(se,se&&se.code,x,we,se&&se.response)}}},Qd=new Map,$s=n=>{let e=n&&n.env||{};const{fetch:i,Request:o,Response:r}=e,s=[o,r,i];let a=s.length,d=a,c,u,f=Qd;for(;d--;)c=s[d],u=f.get(c),u===void 0&&f.set(c,u=d?new Map:Gd(e)),f=u;return u};$s();const Ao={http:fd,xhr:Fd,fetch:{get:$s}};y.forEach(Ao,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:e})}});const Ns=n=>`- ${n}`,Yd=n=>y.isFunction(n)||n===null||n===!1;function Xd(n,e){n=y.isArray(n)?n:[n];const{length:i}=n;let o,r;const s={};for(let a=0;a<i;a++){o=n[a];let d;if(r=o,!Yd(o)&&(r=Ao[(d=String(o)).toLowerCase()],r===void 0))throw new z(`Unknown adapter '${d}'`);if(r&&(y.isFunction(r)||(r=r.get(e))))break;s[d||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let d=i?a.length>1?`since :
17
- `+a.map(Ns).join(`
18
- `):" "+Ns(a[0]):"as no adapter specified";throw new z("There is no suitable adapter to dispatch the request "+d,z.ERR_NOT_SUPPORT)}return r}const Ms={getAdapter:Xd,adapters:Ao};function zo(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Zn(null,n)}function Is(n){return zo(n),n.headers=He.from(n.headers),n.data=Po.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ms.getAdapter(n.adapter||Xn.adapter,n)(n).then(function(o){zo(n),n.response=o;try{o.data=Po.call(n,n.transformResponse,o)}finally{delete n.response}return o.headers=He.from(o.headers),o},function(o){if(!ms(o)&&(zo(n),o&&o.response)){n.response=o.response;try{o.response.data=Po.call(n,n.transformResponse,o.response)}finally{delete n.response}o.response.headers=He.from(o.response.headers)}return Promise.reject(o)})}const zi={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{zi[n]=function(o){return typeof o===n||"a"+(e<1?"n ":" ")+n}});const Vs={};zi.transitional=function(e,i,o){function r(s,a){return"[Axios v"+vo+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,d)=>{if(e===!1)throw new z(r(a," has been removed"+(i?" in "+i:"")),z.ERR_DEPRECATED);return i&&!Vs[a]&&(Vs[a]=!0,console.warn(r(a," has been deprecated since v"+i+" and will be removed in the near future"))),e?e(s,a,d):!0}},zi.spelling=function(e){return(i,o)=>(console.warn(`${o} is likely a misspelling of ${e}`),!0)};function Zd(n,e,i){if(typeof n!="object"||n===null)throw new z("options must be an object",z.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let r=o.length;for(;r-- >0;){const s=o[r],a=Object.prototype.hasOwnProperty.call(e,s)?e[s]:void 0;if(a){const d=n[s],c=d===void 0||a(d,s,n);if(c!==!0)throw new z("option "+s+" must be "+c,z.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new z("Unknown option "+s,z.ERR_BAD_OPTION)}}const Di={assertOptions:Zd,validators:zi},Ue=Di.validators;let on=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ds,response:new ds}}async request(e,i){try{return await this._request(e,i)}catch(o){if(o instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=(()=>{if(!r.stack)return"";const a=r.stack.indexOf(`
14
+ ***************************************************************************** */var Ur;(function(n){(function(e){var i=typeof globalThis=="object"?globalThis:typeof Hr=="object"?Hr:typeof self=="object"?self:typeof this=="object"?this:d(),o=r(n);typeof i.Reflect<"u"&&(o=r(i.Reflect,o)),e(o,i),typeof i.Reflect>"u"&&(i.Reflect=n);function r(c,u){return function(f,h){Object.defineProperty(c,f,{configurable:!0,writable:!0,value:h}),u&&u(f,h)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function d(){return s()||a()}})(function(e,i){var o=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",d=typeof Object.create=="function",c={__proto__:[]}instanceof Array,u=!d&&!c,f={create:d?function(){return fi(Object.create(null))}:c?function(){return fi({__proto__:null})}:function(){return fi({})},has:u?function(k,$){return o.call(k,$)}:function(k,$){return $ in k},get:u?function(k,$){return o.call(k,$)?k[$]:void 0}:function(k,$){return k[$]}},h=Object.getPrototypeOf(Function),m=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Un(),S=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:$r(),w=typeof WeakMap=="function"?WeakMap:Nr(),E=r?Symbol.for("@reflect-metadata:registry"):void 0,B=uo(),x=Er(B);function N(k,$,M,A){if(j(M)){if(!_t(k))throw new TypeError;if(!hn($))throw new TypeError;return ke(k,$)}else{if(!_t(k))throw new TypeError;if(!ge($))throw new TypeError;if(!ge(A)&&!j(A)&&!Le(A))throw new TypeError;return Le(A)&&(A=void 0),M=Xe(M),fn(k,$,M,A)}}e("decorate",N);function C(k,$){function M(A,Y){if(!ge(A))throw new TypeError;if(!j(Y)&&!be(Y))throw new TypeError;mt(k,$,A,Y)}return M}e("metadata",C);function P(k,$,M,A){if(!ge(M))throw new TypeError;return j(A)||(A=Xe(A)),mt(k,$,M,A)}e("defineMetadata",P);function D(k,$,M){if(!ge($))throw new TypeError;return j(M)||(M=Xe(M)),Ye(k,$,M)}e("hasMetadata",D);function Z(k,$,M){if(!ge($))throw new TypeError;return j(M)||(M=Xe(M)),Nt(k,$,M)}e("hasOwnMetadata",Z);function K(k,$,M){if(!ge($))throw new TypeError;return j(M)||(M=Xe(M)),Mt(k,$,M)}e("getMetadata",K);function fe(k,$,M){if(!ge($))throw new TypeError;return j(M)||(M=Xe(M)),Ot(k,$,M)}e("getOwnMetadata",fe);function ht(k,$){if(!ge(k))throw new TypeError;return j($)||($=Xe($)),wt(k,$)}e("getMetadataKeys",ht);function Qe(k,$){if(!ge(k))throw new TypeError;return j($)||($=Xe($)),nt(k,$)}e("getOwnMetadataKeys",Qe);function Pe(k,$,M){if(!ge($))throw new TypeError;if(j(M)||(M=Xe(M)),!ge($))throw new TypeError;j(M)||(M=Xe(M));var A=pn($,M,!1);return j(A)?!1:A.OrdinaryDeleteMetadata(k,$,M)}e("deleteMetadata",Pe);function ke(k,$){for(var M=k.length-1;M>=0;--M){var A=k[M],Y=A($);if(!j(Y)&&!Le(Y)){if(!hn(Y))throw new TypeError;$=Y}}return $}function fn(k,$,M,A){for(var Y=k.length-1;Y>=0;--Y){var Ee=k[Y],Be=Ee($,M,A);if(!j(Be)&&!Le(Be)){if(!ge(Be))throw new TypeError;A=Be}}return A}function Ye(k,$,M){var A=Nt(k,$,M);if(A)return!0;var Y=bt($);return Le(Y)?!1:Ye(k,Y,M)}function Nt(k,$,M){var A=pn($,M,!1);return j(A)?!1:We(A.OrdinaryHasOwnMetadata(k,$,M))}function Mt(k,$,M){var A=Nt(k,$,M);if(A)return Ot(k,$,M);var Y=bt($);if(!Le(Y))return Mt(k,Y,M)}function Ot(k,$,M){var A=pn($,M,!1);if(!j(A))return A.OrdinaryGetOwnMetadata(k,$,M)}function mt(k,$,M,A){var Y=pn(M,A,!0);Y.OrdinaryDefineOwnMetadata(k,$,M,A)}function wt(k,$){var M=nt(k,$),A=bt(k);if(A===null)return M;var Y=wt(A,$);if(Y.length<=0)return M;if(M.length<=0)return Y;for(var Ee=new S,Be=[],ne=0,F=M;ne<F.length;ne++){var _=F[ne],L=Ee.has(_);L||(Ee.add(_),Be.push(_))}for(var U=0,te=Y;U<te.length;U++){var _=te[U],L=Ee.has(_);L||(Ee.add(_),Be.push(_))}return Be}function nt(k,$){var M=pn(k,$,!1);return M?M.OrdinaryOwnMetadataKeys(k,$):[]}function we(k){if(k===null)return 1;switch(typeof k){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return k===null?1:6;default:return 6}}function j(k){return k===void 0}function Le(k){return k===null}function It(k){return typeof k=="symbol"}function ge(k){return typeof k=="object"?k!==null:typeof k=="function"}function se(k,$){switch(we(k)){case 0:return k;case 1:return k;case 2:return k;case 3:return k;case 4:return k;case 5:return k}var M="string",A=ee(k,s);if(A!==void 0){var Y=A.call(k,M);if(ge(Y))throw new TypeError;return Y}return je(k)}function je(k,$){var M,A;{var Y=k.toString;if(Me(Y)){var A=Y.call(k);if(!ge(A))return A}var M=k.valueOf;if(Me(M)){var A=M.call(k);if(!ge(A))return A}}throw new TypeError}function We(k){return!!k}function Hn(k){return""+k}function Xe(k){var $=se(k);return It($)?$:Hn($)}function _t(k){return Array.isArray?Array.isArray(k):k instanceof Object?k instanceof Array:Object.prototype.toString.call(k)==="[object Array]"}function Me(k){return typeof k=="function"}function hn(k){return typeof k=="function"}function be(k){switch(we(k)){case 3:return!0;case 4:return!0;default:return!1}}function Ze(k,$){return k===$||k!==k&&$!==$}function ee(k,$){var M=k[$];if(M!=null){if(!Me(M))throw new TypeError;return M}}function Ie(k){var $=ee(k,a);if(!Me($))throw new TypeError;var M=$.call(k);if(!ge(M))throw new TypeError;return M}function rt(k){return k.value}function st(k){var $=k.next();return $.done?!1:$}function mn(k){var $=k.return;$&&$.call(k)}function bt(k){var $=Object.getPrototypeOf(k);if(typeof k!="function"||k===h||$!==h)return $;var M=k.prototype,A=M&&Object.getPrototypeOf(M);if(A==null||A===Object.prototype)return $;var Y=A.constructor;return typeof Y!="function"||Y===k?$:Y}function Vt(){var k;!j(E)&&typeof i.Reflect<"u"&&!(E in i.Reflect)&&typeof i.Reflect.defineMetadata=="function"&&(k=Br(i.Reflect));var $,M,A,Y=new w,Ee={registerProvider:Be,getProvider:F,setProvider:L};return Ee;function Be(U){if(!Object.isExtensible(Ee))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case k===U:break;case j($):$=U;break;case $===U:break;case j(M):M=U;break;case M===U:break;default:A===void 0&&(A=new S),A.add(U);break}}function ne(U,te){if(!j($)){if($.isProviderFor(U,te))return $;if(!j(M)){if(M.isProviderFor(U,te))return $;if(!j(A))for(var he=Ie(A);;){var ye=st(he);if(!ye)return;var at=rt(ye);if(at.isProviderFor(U,te))return mn(he),at}}}if(!j(k)&&k.isProviderFor(U,te))return k}function F(U,te){var he=Y.get(U),ye;return j(he)||(ye=he.get(te)),j(ye)&&(ye=ne(U,te),j(ye)||(j(he)&&(he=new m,Y.set(U,he)),he.set(te,ye))),ye}function _(U){if(j(U))throw new TypeError;return $===U||M===U||!j(A)&&A.has(U)}function L(U,te,he){if(!_(he))throw new Error("Metadata provider not registered.");var ye=F(U,te);if(ye!==he){if(!j(ye))return!1;var at=Y.get(U);j(at)&&(at=new m,Y.set(U,at)),at.set(te,he)}return!0}}function uo(){var k;return!j(E)&&ge(i.Reflect)&&Object.isExtensible(i.Reflect)&&(k=i.Reflect[E]),j(k)&&(k=Vt()),!j(E)&&ge(i.Reflect)&&Object.isExtensible(i.Reflect)&&Object.defineProperty(i.Reflect,E,{enumerable:!1,configurable:!1,writable:!1,value:k}),k}function Er(k){var $=new w,M={isProviderFor:function(_,L){var U=$.get(_);return j(U)?!1:U.has(L)},OrdinaryDefineOwnMetadata:Be,OrdinaryHasOwnMetadata:Y,OrdinaryGetOwnMetadata:Ee,OrdinaryOwnMetadataKeys:ne,OrdinaryDeleteMetadata:F};return B.registerProvider(M),M;function A(_,L,U){var te=$.get(_),he=!1;if(j(te)){if(!U)return;te=new m,$.set(_,te),he=!0}var ye=te.get(L);if(j(ye)){if(!U)return;if(ye=new m,te.set(L,ye),!k.setProvider(_,L,M))throw te.delete(L),he&&$.delete(_),new Error("Wrong provider for target.")}return ye}function Y(_,L,U){var te=A(L,U,!1);return j(te)?!1:We(te.has(_))}function Ee(_,L,U){var te=A(L,U,!1);if(!j(te))return te.get(_)}function Be(_,L,U,te){var he=A(U,te,!0);he.set(_,L)}function ne(_,L){var U=[],te=A(_,L,!1);if(j(te))return U;for(var he=te.keys(),ye=Ie(he),at=0;;){var fo=st(ye);if(!fo)return U.length=at,U;var pt=rt(fo);try{U[at]=pt}catch(Mr){try{mn(ye)}finally{throw Mr}}at++}}function F(_,L,U){var te=A(L,U,!1);if(j(te)||!te.delete(_))return!1;if(te.size===0){var he=$.get(L);j(he)||(he.delete(U),he.size===0&&$.delete(he))}return!0}}function Br(k){var $=k.defineMetadata,M=k.hasOwnMetadata,A=k.getOwnMetadata,Y=k.getOwnMetadataKeys,Ee=k.deleteMetadata,Be=new w,ne={isProviderFor:function(F,_){var L=Be.get(F);return!j(L)&&L.has(_)?!0:Y(F,_).length?(j(L)&&(L=new S,Be.set(F,L)),L.add(_),!0):!1},OrdinaryDefineOwnMetadata:$,OrdinaryHasOwnMetadata:M,OrdinaryGetOwnMetadata:A,OrdinaryOwnMetadataKeys:Y,OrdinaryDeleteMetadata:Ee};return ne}function pn(k,$,M){var A=B.getProvider(k,$);if(!j(A))return A;if(M){if(B.setProvider(k,$,x))return x;throw new Error("Illegal state.")}}function Un(){var k={},$=[],M=function(){function ne(F,_,L){this._index=0,this._keys=F,this._values=_,this._selector=L}return ne.prototype["@@iterator"]=function(){return this},ne.prototype[a]=function(){return this},ne.prototype.next=function(){var F=this._index;if(F>=0&&F<this._keys.length){var _=this._selector(this._keys[F],this._values[F]);return F+1>=this._keys.length?(this._index=-1,this._keys=$,this._values=$):this._index++,{value:_,done:!1}}return{value:void 0,done:!0}},ne.prototype.throw=function(F){throw this._index>=0&&(this._index=-1,this._keys=$,this._values=$),F},ne.prototype.return=function(F){return this._index>=0&&(this._index=-1,this._keys=$,this._values=$),{value:F,done:!0}},ne}(),A=function(){function ne(){this._keys=[],this._values=[],this._cacheKey=k,this._cacheIndex=-2}return Object.defineProperty(ne.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),ne.prototype.has=function(F){return this._find(F,!1)>=0},ne.prototype.get=function(F){var _=this._find(F,!1);return _>=0?this._values[_]:void 0},ne.prototype.set=function(F,_){var L=this._find(F,!0);return this._values[L]=_,this},ne.prototype.delete=function(F){var _=this._find(F,!1);if(_>=0){for(var L=this._keys.length,U=_+1;U<L;U++)this._keys[U-1]=this._keys[U],this._values[U-1]=this._values[U];return this._keys.length--,this._values.length--,Ze(F,this._cacheKey)&&(this._cacheKey=k,this._cacheIndex=-2),!0}return!1},ne.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=k,this._cacheIndex=-2},ne.prototype.keys=function(){return new M(this._keys,this._values,Y)},ne.prototype.values=function(){return new M(this._keys,this._values,Ee)},ne.prototype.entries=function(){return new M(this._keys,this._values,Be)},ne.prototype["@@iterator"]=function(){return this.entries()},ne.prototype[a]=function(){return this.entries()},ne.prototype._find=function(F,_){if(!Ze(this._cacheKey,F)){this._cacheIndex=-1;for(var L=0;L<this._keys.length;L++)if(Ze(this._keys[L],F)){this._cacheIndex=L;break}}return this._cacheIndex<0&&_&&(this._cacheIndex=this._keys.length,this._keys.push(F),this._values.push(void 0)),this._cacheIndex},ne}();return A;function Y(ne,F){return ne}function Ee(ne,F){return F}function Be(ne,F){return[ne,F]}}function $r(){var k=function(){function $(){this._map=new m}return Object.defineProperty($.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),$.prototype.has=function(M){return this._map.has(M)},$.prototype.add=function(M){return this._map.set(M,M),this},$.prototype.delete=function(M){return this._map.delete(M)},$.prototype.clear=function(){this._map.clear()},$.prototype.keys=function(){return this._map.keys()},$.prototype.values=function(){return this._map.keys()},$.prototype.entries=function(){return this._map.entries()},$.prototype["@@iterator"]=function(){return this.keys()},$.prototype[a]=function(){return this.keys()},$}();return k}function Nr(){var k=16,$=f.create(),M=A();return function(){function F(){this._key=A()}return F.prototype.has=function(_){var L=Y(_,!1);return L!==void 0?f.has(L,this._key):!1},F.prototype.get=function(_){var L=Y(_,!1);return L!==void 0?f.get(L,this._key):void 0},F.prototype.set=function(_,L){var U=Y(_,!0);return U[this._key]=L,this},F.prototype.delete=function(_){var L=Y(_,!1);return L!==void 0?delete L[this._key]:!1},F.prototype.clear=function(){this._key=A()},F}();function A(){var F;do F="@@WeakMap@@"+ne();while(f.has($,F));return $[F]=!0,F}function Y(F,_){if(!o.call(F,M)){if(!_)return;Object.defineProperty(F,M,{value:f.create()})}return F[M]}function Ee(F,_){for(var L=0;L<_;++L)F[L]=Math.random()*255|0;return F}function Be(F){if(typeof Uint8Array=="function"){var _=new Uint8Array(F);return typeof crypto<"u"?crypto.getRandomValues(_):typeof msCrypto<"u"?msCrypto.getRandomValues(_):Ee(_,F),_}return Ee(new Array(F),F)}function ne(){var F=Be(k);F[6]=F[6]&79|64,F[8]=F[8]&191|128;for(var _="",L=0;L<k;++L){var U=F[L];(L===4||L===6||L===8)&&(_+="-"),U<16&&(_+="0"),_+=U.toString(16).toLowerCase()}return _}}function fi(k){return k.__=void 0,delete k.__,k}})})(Ur||(Ur={}));const ze=[];for(let n=0;n<256;++n)ze.push((n+256).toString(16).slice(1));function Jl(n,e=0){return(ze[n[e+0]]+ze[n[e+1]]+ze[n[e+2]]+ze[n[e+3]]+"-"+ze[n[e+4]]+ze[n[e+5]]+"-"+ze[n[e+6]]+ze[n[e+7]]+"-"+ze[n[e+8]]+ze[n[e+9]]+"-"+ze[n[e+10]]+ze[n[e+11]]+ze[n[e+12]]+ze[n[e+13]]+ze[n[e+14]]+ze[n[e+15]]).toLowerCase()}const Kl=new Uint8Array(16);function ec(){return crypto.getRandomValues(Kl)}function Lt(n,e,i){return crypto.randomUUID?crypto.randomUUID():tc(n)}function tc(n,e,i){var r;n=n||{};const o=n.random??((r=n.rng)==null?void 0:r.call(n))??ec();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Jl(o)}class De{static UUID(){return Lt()}static GUID(){const e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}function nc(n){var e=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var i=n.shift();n[0]=i+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<n.length;o++){var r=n[o];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(o>0&&(r=r.replace(/^[\/]+/,"")),o<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),e.push(r))}var s=e.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function bo(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),nc(n)}class re{static Capitalize(e){return e?e[0].toUpperCase()+e.slice(1):""}static BuildSafeUrl(e,i,o){try{const r=new URL(e);return i&&(r.port=i.toString()),bo(r.toString(),o)}catch{throw new Error(`Invalid host URL: ${e}`)}}static ToCamelCase(e){const i=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return e.match(i).map((r,s)=>s===0?r.toLowerCase():re.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(e,i,o){return e.substring(e.indexOf(i)+2,e.lastIndexOf(o))}static Translit(e,i){const o={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return i&&/[а-яА-Я]/g.test(e)?e.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(o).find(d=>o[d]===r);return a||""}const s=Object.keys(o).find(a=>o[a]===r.toLowerCase());return s?s.toUpperCase():""}):e.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?o[r]:o[r.toLowerCase()].toUpperCase())}static RemoveEmoji(e){const i=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return e.replace(i,"")}static CanBeTranslited(e){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(e)}static StringsEquals(e,i){const o=e.toLowerCase().replaceAll(/\s/g,""),r=i.toLowerCase().replaceAll(/\s/g,""),s=re.Translit(o),a=re.Translit(r);return o.includes(r)||s.includes(r)||o.includes(a)}static SearchIn(e,i){return re.StringsEquals(e,i)}static SearchInFields(e,i){let o=!1;for(let r=0;r<i.length;r++)if(re.SearchIn(i[r],e)){o=!0;break}return o}static FormatToPercentage(e){return`${e}%`}static ApplyClassToSubStr(e,i,o){const r=o??"highlight-text",s=new RegExp(re.GetVariants(i).join("|"),"gi");return e.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(e){const i=re.Translit(e);return[e,re.Capitalize(e),e.toLowerCase(),e.toUpperCase(),i,re.Capitalize(i),i.toLowerCase(),i.toUpperCase()]}static ContainsNum(e){return/\d/.test(e)}static JoinSnake(...e){return e.join("_")}static GetDynamicCountName(e,i){const o=[2,0,1,1,1,2];return e.length+" "+i[e.length%100>4&&e.length%100<20?2:o[e.length%10<5?e.length%10:5]]}static TrimText(e){return typeof e=="string"?e.trim():e}}const Qt=class Qt{static BuildClass(e,i){i&&Object.keys(i).forEach(o=>{const r=i[o];if(this.isPrimitive(r))e[o]instanceof Date?e[o]=new Date(r):e[o]=r;else if(r!=null&&!Array.isArray(r))if(e[o]&&e[o].constructor)e[o]=new e[o].constructor(r);else{const s=Reflect.getMetadata(o,e);s&&(e[o]=new s[o](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(o,e);r.length!==0&&!s&&(e[o]=r),s&&(e[o]=r.map(a=>new s[o](a)))}})}static isPrimitive(e){return e!==null&&typeof e<"u"&&e!==Object(e)}static RemoveFromClassByIndex(e,i,o){Qt.RemoveFromClass(e,i,o)}static RemoveFromClassById(e,i,o){if(!e)return;const r=i.findIndex(s=>s.id===e);Qt.RemoveFromClass(r,i,o)}static RemoveFromClass(e,i,o){if(e<0)return;const r=i[e].id;r&&o&&o.push(r),i.splice(e,1)}static GetPropertyName(e){const i=new e;return new Proxy(i,{get(o,r){return r}})}static InitClassInstance(e,i){const o=e.constructor(i);return Qt.BuildClass(o),o.id=De.UUID(),o}static ExistsWithId(e,i){return e.some(o=>o.id===i)}static DeepMap(e){return i=>Array.isArray(i)?i.map(Qt.DeepMap(e)):Object(i)===i?Object.fromEntries(Object.entries(i).map(([o,r])=>[o,Qt.DeepMap(e)(r)])):e(i)}static DeepTrim(e){return this.DeepMap(re.TrimText)(e)}};l(Qt,"GetClassConstructor",e=>(i,o)=>{const r=Reflect.getMetadata(`property:${o}`,i)||{};r[o]=e,Reflect.defineMetadata(o,r,i)});let O=Qt;class Zt{constructor(e){l(this,"id");l(this,"address");l(this,"description");l(this,"contactId");O.BuildClass(this,e)}static Create(){const e=new Zt;return e.id=De.UUID(),e}}class So{static Setup(e="http://localhost",i="9000",o="api"){this.staticUrl=re.BuildSafeUrl(e,i,o),this.staticUrl=bo(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}l(So,"staticUrl","");class Ge{constructor(e){l(this,"name","");l(this,"url","");l(this,"src","");l(this,"raw");l(this,"blob");l(this,"file");l(this,"type","");l(this,"id");l(this,"originalName","");l(this,"fileSystemPath","");l(this,"itemId");l(this,"itemOneId");l(this,"description","");l(this,"order",0);O.BuildClass(this,e)}getFileUrl(){const e=this.url?this.url:`${So.StaticUrl}/${this.fileSystemPath}`;return new URL(e,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:yn&&yn.tagName.toUpperCase()==="SCRIPT"&&yn.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(e,i){const o=new Ge;return o.id=i??De.UUID(),o.originalName=e.name,o.file=e.blob,o.fileSystemPath=De.UUID(),o}setFile(e){this.id||(this.id=De.UUID()),this.originalName=e.name,this.file=e,this.fileSystemPath=De.UUID(),this.url=e.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(e,i){if(e.target){let o="";return i&&(o=`@/assets/img/${i}`),new URL(o,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:yn&&yn.tagName.toUpperCase()==="SCRIPT"&&yn.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(e){const i=e.split(".");return i[i.length-1]}}class qr{constructor(e){l(this,"id");l(this,"name","");l(this,"surname","");l(this,"patronymic","");l(this,"isMale",!0);l(this,"dateBirth",new Date);l(this,"contactId");l(this,"slug","");l(this,"postIndex","");l(this,"address","");l(this,"editNameMode",!1);O.BuildClass(this,e)}setEditNameMode(e){this.editNameMode=e}getFullName(){return!this.surname.length&&!this.name.length&&!this.patronymic.length?"":`${this.surname} ${this.name} ${this.patronymic}`}getInitialsName(){return`${this.name.slice(0,1)}.${this.patronymic.slice(0,1)}. ${this.surname}`}getGender(e){return e?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=re.Capitalize(this.name),this.surname=re.Capitalize(this.surname),this.patronymic=re.Capitalize(this.patronymic)}trimName(){this.name=this.name.trim(),this.surname=this.surname.trim(),this.patronymic=this.patronymic.trim()}sanitizeName(){this.trimName(),this.capitalizeName()}setFullName(e){this.surname=e.surname,this.name=e.name,this.patronymic=e.patronymic}}class Jt{constructor(e){l(this,"id");l(this,"number");l(this,"description");l(this,"contactId");O.BuildClass(this,e)}static Create(){const e=new Jt;return e.id=De.UUID(),e}}class ki{constructor(e){l(this,"id");l(this,"address");l(this,"description");O.BuildClass(this,e)}}class xi{constructor(e){l(this,"id");l(this,"login","");l(this,"email","");l(this,"password","");O.BuildClass(this,e)}static Create(){const e=new xi;return e.id=De.UUID(),e}}class Co{constructor(e){l(this,"id");l(this,"address");l(this,"description");O.BuildClass(this,e)}}let ic=(Ft=class{},l(Ft,"Phone",Jt),l(Ft,"FileInfo",Ge),l(Ft,"Website",Co),l(Ft,"Email",Zt),l(Ft,"Human",qr),l(Ft,"PostAddress",ki),l(Ft,"UserAccount",xi),Ft);var Se=(n=>(n.Eq="=",n.Ne="!=",n.Gt=">",n.Lt="<",n.Btw="between",n.In="in",n.Like="like",n.Null="is null",n.NotNull="is not null",n))(Se||{});class Ei{constructor(e){l(this,"field","");l(this,"operator",Se.Eq);l(this,"value","");O.BuildClass(this,e)}setValue(e){this.value=e}static Create(e,i){return new Ei({operator:i,field:e})}eq(e){return this.field===e.field&&this.operator===e.operator}isUnary(){return this.operator===Se.Eq||this.operator===Se.Gt||this.operator===Se.Lt}isBetween(){return this.operator===Se.Btw}isSet(){return this.operator===Se.In}}class ko{constructor(e){l(this,"model","");l(this,"field","");l(this,"value","");l(this,"wheres",[]);O.BuildClass(this,e)}static Create(e){const i=new ko;return i.model=e.GetClassName(),i}eq(e){return e.model===this.model&&e.field===this.field}addWhere(e,i){const o=this.findWhere({field:e,operator:i});if(o)return o;const r=Ei.Create(e,i);return this.wheres.push(r),r}findWhere(e){return this.wheres.find(i=>i.eq(e))}}let jr=class Nl{constructor(e){l(this,"id");l(this,"model","");l(this,"wheres",[]);l(this,"joins",[]);O.BuildClass(this,e)}static Create(e){const i=new Nl;return i.model=e.GetClassName(),i}addWhere(e,i){const o=this.findWhere({field:e,operator:i});if(o)return o;const r=Ei.Create(e,i);return this.wheres.push(r),r}removeWhere(e){const i=this.wheres.findIndex(o=>o.eq(e));i>-1&&this.wheres.splice(i,1)}addJoin(e){const i=this.findJoin({model:e.GetClassName()});if(i)return i;const o=ko.Create(e);return this.joins.push(o),o}findJoin(e){return this.joins.find(i=>i.eq(e))}findWhere(e){return this.wheres.find(i=>i.eq(e))}toRef(){return t.ref(this)}};class Rt{static Shuffle(e){for(let i=e.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1));[e[i],e[o]]=[e[o],e[i]]}}static GenerateNumsRange(e,i,o=1){return Array.from({length:(i-e)/o+1},(r,s)=>e+s*o)}static GetLast(e){return e[e.length-1]}static GetFirst(e){return e[0]}static GetRandEL(e){return e[Math.floor(Math.random()*e.length)]}static Sort(e){e.forEach((i,o)=>i.order=o)}static Refill(e,i){e.splice(0,e.length),e.push(...i)}static Eq(e,i){return e.length===i.length&&(e==null?void 0:e.every((o,r)=>e[r]==i[r]))}static SwipeById(e,i,o){const r=e.findIndex(a=>i.id===a.id),s=e.findIndex(a=>o.id===a.id);r||s||([e[r],e[s]]=[e[s],e[r]])}static Swap(e,i,o){if(i<0||i>=e.length||o<0||o>=e.length)return;const r=e[i];e[i]=e[o],e[o]=r}static MoveUp(e,i){e[i].order=i-1,e[i-1]&&(e[i-1].order=i),[e[i],e[i-1]]=[e[i-1],e[i]]}static MoveDown(e,i){e[i].order=i+1,e[i+1]&&(e[i+1].order=i),[e[i],e[i+1]]=[e[i+1],e[i]]}}var Te=(n=>(n.Date="date",n.String="string",n.Boolean="boolean",n.Number="number",n.Set="set",n.Join="join",n.ArrayString="arrayString",n.ArrayNumber="arrayNumber",n))(Te||{}),oc=Object.defineProperty,rc=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&oc(e,i,r),r};const Wr=class pi{constructor(e){l(this,"id");l(this,"model","");l(this,"label","");l(this,"col","");l(this,"operator",Se.Eq);l(this,"date1");l(this,"date2");l(this,"value1","");l(this,"boolean",!1);l(this,"number",0);l(this,"type",Te.String);l(this,"set",[]);l(this,"isSet",!1);l(this,"joinTable","");l(this,"joinTableModel","");l(this,"joinTableFk","");l(this,"joinTablePk","");l(this,"joinTableId","");l(this,"joinTableIdCol","");O.BuildClass(this,e)}eq(e){if(!e)return!1;if(this.type===Te.Join){const i=e.model===this.model&&e.operator===this.operator&&this.joinTableModel===e.joinTableModel;return e.operator===Se.In?i&&Rt.Eq(this.set,e.set):i}return e.model===this.model&&e.col===this.col&&e.operator===this.operator}valueEq(e){return!this||!e||!this.eq(e)?!1:this.type===Te.Boolean?this.boolean===(e==null?void 0:e.boolean):this.type===Te.String?this.value1===(e==null?void 0:e.value1):this.type===Te.Join&&this.set.length?Rt.Eq(this.set,e.set):!1}toUrlQuery(){const e=this.type?`"type":"${this.type}"`:"",i=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Te.Boolean?`"boolean":${this.boolean}`:"",d=this.type===Te.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",c=this.type===Te.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Te.Number?`"number":${this.number}`:"",f=this.type===Te.Set||this.operator===Se.In?`"set":${JSON.stringify(this.set)}`:"",h=this.type===Te.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[e,i,o,r,s,a,d,c,u,f,h].filter(m=>m!=="").toString()}fromUrlQuery(e){this.model=e.get("model")??"",this.col=e.get("col")??"",this.label=e.get("label")??"",this.operator=e.get("operator")??"",this.value1=e.get("value1")??"",this.type=e.get("type")??"",this.boolean=!!(e.get("boolean")??""),this.joinTableModel=e.get("joinTableModel")??"",this.joinTableId=e.get("joinTableId")??"",this.joinTableFk=e.get("joinTableFk")??"",this.joinTableIdCol=e.get("joinTableIdCol")??"",this.joinTablePk=e.get("joinTablePk")??""}isUnaryFilter(){return this.operator===Se.Eq||this.operator===Se.Gt||this.operator===Se.Lt}isBetweenFilter(){return this.operator===Se.Btw}isSetFilter(){return this.operator===Se.In}static Create(e,i,o){const r=new pi;return r.model=e.GetClassName(),r.col=i??"",r.type=o,r.type===Te.Number&&(r.value1="0"),r.type===Te.String&&(r.value1=""),r.type===Te.Boolean&&(r.value1="false",r.operator=Se.Eq),r}static CreateFilterModelWithJoin(e,i,o,r,s,a,d,c){const u=new pi;return u.id=Lt(),u.joinTable=o,u.joinTablePk=r,u.joinTableFk=s,u.col=i,u.type=a,d&&(u.joinTableId=d),c&&(u.joinTableIdCol=c),u}static CreateFilterModelWithJoinV2(e,i,o,r,s,a,d){const c=new pi;return c.model=e,c.joinTableModel=o,c.joinTablePk=r,c.joinTableFk=s,c.col=i,c.type=Te.Join,a&&(c.joinTableId=a),d&&(c.joinTableIdCol=d),c}static OnlyIfSecondModelExists(e,i){const o=new pi;return o.id=Lt(),o.model=re.ToCamelCase(e.GetClassName()),o.joinTableModel=re.ToCamelCase(i.GetClassName()),o.type=Te.Join,o}addToSet(...e){e.forEach(i=>{if(this.set.indexOf(i)===-1){this.set.push(i);return}this.set=this.set.filter(o=>o!==i)})}pushToSet(...e){e.forEach(i=>{this.set.indexOf(i)===-1&&this.set.push(i)})}replaceSet(...e){this.set=e}setBoolean(e){this.boolean=e}toRef(){return t.ref(this)}setDate1(e){this.date1=e}setDate2(e){this.date2=e}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(e,i){if(!e&&!i){this.dropDates();return}if(!i){this.setDate1(e),this.operator=Se.Eq;return}this.setDate2(i),this.operator=Se.Btw}};rc([O.GetClassConstructor(String)],Wr.prototype,"set");let xo=Wr;class sc{constructor(){l(this,"operation",Se.Lt);l(this,"column","");l(this,"value");l(this,"initial",!0);l(this,"tableName","");l(this,"version","");l(this,"model","")}toUrlQuery(){const e=this.operation?`"operation":"${this.operation}"`:"",i=this.column?`"column":"${this.column}"`:"",o=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=o?`"value":"${o}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[e,i,r,s,a].filter(d=>d!=="").toString()}fromUrlQuery(e){e.cursvalue&&(this.value=e.cursvalue),e.curscolumn&&(this.column=String(e.curscolumn)),e.cursinitial!==void 0&&(this.initial=!!e.cursinitial),e.curstableName&&(this.tableName=String(e.curstableName)),e.cursoperation&&(this.operation=e.cursoperation)}}class Bi{constructor(e){l(this,"page",0);l(this,"rowsPerPage",25);l(this,"rowsNumber",0);l(this,"cursor",new sc);l(this,"cursorMode",!1);l(this,"append",!1);l(this,"allLoaded",!1);l(this,"version","");O.BuildClass(this,e)}setLoadMore(e,i,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=i,this.cursor.tableName=o,this.cursorMode=!0}setLoadMoreV2(e,i,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=i,this.cursor.model=o,this.cursorMode=!0,this.version="v2"}setOffset(e){this.page=e}toUrlQuery(){const e=`"offset":${this.offset}`,i=`"limit":${this.limit}`,o=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[e,i,o,r,s,a].toString()}fromUrlQuery(){const e=window.location.search,i=e.substring(e.indexOf("p=")+2,e.lastIndexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.page=Number(o.get("offset")),this.rowsPerPage=Number(o.get("col"))}setAllLoaded(e){this.allLoaded=!(e>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,O.BuildClass(this)}}var ct=(n=>(n.Asc="asc",n.Desc="desc",n))(ct||{});class $i{constructor(e){l(this,"model","");l(this,"col","");l(this,"order");l(this,"label","");l(this,"default",!1);l(this,"selected",!1);O.BuildClass(this,e)}static Create(e,i,o=ct.Asc,r,s){const a=new $i;return a.model=e.GetClassName(),a.col=i??"",a.order=o??ct.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===ct.Asc}isDesc(){return this.order===ct.Desc}eq(e){return e.model===this.model&&e.col===this.col&&e.order===this.order}toUrlQuery(){const e=this.model?`"model":"${this.model}"`:"",i=this.col?`"col":"${this.col}"`:"",o=this.order?`"order":"${this.order}"`:"";return[e,i,o].toString()}async fromUrlQuery(){const e=window.location.search,i=e.substring(e.indexOf("s=")+2,e.indexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.model=o.get("model")??"",this.col=o.get("col")??"",this.label=o.get("label")??"",this.default=!!o.get("default"),this.order=o.get("order")??""}asc(){this.order=ct.Asc}desc(){this.order=ct.Desc}}class Ni{constructor(){l(this,"model","");l(this,"cols",[]);l(this,"models",[])}static Create(e,i){const o=new Ni;return o.model=e.GetClassName(),o.cols=i,o}}var ac=Object.defineProperty,jn=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&ac(e,i,r),r};const Cn=(tt=class{constructor(e){l(this,"id");l(this,"f",[]);l(this,"f2",[]);l(this,"s",[]);l(this,"p",new Bi);l(this,"t",new Ni);O.BuildClass(this,e)}static Get(){return this.instance||(this.instance=new tt),this.instance}createFrom(e){const i=new tt(JSON.parse(e));this.f=i.f}clearForHTTP(){const e=new tt(this);return e.f=this.f.map(i=>tt.EmptyEntiries(i)),e.f2=this.f2.map(i=>tt.EmptyEntiries(i)),e.s=this.s.map(i=>tt.EmptyEntiries(i)),e.p=tt.EmptyEntiries(this.p),e.t=tt.EmptyEntiries(this.t),e}static EmptyEntiries(e){if(!e)return;const o=Object.entries(e).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(o)}findFilterModel(e){return this.f.find(i=>e.id===i.id)}getFirstSortModel(){return Rt.GetLast(this.s)}setSortModel(e){e&&(this.s[0]=e)}setS(e){this.s[0]=e}setF(e){this.f.push(e)}setF2(e){this.f2.push(e)}replaceF(e,i){this.removeF(i),e&&this.setF(e)}removeF(e){const i=this.f.findIndex(o=>o.eq(e));O.RemoveFromClassByIndex(i,this.f)}reset(){this.f=[],this.s=[],this.p=new Bi}resetF(){this.f=[]}},l(tt,"instance"),tt);jn([O.GetClassConstructor(xo)],Cn.prototype,"f"),jn([O.GetClassConstructor(jr)],Cn.prototype,"f2"),jn([O.GetClassConstructor($i)],Cn.prototype,"s"),jn([O.GetClassConstructor(Bi)],Cn.prototype,"p"),jn([O.GetClassConstructor(Ni)],Cn.prototype,"t");let Pt=Cn,lc=(Ln=class{},l(Ln,"SortModel",$i),l(Ln,"FilterModel",xo),l(Ln,"FilterModelV2",jr),l(Ln,"FTSP",Pt),Ln);function Gr(n,e){return function(){return n.apply(e,arguments)}}const{toString:cc}=Object.prototype,{getPrototypeOf:kn}=Object,{iterator:Wn,toStringTag:Qr}=Symbol,Mi=(({hasOwnProperty:n})=>(e,i)=>n.call(e,i))(Object.prototype),Gn=(n,e)=>{let i=n;const o=[];for(;i!=null&&i!==Object.prototype;){if(o.indexOf(i)!==-1)return!1;if(o.push(i),Mi(i,e))return!0;i=kn(i)}return!1},dc=(n,e)=>n!=null&&Gn(n,e)?n[e]:void 0,Eo=(n=>e=>{const i=cc.call(e);return n[i]||(n[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),gt=n=>(n=n.toLowerCase(),e=>Eo(e)===n),Ii=n=>e=>typeof e===n,{isArray:Kt}=Array,xn=Ii("undefined");function En(n){return n!==null&&!xn(n)&&n.constructor!==null&&!xn(n.constructor)&&Je(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Yr=gt("ArrayBuffer");function uc(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Yr(n.buffer),e}const fc=Ii("string"),Je=Ii("function"),Xr=Ii("number"),Bn=n=>n!==null&&typeof n=="object",hc=n=>n===!0||n===!1,Vi=n=>{if(!Bn(n))return!1;const e=kn(n);return(e===null||e===Object.prototype||kn(e)===null)&&!Gn(n,Qr)&&!Gn(n,Wn)},mc=n=>{if(!Bn(n)||En(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},pc=gt("Date"),gc=gt("File"),yc=n=>!!(n&&typeof n.uri<"u"),wc=n=>n&&typeof n.getParts<"u",bc=gt("Blob"),Sc=gt("FileList"),Cc=n=>Bn(n)&&Je(n.pipe);function kc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Zr=kc(),Jr=typeof Zr.FormData<"u"?Zr.FormData:void 0,xc=n=>{if(!n)return!1;if(Jr&&n instanceof Jr)return!0;const e=kn(n);if(!e||e===Object.prototype||!Je(n.append))return!1;const i=Eo(n);return i==="formdata"||i==="object"&&Je(n.toString)&&n.toString()==="[object FormData]"},Ec=gt("URLSearchParams"),[Bc,$c,Nc,Mc]=["ReadableStream","Request","Response","Headers"].map(gt),Ic=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qn(n,e,{allOwnKeys:i=!1}={}){if(n===null||typeof n>"u")return;let o,r;if(typeof n!="object"&&(n=[n]),Kt(n))for(o=0,r=n.length;o<r;o++)e.call(null,n[o],o,n);else{if(En(n))return;const s=i?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let d;for(o=0;o<a;o++)d=s[o],e.call(null,n[d],d,n)}}function Kr(n,e){if(En(n))return null;e=e.toLowerCase();const i=Object.keys(n);let o=i.length,r;for(;o-- >0;)if(r=i[o],e===r.toLowerCase())return r;return null}const en=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,es=n=>!xn(n)&&n!==en;function Bo(...n){const{caseless:e,skipUndefined:i}=es(this)&&this||{},o={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const d=e&&typeof a=="string"&&Kr(o,a)||a,c=Mi(o,d)?o[d]:void 0;Vi(c)&&Vi(s)?o[d]=Bo(c,s):Vi(s)?o[d]=Bo({},s):Kt(s)?o[d]=s.slice():(!i||!xn(s))&&(o[d]=s)};for(let s=0,a=n.length;s<a;s++){const d=n[s];if(!d||En(d)||(Qn(d,r),typeof d!="object"||Kt(d)))continue;const c=Object.getOwnPropertySymbols(d);for(let u=0;u<c.length;u++){const f=c[u];Lc.call(d,f)&&r(d[f],f)}}return o}const Vc=(n,e,i,{allOwnKeys:o}={})=>(Qn(e,(r,s)=>{i&&Je(r)?Object.defineProperty(n,s,{__proto__:null,value:Gr(r,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),n),Tc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Rc=(n,e,i,o)=>{n.prototype=Object.create(e.prototype,o),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:e.prototype}),i&&Object.assign(n.prototype,i)},Pc=(n,e,i,o)=>{let r,s,a;const d={};if(e=e||{},n==null)return e;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!o||o(a,n,e))&&!d[a]&&(e[a]=n[a],d[a]=!0);n=i!==!1&&kn(n)}while(n&&(!i||i(n,e))&&n!==Object.prototype);return e},vc=(n,e,i)=>{n=String(n),(i===void 0||i>n.length)&&(i=n.length),i-=e.length;const o=n.indexOf(e,i);return o!==-1&&o===i},Ac=n=>{if(!n)return null;if(Kt(n))return n;let e=n.length;if(!Xr(e))return null;const i=new Array(e);for(;e-- >0;)i[e]=n[e];return i},zc=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&kn(Uint8Array)),Dc=(n,e)=>{const o=(n&&n[Wn]).call(n);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(n,s[0],s[1])}},Fc=(n,e)=>{let i;const o=[];for(;(i=n.exec(e))!==null;)o.push(i);return o},Oc=gt("HTMLFormElement"),_c=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,o,r){return o.toUpperCase()+r}),{propertyIsEnumerable:Lc}=Object.prototype,Hc=gt("RegExp"),ts=(n,e)=>{const i=Object.getOwnPropertyDescriptors(n),o={};Qn(i,(r,s)=>{let a;(a=e(r,s,n))!==!1&&(o[s]=a||r)}),Object.defineProperties(n,o)},Uc=n=>{ts(n,(e,i)=>{if(Je(n)&&["arguments","caller","callee"].includes(i))return!1;const o=n[i];if(Je(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},qc=(n,e)=>{const i={},o=r=>{r.forEach(s=>{i[s]=!0})};return Kt(n)?o(n):o(String(n).split(e)),i},jc=()=>{},Wc=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function Gc(n){return!!(n&&Je(n.append)&&n[Qr]==="FormData"&&n[Wn])}const Qc=n=>{const e=new WeakSet,i=o=>{if(Bn(o)){if(e.has(o))return;if(En(o))return o;if(!("toJSON"in o)){e.add(o);const r=Kt(o)?[]:{};return Qn(o,(s,a)=>{const d=i(s);!xn(d)&&(r[a]=d)}),e.delete(o),r}}return o};return i(n)},Yc=gt("AsyncFunction"),Xc=n=>n&&(Bn(n)||Je(n))&&Je(n.then)&&Je(n.catch),ns=((n,e)=>n?setImmediate:e?((i,o)=>(en.addEventListener("message",({source:r,data:s})=>{r===en&&s===i&&o.length&&o.shift()()},!1),r=>{o.push(r),en.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Je(en.postMessage)),Zc=typeof queueMicrotask<"u"?queueMicrotask.bind(en):typeof process<"u"&&process.nextTick||ns,is=n=>n!=null&&Je(n[Wn]),y={isArray:Kt,isArrayBuffer:Yr,isBuffer:En,isFormData:xc,isArrayBufferView:uc,isString:fc,isNumber:Xr,isBoolean:hc,isObject:Bn,isPlainObject:Vi,isEmptyObject:mc,isReadableStream:Bc,isRequest:$c,isResponse:Nc,isHeaders:Mc,isUndefined:xn,isDate:pc,isFile:gc,isReactNativeBlob:yc,isReactNative:wc,isBlob:bc,isRegExp:Hc,isFunction:Je,isStream:Cc,isURLSearchParams:Ec,isTypedArray:zc,isFileList:Sc,forEach:Qn,merge:Bo,extend:Vc,trim:Ic,stripBOM:Tc,inherits:Rc,toFlatObject:Pc,kindOf:Eo,kindOfTest:gt,endsWith:vc,toArray:Ac,forEachEntry:Dc,matchAll:Fc,isHTMLForm:Oc,hasOwnProperty:Mi,hasOwnProp:Mi,hasOwnInPrototypeChain:Gn,getSafeProp:dc,reduceDescriptors:ts,freezeMethods:Uc,toObjectSet:qc,toCamelCase:_c,noop:jc,toFiniteNumber:Wc,findKey:Kr,global:en,isContextDefined:es,isSpecCompliantForm:Gc,toJSONObject:Qc,isAsyncFn:Yc,isThenable:Xc,setImmediate:ns,asap:Zc,isIterable:is,isSafeIterable:n=>n!=null&&Gn(n,Wn)&&is(n)},Jc=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Kc=n=>{const e={};let i,o,r;return n&&n.split(`
15
+ `).forEach(function(a){r=a.indexOf(":"),i=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!i||e[i]&&Jc[i])&&(i==="set-cookie"?e[i]?e[i].push(o):e[i]=[o]:e[i]=e[i]?e[i]+", "+o:o)}),e};function ed(n){let e=0,i=n.length;for(;e<i;){const o=n.charCodeAt(e);if(o!==9&&o!==32)break;e+=1}for(;i>e;){const o=n.charCodeAt(i-1);if(o!==9&&o!==32)break;i-=1}return e===0&&i===n.length?n:n.slice(e,i)}const td=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),nd=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function $o(n,e){return y.isArray(n)?n.map(i=>$o(i,e)):ed(String(n).replace(e,""))}const id=n=>$o(n,td),od=n=>$o(n,nd);function os(n){const e=Object.create(null);return y.forEach(n.toJSON(),(i,o)=>{e[o]=od(i)}),e}const rs=Symbol("internals");function Yn(n){return n&&String(n).trim().toLowerCase()}function Ti(n){return n===!1||n==null?n:y.isArray(n)?n.map(Ti):id(String(n))}function rd(n){const e=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=i.exec(n);)e[o[1]]=o[2];return e}const sd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function No(n,e,i,o,r){if(y.isFunction(o))return o.call(this,e,i);if(r&&(e=i),!!y.isString(e)){if(y.isString(o))return e.indexOf(o)!==-1;if(y.isRegExp(o))return o.test(e)}}function ad(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,i,o)=>i.toUpperCase()+o)}function ld(n,e){const i=y.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+i,{__proto__:null,value:function(r,s,a){return this[o].call(this,e,r,s,a)},configurable:!0})})}let He=class{constructor(e){e&&this.set(e)}set(e,i,o){const r=this;function s(d,c,u){const f=Yn(c);if(!f)return;const h=y.findKey(r,f);(!h||r[h]===void 0||u===!0||u===void 0&&r[h]!==!1)&&(r[h||c]=Ti(d))}const a=(d,c)=>y.forEach(d,(u,f)=>s(u,f,c));if(y.isPlainObject(e)||e instanceof this.constructor)a(e,i);else if(y.isString(e)&&(e=e.trim())&&!sd(e))a(Kc(e),i);else if(y.isObject(e)&&y.isSafeIterable(e)){let d=Object.create(null),c,u;for(const f of e){if(!y.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],y.hasOwnProp(d,u)?(c=d[u],d[u]=y.isArray(c)?[...c,f[1]]:[c,f[1]]):d[u]=f[1]}a(d,i)}else e!=null&&s(i,e,o);return this}get(e,i){if(e=Yn(e),e){const o=y.findKey(this,e);if(o){const r=this[o];if(!i)return r;if(i===!0)return rd(r);if(y.isFunction(i))return i.call(this,r,o);if(y.isRegExp(i))return i.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,i){if(e=Yn(e),e){const o=y.findKey(this,e);return!!(o&&this[o]!==void 0&&(!i||No(this,this[o],o,i)))}return!1}delete(e,i){const o=this;let r=!1;function s(a){if(a=Yn(a),a){const d=y.findKey(o,a);d&&(!i||No(o,o[d],d,i))&&(delete o[d],r=!0)}}return y.isArray(e)?e.forEach(s):s(e),r}clear(e){const i=Object.keys(this);let o=i.length,r=!1;for(;o--;){const s=i[o];(!e||No(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const i=this,o={};return y.forEach(this,(r,s)=>{const a=y.findKey(o,s);if(a){i[a]=Ti(r),delete i[s];return}const d=e?ad(s):String(s).trim();d!==s&&delete i[s],i[d]=Ti(r),o[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const i=Object.create(null);return y.forEach(this,(o,r)=>{o!=null&&o!==!1&&(i[r]=e&&y.isArray(o)?o.join(", "):o)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,i])=>e+": "+i).join(`
16
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...i){const o=new this(e);return i.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[rs]=this[rs]={accessors:{}}).accessors,r=this.prototype;function s(a){const d=Yn(a);o[d]||(ld(r,a),o[d]=!0)}return y.isArray(e)?e.forEach(s):s(e),this}};He.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),y.reduceDescriptors(He.prototype,({value:n},e)=>{let i=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(o){this[i]=o}}}),y.freezeMethods(He);const cd="[REDACTED ****]";function dd(n){if(y.hasOwnProp(n,"toJSON"))return!0;let e=Object.getPrototypeOf(n);for(;e&&e!==Object.prototype;){if(y.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function ud(n,e){const i=new Set(e.map(s=>String(s).toLowerCase())),o=[],r=s=>{if(s===null||typeof s!="object"||y.isBuffer(s))return s;if(o.indexOf(s)!==-1)return;s instanceof He&&(s=s.toJSON()),o.push(s);let a;if(y.isArray(s))a=[],s.forEach((d,c)=>{const u=r(d);y.isUndefined(u)||(a[c]=u)});else{if(!y.isPlainObject(s)&&dd(s))return o.pop(),s;a=Object.create(null);for(const[d,c]of Object.entries(s)){const u=i.has(d.toLowerCase())?cd:r(c);y.isUndefined(u)||(a[d]=u)}}return o.pop(),a};return r(n)}let z=class Ml extends Error{static from(e,i,o,r,s,a){const d=new Ml(e.message,i||e.code,o,r,s);return Object.defineProperty(d,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),d.name=e.name,e.status!=null&&d.status==null&&(d.status=e.status),a&&Object.assign(d,a),d}constructor(e,i,o,r,s){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,i&&(this.code=i),o&&(this.config=o),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const e=this.config,i=e&&y.hasOwnProp(e,"redact")?e.redact:void 0,o=y.isArray(i)&&i.length>0?ud(e,i):y.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};z.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",z.ERR_BAD_OPTION="ERR_BAD_OPTION",z.ECONNABORTED="ECONNABORTED",z.ETIMEDOUT="ETIMEDOUT",z.ECONNREFUSED="ECONNREFUSED",z.ERR_NETWORK="ERR_NETWORK",z.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",z.ERR_DEPRECATED="ERR_DEPRECATED",z.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",z.ERR_BAD_REQUEST="ERR_BAD_REQUEST",z.ERR_CANCELED="ERR_CANCELED",z.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",z.ERR_INVALID_URL="ERR_INVALID_URL",z.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const fd=null,ss=100;function Mo(n){return y.isPlainObject(n)||y.isArray(n)}function as(n){return y.endsWith(n,"[]")?n.slice(0,-2):n}function Io(n,e,i){return n?n.concat(e).map(function(r,s){return r=as(r),!i&&s?"["+r+"]":r}).join(i?".":""):e}function hd(n){return y.isArray(n)&&!n.some(Mo)}const md=y.toFlatObject(y,{},null,function(e){return/^is[A-Z]/.test(e)});function Ri(n,e,i){if(!y.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,i=y.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,C){return!y.isUndefined(C[N])});const o=i.metaTokens,r=i.visitor||w,s=i.dots,a=i.indexes,d=i.Blob||typeof Blob<"u"&&Blob,c=i.maxDepth===void 0?ss:i.maxDepth,u=d&&y.isSpecCompliantForm(e),f=[];if(!y.isFunction(r))throw new TypeError("visitor must be a function");function h(x){if(x===null)return"";if(y.isDate(x))return x.toISOString();if(y.isBoolean(x))return x.toString();if(!u&&y.isBlob(x))throw new z("Blob is not supported. Use a Buffer instead.");if(y.isArrayBuffer(x)||y.isTypedArray(x)){if(u&&typeof d=="function")return new d([x]);if(typeof Buffer<"u")return Buffer.from(x);throw new z("Blob is not supported. Use a Buffer instead.",z.ERR_NOT_SUPPORT)}return x}function m(x){if(x>c)throw new z("Object is too deeply nested ("+x+" levels). Max depth: "+c,z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function S(x,N){if(c===1/0)return JSON.stringify(x);const C=[];return JSON.stringify(x,function(D,Z){if(!y.isObject(Z))return Z;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(Z),m(N+C.length-1),Z})}function w(x,N,C){let P=x;if(y.isReactNative(e)&&y.isReactNativeBlob(x))return e.append(Io(C,N,s),h(x)),!1;if(x&&!C&&typeof x=="object"){if(y.endsWith(N,"{}"))N=o?N:N.slice(0,-2),x=S(x,1);else if(y.isArray(x)&&hd(x)||(y.isFileList(x)||y.endsWith(N,"[]"))&&(P=y.toArray(x)))return N=as(N),P.forEach(function(Z,K){!(y.isUndefined(Z)||Z===null)&&e.append(a===!0?Io([N],K,s):a===null?N:N+"[]",h(Z))}),!1}return Mo(x)?!0:(e.append(Io(C,N,s),h(x)),!1)}const E=Object.assign(md,{defaultVisitor:w,convertValue:h,isVisitable:Mo});function B(x,N,C=0){if(!y.isUndefined(x)){if(m(C),f.indexOf(x)!==-1)throw new Error("Circular reference detected in "+N.join("."));f.push(x),y.forEach(x,function(D,Z){(!(y.isUndefined(D)||D===null)&&r.call(e,D,y.isString(Z)?Z.trim():Z,N,E))===!0&&B(D,N?N.concat(Z):[Z],C+1)}),f.pop()}}if(!y.isObject(n))throw new TypeError("data must be an object");return B(n),e}function ls(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(o){return e[o]})}function Vo(n,e){this._pairs=[],n&&Ri(n,this,e)}const cs=Vo.prototype;cs.append=function(e,i){this._pairs.push([e,i])},cs.toString=function(e){const i=e?o=>e.call(this,o,ls):ls;return this._pairs.map(function(r){return i(r[0])+"="+i(r[1])},"").join("&")};function pd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ds(n,e,i){if(!e)return n;n=n||"";const o=y.isFunction(i)?{serialize:i}:i,r=y.getSafeProp(o,"encode")||pd,s=y.getSafeProp(o,"serialize");let a;if(s?a=s(e,o):a=y.isURLSearchParams(e)?e.toString():new Vo(e,o).toString(r),a){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class us{constructor(){this.handlers=[]}use(e,i,o){return this.handlers.push({fulfilled:e,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){y.forEach(this.handlers,function(o){o!==null&&e(o)})}}const To={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},gd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Vo,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ro=typeof window<"u"&&typeof document<"u",Po=typeof navigator=="object"&&navigator||void 0,yd=Ro&&(!Po||["ReactNative","NativeScript","NS"].indexOf(Po.product)<0),wd=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bd=Ro&&window.location.href||"http://localhost",Fe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ro,hasStandardBrowserEnv:yd,hasStandardBrowserWebWorkerEnv:wd,navigator:Po,origin:bd},Symbol.toStringTag,{value:"Module"})),...gd};function Sd(n,e){return Ri(n,new Fe.classes.URLSearchParams,{visitor:function(i,o,r,s){return Fe.isNode&&y.isBuffer(i)?(this.append(o,i.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}const fs=ss;function hs(n){if(n>fs)throw new z("FormData field is too deeply nested ("+n+" levels). Max depth: "+fs,z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Cd(n){const e=[],i=/\w+|\[(\w*)]/g;let o;for(;(o=i.exec(n))!==null;)hs(e.length),e.push(o[0]==="[]"?"":o[1]||o[0]);return e}function kd(n){const e={},i=Object.keys(n);let o;const r=i.length;let s;for(o=0;o<r;o++)s=i[o],e[s]=n[s];return e}function ms(n){function e(i,o,r,s){hs(s);let a=i[s++];if(a==="__proto__")return!0;const d=Number.isFinite(+a),c=s>=i.length;return a=!a&&y.isArray(r)?r.length:a,c?(y.hasOwnProp(r,a)?r[a]=y.isArray(r[a])?r[a].concat(o):[r[a],o]:r[a]=o,!d):((!y.hasOwnProp(r,a)||!y.isObject(r[a]))&&(r[a]=[]),e(i,o,r[a],s)&&y.isArray(r[a])&&(r[a]=kd(r[a])),!d)}if(y.isFormData(n)&&y.isFunction(n.entries)){const i={};return y.forEachEntry(n,(o,r)=>{e(Cd(o),r,i,0)}),i}return null}const $n=(n,e)=>n!=null&&y.hasOwnProp(n,e)?n[e]:void 0;function xd(n,e,i){if(y.isString(n))try{return(e||JSON.parse)(n),y.trim(n)}catch(o){if(o.name!=="SyntaxError")throw o}return(i||JSON.stringify)(n)}const Xn={transitional:To,adapter:["xhr","http","fetch"],transformRequest:[function(e,i){const o=i.getContentType()||"",r=o.indexOf("application/json")>-1,s=y.isObject(e);if(s&&y.isHTMLForm(e)&&(e=new FormData(e)),y.isFormData(e))return r?JSON.stringify(ms(e)):e;if(y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)||y.isReadableStream(e))return e;if(y.isArrayBufferView(e))return e.buffer;if(y.isURLSearchParams(e))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(s){const c=$n(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return Sd(e,c).toString();if((d=y.isFileList(e))||o.indexOf("multipart/form-data")>-1){const u=$n(this,"env"),f=u&&u.FormData;return Ri(d?{"files[]":e}:e,f&&new f,c)}}return s||r?(i.setContentType("application/json",!1),xd(e)):e}],transformResponse:[function(e){const i=$n(this,"transitional")||Xn.transitional,o=i&&i.forcedJSONParsing,r=$n(this,"responseType"),s=r==="json";if(y.isResponse(e)||y.isReadableStream(e))return e;if(e&&y.isString(e)&&(o&&!r||s)){const d=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(e,$n(this,"parseReviver"))}catch(c){if(d)throw c.name==="SyntaxError"?z.from(c,z.ERR_BAD_RESPONSE,this,null,$n(this,"response")):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch","query"],n=>{Xn.headers[n]={}});function vo(n,e){const i=this||Xn,o=e||i,r=He.from(o.headers);let s=o.data;return y.forEach(n,function(d){s=d.call(i,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function ps(n){return!!(n&&n.__CANCEL__)}let Zn=class extends z{constructor(e,i,o){super(e??"canceled",z.ERR_CANCELED,i,o),this.name="CanceledError",this.__CANCEL__=!0}};function gs(n,e,i){const o=i.config.validateStatus;!i.status||!o||o(i.status)?n(i):e(new z("Request failed with status code "+i.status,i.status>=400&&i.status<500?z.ERR_BAD_REQUEST:z.ERR_BAD_RESPONSE,i.config,i.request,i))}function Ed(n){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return e&&e[1]||""}function Bd(n,e){n=n||10;const i=new Array(n),o=new Array(n);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),f=o[s];a||(a=u),i[r]=c,o[r]=u;let h=s,m=0;for(;h!==r;)m+=i[h++],h=h%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<e)return;const S=f&&u-f;return S?Math.round(m*1e3/S):void 0}}function $d(n,e){let i=0,o=1e3/e,r,s;const a=(u,f=Date.now())=>{i=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),h=f-i;h>=o?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-h)))},()=>r&&a(r)]}const Pi=(n,e,i=3)=>{let o=0;const r=Bd(50,250);return $d(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,d=s.lengthComputable?s.total:void 0,c=d!=null?Math.min(a,d):a,u=Math.max(0,c-o),f=r(u);o=Math.max(o,c);const h={loaded:c,total:d,progress:d?c/d:void 0,bytes:u,rate:f||void 0,estimated:f&&d?(d-c)/f:void 0,event:s,lengthComputable:d!=null,[e?"download":"upload"]:!0};n(h)},i)},ys=(n,e)=>{const i=n!=null;return[o=>e[0]({lengthComputable:i,total:n,loaded:o}),e[1]]},ws=n=>(...e)=>y.asap(()=>n(...e)),Nd=Fe.hasStandardBrowserEnv?((n,e)=>i=>(i=new URL(i,Fe.origin),n.protocol===i.protocol&&n.host===i.host&&(e||n.port===i.port)))(new URL(Fe.origin),Fe.navigator&&/(msie|trident)/i.test(Fe.navigator.userAgent)):()=>!0,Md=Fe.hasStandardBrowserEnv?{write(n,e,i,o,r,s,a){if(typeof document>"u")return;const d=[`${n}=${encodeURIComponent(e)}`];y.isNumber(i)&&d.push(`expires=${new Date(i).toUTCString()}`),y.isString(o)&&d.push(`path=${o}`),y.isString(r)&&d.push(`domain=${r}`),s===!0&&d.push("secure"),y.isString(a)&&d.push(`SameSite=${a}`),document.cookie=d.join("; ")},read(n){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let i=0;i<e.length;i++){const o=e[i].replace(/^\s+/,""),r=o.indexOf("=");if(r!==-1&&o.slice(0,r)===n)try{return decodeURIComponent(o.slice(r+1))}catch{return o.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Id(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Vd(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}const Td=/^https?:(?!\/\/)/i,Rd=/[\t\n\r]/g;function Pd(n){let e=0;for(;e<n.length&&n.charCodeAt(e)<=32;)e++;return n.slice(e)}function vd(n){return Pd(n).replace(Rd,"")}function bs(n,e){if(typeof n=="string"&&Td.test(vd(n)))throw new z('Invalid URL: missing "//" after protocol',z.ERR_INVALID_URL,e)}function Ss(n,e,i,o){bs(e,o);let r=!Id(e);return n&&(r||i===!1)?(bs(n,o),Vd(n,e)):e}const Cs=n=>n instanceof He?{...n}:n;function tn(n,e){n=n||{},e=e||{};const i=Object.create(null);Object.defineProperty(i,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(f,h,m,S){return y.isPlainObject(f)&&y.isPlainObject(h)?y.merge.call({caseless:S},f,h):y.isPlainObject(h)?y.merge({},h):y.isArray(h)?h.slice():h}function r(f,h,m,S){if(y.isUndefined(h)){if(!y.isUndefined(f))return o(void 0,f,m,S)}else return o(f,h,m,S)}function s(f,h){if(!y.isUndefined(h))return o(void 0,h)}function a(f,h){if(y.isUndefined(h)){if(!y.isUndefined(f))return o(void 0,f)}else return o(void 0,h)}function d(f){const h=y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!y.isUndefined(h))if(y.isPlainObject(h)){if(y.hasOwnProp(h,f))return h[f]}else return;const m=y.hasOwnProp(n,"transitional")?n.transitional:void 0;if(y.isPlainObject(m)&&y.hasOwnProp(m,f))return m[f]}function c(f,h,m){if(y.hasOwnProp(e,m))return o(f,h);if(y.hasOwnProp(n,m))return o(void 0,f)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:c,headers:(f,h,m)=>r(Cs(f),Cs(h),m,!0)};return y.forEach(Object.keys({...n,...e}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const m=y.hasOwnProp(u,h)?u[h]:r,S=y.hasOwnProp(n,h)?n[h]:void 0,w=y.hasOwnProp(e,h)?e[h]:void 0,E=m(S,w,h);y.isUndefined(E)&&m!==c||(i[h]=E)}),y.hasOwnProp(e,"validateStatus")&&y.isUndefined(e.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(y.hasOwnProp(n,"validateStatus")?i.validateStatus=o(void 0,n.validateStatus):delete i.validateStatus),i}const Ad=["content-type","content-length"];function zd(n,e,i){if(i!=="content-only"){n.set(e);return}Object.entries(e||{}).forEach(([o,r])=>{Ad.includes(o.toLowerCase())&&n.set(o,r)})}const Dd=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,i)=>String.fromCharCode(parseInt(i,16)));function ks(n){const e=tn({},n),i=m=>y.hasOwnProp(e,m)?e[m]:void 0,o=i("data");let r=i("withXSRFToken");const s=i("xsrfHeaderName"),a=i("xsrfCookieName");let d=i("headers");const c=i("auth"),u=i("baseURL"),f=i("allowAbsoluteUrls"),h=i("url");if(e.headers=d=He.from(d),e.url=ds(Ss(u,h,f,e),i("params"),i("paramsSerializer")),c){const m=y.getSafeProp(c,"username")||"",S=y.getSafeProp(c,"password")||"";try{d.set("Authorization","Basic "+btoa(m+":"+(S?Dd(S):"")))}catch(w){throw z.from(w,z.ERR_BAD_OPTION_VALUE,n)}}if(y.isFormData(o)&&(Fe.hasStandardBrowserEnv||Fe.hasStandardBrowserWebWorkerEnv||y.isReactNative(o)?d.setContentType(void 0):y.isFunction(o.getHeaders)&&zd(d,o.getHeaders(),i("formDataHeaderPolicy"))),Fe.hasStandardBrowserEnv&&(y.isFunction(r)&&(r=r(e)),r===!0||r==null&&Nd(e.url))){const S=s&&a&&Md.read(a);S&&d.set(s,S)}return e}const Fd=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(i,o){const r=ks(n);let s=r.data;const a=He.from(r.headers).normalize();let{responseType:d,onUploadProgress:c,onDownloadProgress:u}=r,f,h,m,S,w;function E(){S&&S(),w&&w(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let B=new XMLHttpRequest;B.open(r.method.toUpperCase(),r.url,!0),B.timeout=r.timeout;function x(){if(!B)return;const C=He.from("getAllResponseHeaders"in B&&B.getAllResponseHeaders()),D={data:!d||d==="text"||d==="json"?B.responseText:B.response,status:B.status,statusText:B.statusText,headers:C,config:n,request:B};gs(function(K){i(K),E()},function(K){o(K),E()},D),B=null}"onloadend"in B?B.onloadend=x:B.onreadystatechange=function(){!B||B.readyState!==4||B.status===0&&!(B.responseURL&&B.responseURL.startsWith("file:"))||setTimeout(x)},B.onabort=function(){B&&(o(new z("Request aborted",z.ECONNABORTED,n,B)),E(),B=null)},B.onerror=function(P){const D=P&&P.message?P.message:"Network Error",Z=new z(D,z.ERR_NETWORK,n,B);Z.event=P||null,o(Z),E(),B=null},B.ontimeout=function(){let P=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const D=r.transitional||To;r.timeoutErrorMessage&&(P=r.timeoutErrorMessage),o(new z(P,D.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,n,B)),E(),B=null},s===void 0&&a.setContentType(null),"setRequestHeader"in B&&y.forEach(os(a),function(P,D){B.setRequestHeader(D,P)}),y.isUndefined(r.withCredentials)||(B.withCredentials=!!r.withCredentials),d&&d!=="json"&&(B.responseType=r.responseType),u&&([m,w]=Pi(u,!0),B.addEventListener("progress",m)),c&&B.upload&&([h,S]=Pi(c),B.upload.addEventListener("progress",h),B.upload.addEventListener("loadend",S)),(r.cancelToken||r.signal)&&(f=C=>{B&&(o(!C||C.type?new Zn(null,n,B):C),B.abort(),E(),B=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const N=Ed(r.url);if(N&&!Fe.protocols.includes(N)){o(new z("Unsupported protocol "+N+":",z.ERR_BAD_REQUEST,n)),E();return}B.send(s||null)})},Od=(n,e)=>{if(n=n?n.filter(Boolean):[],!e&&!n.length)return;const i=new AbortController;let o=!1;const r=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;i.abort(u instanceof z?u:new Zn(u instanceof Error?u.message:u))}};let s=e&&setTimeout(()=>{s=null,r(new z(`timeout of ${e}ms exceeded`,z.ETIMEDOUT))},e);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),n=null)};n.forEach(c=>c.addEventListener("abort",r,{once:!0}));const{signal:d}=i;return d.unsubscribe=()=>y.asap(a),d},_d=function*(n,e){let i=n.byteLength;if(i<e){yield n;return}let o=0,r;for(;o<i;)r=o+e,yield n.slice(o,r),o=r},Ld=async function*(n,e){for await(const i of Hd(n))yield*_d(i,e)},Hd=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:i,value:o}=await e.read();if(i)break;yield o}}finally{await e.cancel()}},xs=(n,e,i,o)=>{const r=Ld(n,e);let s=0,a,d=c=>{a||(a=!0,o&&o(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await r.next();if(u){d(),c.close();return}let h=f.byteLength;if(i){let m=s+=h;i(m)}c.enqueue(new Uint8Array(f))}catch(u){throw d(u),u}},cancel(c){return d(c),r.return()}},{highWaterMark:2})},vi=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,Ud=(n,e,i)=>e+2<i&&vi(n.charCodeAt(e+1))&&vi(n.charCodeAt(e+2));function qd(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const e=n.indexOf(",");if(e<0)return 0;const i=n.slice(5,e),o=n.slice(e+1);if(/;base64/i.test(i)){let a=o.length;const d=o.length;for(let S=0;S<d;S++)if(o.charCodeAt(S)===37&&S+2<d){const w=o.charCodeAt(S+1),E=o.charCodeAt(S+2);vi(w)&&vi(E)&&(a-=2,S+=2)}let c=0,u=d-1;const f=S=>S>=2&&o.charCodeAt(S-2)===37&&o.charCodeAt(S-1)===51&&(o.charCodeAt(S)===68||o.charCodeAt(S)===100);u>=0&&(o.charCodeAt(u)===61?(c++,u--):f(u)&&(c++,u-=3)),c===1&&u>=0&&(o.charCodeAt(u)===61||f(u))&&c++;const m=Math.floor(a/4)*3-(c||0);return m>0?m:0}let s=0;for(let a=0,d=o.length;a<d;a++){const c=o.charCodeAt(a);if(c===37&&Ud(o,a,d))s+=1,a+=2;else if(c<128)s+=1;else if(c<2048)s+=2;else if(c>=55296&&c<=56319&&a+1<d){const u=o.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Ao="1.18.1",Es=64*1024,{isFunction:Ai}=y,jd=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,i)=>String.fromCharCode(parseInt(i,16))),Bs=n=>{if(!y.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},$s=(n,...e)=>{try{return!!n(...e)}catch{return!1}},Wd=n=>{const e=n.indexOf("://");let i=n;return e!==-1&&(i=i.slice(e+3)),i.includes("@")||i.includes(":")},Gd=n=>{const e=y.global!==void 0&&y.global!==null?y.global:globalThis,{ReadableStream:i,TextEncoder:o}=e;n=y.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},n);const{fetch:r,Request:s,Response:a}=n,d=r?Ai(r):typeof fetch=="function",c=Ai(s),u=Ai(a);if(!d)return!1;const f=d&&Ai(i),h=d&&(typeof o=="function"?(x=>N=>x.encode(N))(new o):async x=>new Uint8Array(await new s(x).arrayBuffer())),m=c&&f&&$s(()=>{let x=!1;const N=new s(Fe.origin,{body:new i,method:"POST",get duplex(){return x=!0,"half"}}),C=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),x&&!C}),S=u&&f&&$s(()=>y.isReadableStream(new a("").body)),w={stream:S&&(x=>x.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!w[x]&&(w[x]=(N,C)=>{let P=N&&N[x];if(P)return P.call(N);throw new z(`Response type '${x}' is not supported`,z.ERR_NOT_SUPPORT,C)})});const E=async x=>{if(x==null)return 0;if(y.isBlob(x))return x.size;if(y.isSpecCompliantForm(x))return(await new s(Fe.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(y.isArrayBufferView(x)||y.isArrayBuffer(x))return x.byteLength;if(y.isURLSearchParams(x)&&(x=x+""),y.isString(x))return(await h(x)).byteLength},B=async(x,N)=>{const C=y.toFiniteNumber(x.getContentLength());return C??E(N)};return async x=>{let{url:N,method:C,data:P,signal:D,cancelToken:Z,timeout:K,onDownloadProgress:fe,onUploadProgress:ht,responseType:Qe,headers:Pe,withCredentials:ke="same-origin",fetchOptions:fn,maxContentLength:Ye,maxBodyLength:Nt}=ks(x);const Mt=y.isNumber(Ye)&&Ye>-1,Ot=y.isNumber(Nt)&&Nt>-1,mt=se=>y.hasOwnProp(x,se)?x[se]:void 0;let wt=r||fetch;Qe=Qe?(Qe+"").toLowerCase():"text";let nt=Od([D,Z&&Z.toAbortSignal()],K),we=null;const j=nt&&nt.unsubscribe&&(()=>{nt.unsubscribe()});let Le,It=null;const ge=()=>new z("Request body larger than maxBodyLength limit",z.ERR_BAD_REQUEST,x,we);try{let se;const je=mt("auth");if(je){const ee=y.getSafeProp(je,"username")||"",Ie=y.getSafeProp(je,"password")||"";se={username:ee,password:Ie}}if(Wd(N)){const ee=new URL(N,Fe.origin);if(!se&&(ee.username||ee.password)){const Ie=Bs(ee.username),rt=Bs(ee.password);se={username:Ie,password:rt}}(ee.username||ee.password)&&(ee.username="",ee.password="",N=ee.href)}if(se&&(Pe.delete("authorization"),Pe.set("Authorization","Basic "+btoa(jd((se.username||"")+":"+(se.password||""))))),Mt&&typeof N=="string"&&N.startsWith("data:")&&qd(N)>Ye)throw new z("maxContentLength size of "+Ye+" exceeded",z.ERR_BAD_RESPONSE,x,we);if(Ot&&C!=="get"&&C!=="head"){const ee=await E(P);if(typeof ee=="number"&&isFinite(ee)&&(Le=ee,ee>Nt))throw ge()}const We=Ot&&(y.isReadableStream(P)||y.isStream(P)),Hn=(ee,Ie,rt)=>xs(ee,Es,st=>{if(Ot&&st>Nt)throw It=ge();Ie&&Ie(st)},rt);if(m&&C!=="get"&&C!=="head"&&(ht||We)){if(Le=Le??await B(Pe,P),Le!==0||We){let ee=new s(N,{method:"POST",body:P,duplex:"half"}),Ie;if(y.isFormData(P)&&(Ie=ee.headers.get("content-type"))&&Pe.setContentType(Ie),ee.body){const[rt,st]=ht&&ys(Le,Pi(ws(ht)))||[];P=Hn(ee.body,rt,st)}}}else if(We&&!c&&f&&C!=="get"&&C!=="head")P=Hn(P);else if(We&&c&&!m&&C!=="get"&&C!=="head")throw new z("Stream request bodies are not supported by the current fetch implementation",z.ERR_NOT_SUPPORT,x,we);y.isString(ke)||(ke=ke?"include":"omit");const Xe=c&&"credentials"in s.prototype;if(y.isFormData(P)){const ee=Pe.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Pe.delete("content-type")}Pe.set("User-Agent","axios/"+Ao,!1);const _t={...fn,signal:nt,method:C.toUpperCase(),headers:os(Pe.normalize()),body:P,duplex:"half",credentials:Xe?ke:void 0};we=c&&new s(N,_t);let Me=await(c?wt(we,fn):wt(N,_t));const hn=He.from(Me.headers);if(Mt){const ee=y.toFiniteNumber(hn.getContentLength());if(ee!=null&&ee>Ye)throw new z("maxContentLength size of "+Ye+" exceeded",z.ERR_BAD_RESPONSE,x,we)}const be=S&&(Qe==="stream"||Qe==="response");if(S&&Me.body&&(fe||Mt||be&&j)){const ee={};["status","statusText","headers"].forEach(Vt=>{ee[Vt]=Me[Vt]});const Ie=y.toFiniteNumber(hn.getContentLength()),[rt,st]=fe&&ys(Ie,Pi(ws(fe),!0))||[];let mn=0;const bt=Vt=>{if(Mt&&(mn=Vt,mn>Ye))throw new z("maxContentLength size of "+Ye+" exceeded",z.ERR_BAD_RESPONSE,x,we);rt&&rt(Vt)};Me=new a(xs(Me.body,Es,bt,()=>{st&&st(),j&&j()}),ee)}Qe=Qe||"text";let Ze=await w[y.findKey(w,Qe)||"text"](Me,x);if(Mt&&!S&&!be){let ee;if(Ze!=null&&(typeof Ze.byteLength=="number"?ee=Ze.byteLength:typeof Ze.size=="number"?ee=Ze.size:typeof Ze=="string"&&(ee=typeof o=="function"?new o().encode(Ze).byteLength:Ze.length)),typeof ee=="number"&&ee>Ye)throw new z("maxContentLength size of "+Ye+" exceeded",z.ERR_BAD_RESPONSE,x,we)}return!be&&j&&j(),await new Promise((ee,Ie)=>{gs(ee,Ie,{data:Ze,headers:He.from(Me.headers),status:Me.status,statusText:Me.statusText,config:x,request:we})})}catch(se){if(j&&j(),nt&&nt.aborted&&nt.reason instanceof z){const je=nt.reason;throw je.config=x,we&&(je.request=we),se!==je&&Object.defineProperty(je,"cause",{__proto__:null,value:se,writable:!0,enumerable:!1,configurable:!0}),je}if(It)throw we&&!It.request&&(It.request=we),It;if(se instanceof z)throw we&&!se.request&&(se.request=we),se;if(se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)){const je=new z("Network Error",z.ERR_NETWORK,x,we,se&&se.response);throw Object.defineProperty(je,"cause",{__proto__:null,value:se.cause||se,writable:!0,enumerable:!1,configurable:!0}),je}throw z.from(se,se&&se.code,x,we,se&&se.response)}}},Qd=new Map,Ns=n=>{let e=n&&n.env||{};const{fetch:i,Request:o,Response:r}=e,s=[o,r,i];let a=s.length,d=a,c,u,f=Qd;for(;d--;)c=s[d],u=f.get(c),u===void 0&&f.set(c,u=d?new Map:Gd(e)),f=u;return u};Ns();const zo={http:fd,xhr:Fd,fetch:{get:Ns}};y.forEach(zo,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:e})}});const Ms=n=>`- ${n}`,Yd=n=>y.isFunction(n)||n===null||n===!1;function Xd(n,e){n=y.isArray(n)?n:[n];const{length:i}=n;let o,r;const s={};for(let a=0;a<i;a++){o=n[a];let d;if(r=o,!Yd(o)&&(r=zo[(d=String(o)).toLowerCase()],r===void 0))throw new z(`Unknown adapter '${d}'`);if(r&&(y.isFunction(r)||(r=r.get(e))))break;s[d||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let d=i?a.length>1?`since :
17
+ `+a.map(Ms).join(`
18
+ `):" "+Ms(a[0]):"as no adapter specified";throw new z("There is no suitable adapter to dispatch the request "+d,z.ERR_NOT_SUPPORT)}return r}const Is={getAdapter:Xd,adapters:zo};function Do(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Zn(null,n)}function Vs(n){return Do(n),n.headers=He.from(n.headers),n.data=vo.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Is.getAdapter(n.adapter||Xn.adapter,n)(n).then(function(o){Do(n),n.response=o;try{o.data=vo.call(n,n.transformResponse,o)}finally{delete n.response}return o.headers=He.from(o.headers),o},function(o){if(!ps(o)&&(Do(n),o&&o.response)){n.response=o.response;try{o.response.data=vo.call(n,n.transformResponse,o.response)}finally{delete n.response}o.response.headers=He.from(o.response.headers)}return Promise.reject(o)})}const zi={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{zi[n]=function(o){return typeof o===n||"a"+(e<1?"n ":" ")+n}});const Ts={};zi.transitional=function(e,i,o){function r(s,a){return"[Axios v"+Ao+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,d)=>{if(e===!1)throw new z(r(a," has been removed"+(i?" in "+i:"")),z.ERR_DEPRECATED);return i&&!Ts[a]&&(Ts[a]=!0,console.warn(r(a," has been deprecated since v"+i+" and will be removed in the near future"))),e?e(s,a,d):!0}},zi.spelling=function(e){return(i,o)=>(console.warn(`${o} is likely a misspelling of ${e}`),!0)};function Zd(n,e,i){if(typeof n!="object"||n===null)throw new z("options must be an object",z.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let r=o.length;for(;r-- >0;){const s=o[r],a=Object.prototype.hasOwnProperty.call(e,s)?e[s]:void 0;if(a){const d=n[s],c=d===void 0||a(d,s,n);if(c!==!0)throw new z("option "+s+" must be "+c,z.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new z("Unknown option "+s,z.ERR_BAD_OPTION)}}const Di={assertOptions:Zd,validators:zi},Ue=Di.validators;let nn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new us,response:new us}}async request(e,i){try{return await this._request(e,i)}catch(o){if(o instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=(()=>{if(!r.stack)return"";const a=r.stack.indexOf(`
19
19
  `);return a===-1?"":r.stack.slice(a+1)})();try{if(!o.stack)o.stack=s;else if(s){const a=s.indexOf(`
20
20
  `),d=a===-1?-1:s.indexOf(`
21
21
  `,a+1),c=d===-1?"":s.slice(d+1);String(o.stack).endsWith(c)||(o.stack+=`
22
- `+s)}}catch{}}throw o}}_request(e,i){typeof e=="string"?(i=i||{},i.url=e):i=e||{},i=nn(this.defaults,i);const{transitional:o,paramsSerializer:r,headers:s}=i;o!==void 0&&Di.assertOptions(o,{silentJSONParsing:Ue.transitional(Ue.boolean),forcedJSONParsing:Ue.transitional(Ue.boolean),clarifyTimeoutError:Ue.transitional(Ue.boolean),legacyInterceptorReqResOrdering:Ue.transitional(Ue.boolean),advertiseZstdAcceptEncoding:Ue.transitional(Ue.boolean),validateStatusUndefinedResolves:Ue.transitional(Ue.boolean)},!1),r!=null&&(y.isFunction(r)?i.paramsSerializer={serialize:r}:Di.assertOptions(r,{encode:Ue.function,serialize:Ue.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),Di.assertOptions(i,{baseUrl:Ue.spelling("baseURL"),withXsrfToken:Ue.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let a=s&&y.merge(s.common,s[i.method]);s&&y.forEach(["delete","get","head","post","put","patch","query","common"],C=>{delete s[C]}),i.headers=He.concat(a,s);const d=[];let c=!0;this.interceptors.request.forEach(function(B){if(typeof B.runWhen=="function"&&B.runWhen(i)===!1)return;c=c&&B.synchronous;const $=i.transitional||Vo;$&&$.legacyInterceptorReqResOrdering?d.unshift(B.fulfilled,B.rejected):d.push(B.fulfilled,B.rejected)});const u=[];this.interceptors.response.forEach(function(B){u.push(B.fulfilled,B.rejected)});let f,h=0,m;if(!c){const C=[Is.bind(this),void 0];for(C.unshift(...d),C.push(...u),m=C.length,f=Promise.resolve(i);h<m;)f=f.then(C[h++],C[h++]);return f}m=d.length;let b=i;for(;h<m;){const C=d[h++],B=d[h++];try{b=C(b)}catch($){B.call(this,$);break}}try{f=Is.call(this,b)}catch(C){return Promise.reject(C)}for(h=0,m=u.length;h<m;)f=f.then(u[h++],u[h++]);return f}getUri(e){e=nn(this.defaults,e);const i=bs(e.baseURL,e.url,e.allowAbsoluteUrls,e);return cs(i,e.params,e.paramsSerializer)}};y.forEach(["delete","get","head","options"],function(e){on.prototype[e]=function(i,o){return this.request(nn(o||{},{method:e,url:i,data:o&&y.hasOwnProp(o,"data")?o.data:void 0}))}}),y.forEach(["post","put","patch","query"],function(e){function i(o){return function(s,a,d){return this.request(nn(d||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}on.prototype[e]=i(),e!=="query"&&(on.prototype[e+"Form"]=i(!0))});let Jd=class Il{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(s){i=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(d=>{o.subscribe(d),s=d}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},e(function(s,a,d){o.reason||(o.reason=new Zn(s,a,d),i(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const i=this._listeners.indexOf(e);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const e=new AbortController,i=o=>{e.abort(o)};return this.subscribe(i),e.signal.unsubscribe=()=>this.unsubscribe(i),e.signal}static source(){let e;return{token:new Il(function(r){e=r}),cancel:e}}};function Kd(n){return function(i){return n.apply(null,i)}}function eu(n){return y.isObject(n)&&n.isAxiosError===!0}const Do={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Do).forEach(([n,e])=>{Do[e]=n});function Ts(n){const e=new on(n),i=Wr(on.prototype.request,e);return y.extend(i,on.prototype,e,{allOwnKeys:!0}),y.extend(i,e,null,{allOwnKeys:!0}),i.create=function(r){return Ts(nn(n,r))},i}const xe=Ts(Xn);xe.Axios=on,xe.CanceledError=Zn,xe.CancelToken=Jd,xe.isCancel=ms,xe.VERSION=vo,xe.toFormData=Ri,xe.AxiosError=z,xe.Cancel=xe.CanceledError,xe.all=function(e){return Promise.all(e)},xe.spread=Kd,xe.isAxiosError=eu,xe.mergeConfig=nn,xe.AxiosHeaders=He,xe.formToJSON=n=>hs(y.isHTMLForm(n)?new FormData(n):n),xe.getAdapter=Ms.getAdapter,xe.HttpStatusCode=Do,xe.default=xe;const{Axios:Nw,AxiosError:Mw,CanceledError:Iw,isCancel:Vw,CancelToken:Tw,VERSION:Rw,all:Pw,Cancel:vw,isAxiosError:Aw,spread:zw,toFormData:Dw,AxiosHeaders:Fw,HttpStatusCode:Ow,formToJSON:_w,getAdapter:Lw,mergeConfig:Hw,create:Uw}=xe;var Jn=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(Jn||{});const Kn=(()=>{function n(){const c=r();return!(!c||c==="undefined")}function e(c){c.accessToken&&localStorage.setItem("access_token",c.accessToken),c.refreshToken&&localStorage.setItem("refresh_token",c.refreshToken)}function i(){const c=localStorage.getItem("user");return c?JSON.parse(c).id:""}function o(){const c=localStorage.getItem("user");if(c)return JSON.parse(c)}function r(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function d(c){if(!n())return;const u=Kn.getUser();u&&(u.human=c,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:e,getAccessToken:r,getRefreshToken:s,getUserId:i,clearTokens:a,getUser:o,updateHuman:d}})();class Fo{constructor(e){l(this,"code",400);l(this,"err","");O.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,i){const o=e.config;if(e.response){if(e.response.status===401&&!o._retry)return o._retry=!0,i.defaults.headers.common.token=Kn.getAccessToken(),e.config.headers.token=Kn.getAccessToken(),e.config.baseURL=void 0,i.request(o);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){Ct.Error("Неверный логин или пароль");return}Ct.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const r=new Fo(e.response.data).getErr();r&&Ct.Error(r)}return Promise.reject(e)}}}const Nn=xe.create();Nn.interceptors.response.use(n=>n,async n=>await Fo.Handle(n,Nn));class ei{static async Get(e,i,o){return await Nn({method:Jn.GET,url:e,headers:i,responseType:o})}static async Post(e,i,o,r){return i["Content-Type"]="multipart/form-data",await Nn({method:Jn.POST,url:e,headers:i,responseType:o,data:r})}static async Put(e,i,o){return i["Content-Type"]="multipart/form-data",await Nn({method:Jn.PUT,url:e,headers:i,data:o})}static async Delete(e,i){return await Nn({method:Jn.DELETE,url:e,headers:i})}}class Fi{constructor(e){l(this,"name","");O.BuildClass(this,e)}static Set(){}static Get(e,i){const o=sessionStorage.getItem(e);if(o){const r=JSON.parse(o),s=new Date,a=new Date(r.time),d=s.getTime()-a.getTime();return Math.round(d/6e4)>(i||10)?null:r.data}else return null}static async TryGet(e,i,o){let r;return r=Fi.Get(e,o),r||(r=await i()),r}}var Oo=(n=>(n.ContentType="Content-Type",n.Token="token",n))(Oo||{}),Rs=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Rs||{});const pe=class pe{static Setup(e="http://localhost",i,o="api"){this.baseUrl=re.BuildSafeUrl(e,i,o),this.host=e,this.apiVersion=o}static newWebSocket(e){const i=this.host.replace("http","ws")+"/ws/"+e;return new WebSocket(i)}static download(e,i){const o=pe.getDownloadFileName(e,i.headers);if(!(i.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(i.data),s=document.createElement("a");s.href=r,s.setAttribute("download",o),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(e,i){if(e)return e;const o=i["content-disposition"];if(!o)return"file";const r=o.indexOf('"')+1,s=o.lastIndexOf('"'),a=o.substring(r,s);return a||"file"}static getHeaders(e){const i=kt.Get(lt.AccessToken);return e||(e=pe.headers),i&&(e[Oo.Token]=i),e??pe.headers}static returnResponse(e,i){if(i)return e!=null&&e.isBlob?pe.download(e.downloadFileName,i):i.data}static async Get(e){return pe.returnResponse(e,await ei.Get(pe.buildUrl((e==null?void 0:e.query)??""),pe.getHeaders(e==null?void 0:e.headers),pe.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return pe.returnResponse(e,await ei.Post(pe.buildUrl(e==null?void 0:e.query),pe.getHeaders(e==null?void 0:e.headers),pe.getResponseType(e.isBlob),pe.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return pe.returnResponse(e,await ei.Put(pe.buildUrl(e==null?void 0:e.query),pe.getHeaders(e==null?void 0:e.headers),pe.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return pe.returnResponse(e,await ei.Delete(pe.buildUrl(e==null?void 0:e.query),pe.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:i}=e;return new EventSource(pe.buildUrl(i))}static buildUrl(e=""){try{return wo(this.baseUrl,e)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,i){const o=new FormData;if(o.append("form",JSON.stringify(e)),i)for(const r of i)r.file&&o.append(r.id??"files",r.file,r.originalName);return o}};l(pe,"baseUrl",""),l(pe,"apiVersion","api"),l(pe,"host",""),l(pe,"headers",{[Oo.ContentType]:Rs.ApplicationJson});let Ce=pe;const v=(n,e)=>{const i=n.__vccOpts||n;for(const[o,r]of e)i[o]=r;return i},tu={},nu={style:{"text-align":"center"}};function iu(n,e){return t.openBlock(),t.createElementBlock("div",nu,[...e[0]||(e[0]=[t.createElementVNode("h1",null,"Страница не найдена",-1)])])}const Ps=v(tu,[["render",iu]]),ou=[{path:"/:pathMatch(.*)*",name:"NotFound",component:Ps}],ft=class ft{static Setup(e,i=""){this.router=e,this.title=i,this.ChangeDocumentTitle(),this.AddRoutes(ou)}static Get(){return this.router}static AddRoutes(e){e.forEach(i=>{this.Get().addRoute(i)})}static async To(e){await this.Get().push(e)}static async ToHome(){}static async Replace(e){await this.Get().replace(e)}static Id(){return ft.GetStringParam("id")}static Slug(){return ft.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return ft.GetStringQueryParam("qid")}static Route(){var e;return(e=this.Get())==null?void 0:e.currentRoute.value}static RouterPushBlank(e){const i=this.Get().resolve({path:e});window.open(i==null?void 0:i.href,"_blank")}static GetPath(){var i;const e=(i=ft.Route())==null?void 0:i.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.Get().push("/admin");return}let i=e;i[0]==="/"&&(i=e.substring(1)),await ft.To(`/admin/${i}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){var i;return(i=this.Route())==null?void 0:i.params[e]}static SetQueryParam(e,i){const o=new URL(window.location);o.searchParams.set(e,String(i)),history.replaceState(null,"",o)}static Resolve(e){return this.Get().resolve(e)}};l(ft,"router"),l(ft,"title",""),l(ft,"ChangeDocumentTitle",(e="")=>{let i=ft.Route().meta.title??e;i&&(i=" | "+i),document.title=ft.title+i});let xt=ft;class ce{constructor(e,i){l(this,"items",t.reactive([]));l(this,"item");l(this,"options",t.reactive([]));l(this,"count",t.ref(0));l(this,"classConstructor");l(this,"url","");l(this,"searchStr",t.ref(""));this.classConstructor=e,this.item=t.reactive(new this.classConstructor),this.url=i}Set(e){Object.assign(this.item,new this.classConstructor(e))}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetOptions(e="name",i="id"){const o=`${this.getUrl()}/options/${e}/${i}`;try{const r=await Ce.Get({query:o});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(e){try{let i;const o=Ce.Get;e&&e.withCache?i=await Fi.TryGet(this.getUrl(),o):i=await o({query:this.getUrl()}),Array.isArray(i)?this.SetAll(i):this.SetAllWithCount(i)}catch(i){console.warn("GetAll failed:",i)}}async Get(e){try{e||(e=xt.Id()),this.Set(await Ce.Get({query:this.getUrl(e)}))}catch(i){console.warn("Get failed:",i)}}async GetBySlug(e){try{e||(e=xt.Slug()),this.Set(await R.H.HttpClient.Get({query:this.getUrl("by-slug/"+e)}))}catch(i){console.warn("GetBySlug failed:",i)}}async FTSP(e){var i;try{const r=((e==null?void 0:e.ftsp)??At.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await Ce.Post(s);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(r.p.append){this.AppendToAll((i=a.data)==null?void 0:i.items);return}this.SetAllWithCount(a.data)}}catch(o){console.warn("FTSP failed:",o)}}async Create(e){try{const i=e??this.item,o={payload:i,query:this.getUrl()};return i.getFileInfos&&(o.fileInfos=i.getFileInfos()),await Ce.Post(o)}catch(i){console.warn("Create failed:",i)}}async CreateAndSet(e){const i=await this.Create(e);this.Set(i)}async CreateMany(e){if(!e)return;const i=[];e.forEach(o=>{i.push(new Promise(()=>this.Create(o)))}),Promise.all(i)}async Update(e){try{const i=e??this.item,o={query:this.getUrl(`${i.id}`),payload:i};return i.getFileInfos&&(o.fileInfos=i.getFileInfos(),o.fileInfos.forEach(r=>r.url="")),await Ce.Put(o)}catch(i){console.warn("Update failed:",i)}}async UpdateAndSet(e){const i=await this.Update(e);this.Set(i)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){if(e)try{await Ce.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e)}catch(i){console.warn("Remove failed:",i)}}async UpdateMany(e){if(e||(e=this.items),!e)return;const i=[];e.forEach(o=>{i.push(new Promise(()=>this.Update(o)))}),Promise.all(i)}SetAll(e){this.items.splice(0,this.items.length),e&&this.items.push(...e.map(i=>new this.classConstructor(i)))}SetAllWithCount(e){this.SetAll(e.items),this.count.value=e.count}RemoveItem(e){const i=this.items.findIndex(o=>o.id===e);i<0||this.items.splice(i,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const i=e.map(o=>new this.classConstructor(o));this.items.push(...i);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){O.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const i=e.map(o=>new this.classConstructor(o));this.items.unshift(...i);return}this.items.unshift(new this.classConstructor(e))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(e=>R.H.Strings.SearchInFields(this.searchStr.value,e.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function ru(n,e){n=="left"&&e.next(),n=="right"&&e.prev()}const su=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class au{static GetRandColor(e){return vt.GetRandEL(e??su)}}function vs(n,e){const i=[],o=e||ct.Asc,r=o===ct.Asc?ct.Desc:ct.Asc;return Object.values(n).forEach(s=>{i.push(s(o)),i.push(s(r))}),i.length>0&&!i.some(s=>s.default)&&(i[0].default=!0),e&&i.forEach(s=>{s.default&&(s.default=s.order===e)}),i}let lu=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",qn.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",Ci[qn.FiveMinutes])}startDrag(e,i){this.draggedStartTime=e,this.draggedEndTime=i,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Ci[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return vt.GenerateNumsRange(this.startHour,this.endHour)}};const _o=n=>n===8||n===46,cu=n=>n>46&&n<58,du=n=>n>34&&n<41,uu=n=>n+".",fu=(n,e,i)=>{_o(e)||du(e)||(!cu(e)||i>9)&&n.preventDefault()};function hu(n,e){if(e>8){let i=n.substring(0,2).replace(".","1");Number(i)>31&&(i="31");let o=n.substring(3,5).replace(".","1");Number(o)>12&&(o="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=i+"."+o+"."+r}return n}function mu(n){const e=n.keyCode;let i=n.srcElement.value;const o=i.length;fu(n,e,o),!_o(e)&&(o===2||o===5)&&(i=uu(i));const r=n.srcElement.value+String.fromCharCode(n.which);if(_o(e)){n.srcElement.value=i;return}i.length===0&&Number(r)>3&&(i="3",n.preventDefault()),i.length===1&&Number(r)>31&&(i="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(i=i.substring(0,3)+"12",n.preventDefault()),i=hu(i,o),n.srcElement.value=i}const pu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],gu="ru-RU";class Et{constructor(){l(this,"locale","ru-RU")}static Format(e,i){if(!e)return"";const o={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return i&&(o.year=i.year||i.year===void 0?i.year:o.year,o.month=i.month||i.month===void 0?i.month:o.month,o.day=i.day||i.day===void 0?i.day:o.day,o.hour=i.hour??o.hour,o.minute=i.minute??o.minute),Intl.DateTimeFormat(gu,o).format(new Date(e))}static FormatWithTime(e){return Et.Format(e,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(e){const i=e.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetPeriod(e,i,o){return`${this.Format(e,o)}-${this.Format(i,o)}`}static GetShortDayName(e){return e?pu[e.getDay()]:""}static GetCurrentWeekPeriod(e){const i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()+1),r=new Date(i.getFullYear(),i.getMonth(),o.getDate()+7);return this.GetPeriod(o,r,e||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(e,i){const o=new Date,r=new Date,s=Et.SplitHourTime(e),a=Et.SplitHourTime(i);return o.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-o.getTime())/1e3/60}static HourTimeinMunutes(e){const i=Et.SplitHourTime(e);return i[0]*60+i[1]}static SplitHourTime(e){const i=e.split(":");return[Number(i[0]),Number(i[1])]}static AddMinutesToHM(e,i){const o=new Date,r=Et.SplitHourTime(e);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),d=s.getMinutes();return`${a}:${d}`}static GetMonthsDiff(e,i){return i.getMonth()-e.getMonth()+12*(i.getFullYear()-e.getFullYear())}static StringToDate(e){const i=e.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetDateOrToday(e){return e?e.date:new Date}static InPeriod(e,i,o){return new Date(e)>=new Date(i)&&new Date(e)<=new Date(o)}static GetDatesFromPeriod(e,i){const o=[new Date(e)];let r=e;for(;r<=i;)r=Et.AddDays(r,1),o.push(r);return o}static AddDays(e,i){const o=new Date(e);return o.setDate(o.getDate()+i),o}static Eq(e,i){return e.getTime()===i.getTime()}}class yu{constructor(){l(this,"dragged",!1);l(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class As{static Get(e){const i=e.split(".");return i[i.length-1]}}const wu=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function e(s,a){const d=localStorage.getItem(`${s}_favourite`);return d?d.split(",").includes(a):!1}function i(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d){n(s,[a]);return}const c=d.split(",");c.push(a),n(s,c)}function o(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d)return;const c=d.split(",").filter(u=>u!==a);n(s,c)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:i,removeFromFavourite:o,setFavourite:n,isFavourite:e,clearFavourite:r}})();class bu{constructor(){l(this,"list",[]);l(this,"defaultSortModel");l(this,"changeFlag",!1)}Set(e){this.Reset(),e&&(Array.isArray(e)?this.list=e:this.list=vs(e),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(e=>e.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const rn=new bu;function Su(){const n=t.ref(!1),e=t.ref(!1);return{confirmLeave:n,saveButtonClick:e,beforeWindowUnload:s=>{n.value&&s.preventDefault()},formUpdated:()=>{n.value=!0},showConfirmModal:(s,a)=>{n.value&&!e.value?s():a()}}}const Cu=(()=>{const n=(s,a)=>t.onBeforeMount(async()=>{R.F.FTSP.Get().reset(),rn.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:e,showConfirmModal:i}=Su(),o=s=>Fl.onBeforeRouteLeave((a,d,c)=>{i((s||r)(),c)}),r=s=>async()=>{e.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:o,submit:r}})();function zs(n,e){const i=[];if(n)for(let o=0;o<Math.ceil(n.length/e);o++)i[o]=n.slice(o*e,o*e+e);return i}class Lo{constructor(){l(this,"items",[]);l(this,"idx",0);l(this,"key","")}preSelect(){const e=xt.GetStringQueryParam(this.key);if(!e||e==="undefined"){this.Select(0);return}const i=this.items.findIndex(o=>o.slug===e);i>-1&&this.Select(i)}static Create(e,i){const o=new Lo;return o.key=e,o.items=i,o.items.length&&o.preSelect(),o}Select(e){if(this.items.length){if(e===void 0)return this.preSelect();this.idx=e,xt.SetQueryParam(this.key,this.GetSlug())}}GetMenu(){return this.items[this.idx]}GetComponent(){return this.items[this.idx].component}GetSlug(){return this.items[this.idx].slug}}const lo=class lo{static Format(e){let i=e;if(!i)e=i;else{(i[0]==="7"||i[0]==="8")&&i.length!==1&&(i=i.slice(1));const o=i.replace(/\+7|[^\d]/g,""),r=o.length;switch(!0){case r===0:e="";break;case(r===1&&i.length===1&&o==="7"):case(r===1&&i.length===1&&o==="8"):e="+7 (";break;case r<4:e=`+7 (${o}`;break;case r<7:e=`+7 (${o.slice(0,3)}) ${o.slice(3)}`;break;case r<9:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}`;break;default:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}-${o.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};l(lo,"validatePhone",(e,i,o)=>{lo.getPhoneRegExp().test(i)||!i?o():o(new Error("Пожалуйста, введите корректный номер телефона"))});let Ho=lo;class ku{static Count(e){const i=e.filter(s=>s.rating!==0);let o=0;i.forEach(s=>o=o+s.rating);const r=o/i.length;return isNaN(r)?0:Number((o/i.length).toFixed(2))}}class xu{static async Auth(e){e&&e()}static Dev(){}}class Eu{constructor(){l(this,"startHour",9);l(this,"startHM",`${this.startHour}:00`);l(this,"endHour",19);l(this,"endHM",`${this.endHour}:00`);l(this,"timelinePxHeight",50);l(this,"timelineStep",qn.FiveMinutes);l(this,"timelines",Ci[qn.FiveMinutes])}periodIsCorrect(e,i){return ie.GtOrEq(e,this.startHM)&&ie.GtOrEq(this.endHM,i)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Ci[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return vt.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,i,o,r){return r.filter(s=>s.id!==o).every(s=>!ie.PeriodsIntersects(e,i,s.startTime,s.endTime))}sortByStartTime(e){e.sort((i,o)=>ie.HMtoM(i.startTime)-ie.HMtoM(o.startTime))}}const Bu=-68;function $u(n,e){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const i=document.querySelector(n),o=e??Bu;let r=0;i&&(r=i.getBoundingClientRect().top+o+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class Nu{static Sort(e){e.forEach((i,o)=>i.order=o)}}class Oi{static Wait(e,i){return new Promise(o=>setTimeout(()=>o(i),e))}static WaitS(e,i){return Oi.Wait(ie.S(e),i)}static WaitM(e,i){return Oi.Wait(ie.M(e),i)}}function Mu(n,e){let i=!0;return n.value.validate(o=>(o||(i=!1),i)),i}const Iu=n=>new Promise(e=>{if(document.querySelector(n))return e(document.querySelector(n));const i=new MutationObserver(()=>{document.querySelector(n)&&(i.disconnect(),e(document.querySelector(n)))});i.observe(document.body,{childList:!0,subtree:!0})});let Vu=class Rr{constructor(e){l(this,"id");l(this,"message","");l(this,"userName");l(this,"createdOn",new Date);l(this,"chatId");l(this,"type","message");O.BuildClass(this,e)}static Create(e,i,o,r){const s=new Rr;return s.id=Ut(),s.chatId=e,s.message=o,s.userName=r,s}static CreatePingMessage(){const e=new Rr;return e.type="ping",e.id=Ut(),e}isMessage(){return this.type==="message"||this.type===""}};const Tu="";class Ru{constructor(e="",i="",o="set"){l(this,"client");l(this,"endpoint","");l(this,"query","");l(this,"period",2e4);O.BuildClass(this,{endpoint:e,query:i,mutation:o}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(Vu.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,Tu.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}let Pu=(oe=class{},l(oe,"Arrays",vt),l(oe,"Axios",ei),l(oe,"BaseStore",ce),l(oe,"Cache",Fi),l(oe,"Classes",O),l(oe,"CarouselSwipe",ru),l(oe,"Color",au),l(oe,"CreateSortModels",vs),l(oe,"Cursor",lu),l(oe,"DateMask",mu),l(oe,"Dates",Et),l(oe,"Dragger",yu),l(oe,"Extension",As),l(oe,"Favourite",wu),l(oe,"Hooks",Cu),l(oe,"HttpClient",Ce),l(oe,"Id",De),l(oe,"MakeCarousel",zs),l(oe,"Period",go),l(oe,"PhoneService",Ho),l(oe,"Rating",ku),l(oe,"Router",xt),l(oe,"RouterGuard",xu),l(oe,"Scheduler",Eu),l(oe,"Scroll",$u),l(oe,"Sorter",Nu),l(oe,"Static",bo),l(oe,"Strings",re),l(oe,"Time",ie),l(oe,"Timer",Oi),l(oe,"Token",Kn),l(oe,"Menus",Lo),l(oe,"validate",Mu),l(oe,"WaitElement",Iu),l(oe,"WebSocketClient",Ru),oe);class vu{constructor(){l(this,"limit",25);l(this,"count",0);l(this,"curPage",1);l(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Ds=new vu;var Fs=(n=>(n.TableList="tableList",n.Default="",n))(Fs||{}),Bt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Bt||{}),Os=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(Os||{}),_s=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(_s||{}),Uo=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Uo||{});const Au=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:Fs,Animations:Bt,CalendarScale:Os,LocalStoreKeys:lt,SocialTypes:_s,ValueRelation:Uo},Symbol.toStringTag,{value:"Module"}));let zu=class{async Login(e=Ae.Form.GetValues()){const i=await Ce.Post({query:"auth/login",payload:e});if(!i)throw"Ошибка авторизации";Ae.Status.SetState(i)}async LoginAs(e){await Ce.Post({query:"auth/login-as",payload:{email:e}})}async Register(e=Ae.Form.GetValues()){const i=await Ce.Post({query:"auth/register",payload:e});if(!i)throw i}async RestorePassword(e=Ae.Form.GetValues()){await Ce.Post({query:"auth/restore-password",payload:e})}async PasswordChange(e=Ae.Form.GetValues()){e.id=xt.GetStringParam("userId"),await Ce.Put({query:"auth/password-change",payload:e})}async RefreshToken(){await Ce.Post({query:"auth/refresh-token",payload:{refreshToken:Kn.getRefreshToken()}})}async CheckUuid(e){await Ce.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}async ConfirmEmail(e){await Ce.Get({query:`auth/confirm-email/${e}`})}async EmailIsConfirm(e){await Ce.Get({query:`auth/email-is-confirm/${e}`})}};const Du=new zu;var Fu=Object.defineProperty,_i=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Fu(e,i,r),r};const ti=class Vl{constructor(e){l(this,"id");l(this,"description","");l(this,"time","");l(this,"latitude","");l(this,"longitude","");l(this,"emails",[]);l(this,"postAddresses",[new ki]);l(this,"phones",[]);l(this,"websites",[]);O.BuildClass(this,e)}addEmail(){const e=Jt.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=Kt.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new Vl;return e.id=De.UUID(),e}removeEmail(e){O.RemoveFromClassById(e,this.emails)}removePhone(e){O.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new ki)}addWebsite(){this.websites.push(new So)}pushFirst(){this.emails.length||this.emails.push(new Jt),this.phones.length||this.phones.push(new Kt)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};_i([O.GetClassConstructor(Jt)],ti.prototype,"emails"),_i([O.GetClassConstructor(ki)],ti.prototype,"postAddresses"),_i([O.GetClassConstructor(Kt)],ti.prototype,"phones"),_i([O.GetClassConstructor(So)],ti.prototype,"websites");let Ls=ti,Ou=class extends ce{constructor(){super(Ls,"contacts")}};const _u=new Ou;let Lu=class extends ce{constructor(){super(Jt,"emails")}};const Hu=new Lu;class qo{constructor(e){l(this,"id");l(this,"ftsp");l(this,"name","");O.BuildClass(this,e)}static Create(e){const i=new qo;return i.id=De.UUID(),i.ftsp=JSON.stringify(e),i}}let Uu=class extends ce{constructor(){super(qo,"ftsp-presets")}};const qu=new Uu;let ju=class extends ce{constructor(){super(Ur,"humans")}};const Wu=new ju;let Gu=class extends ce{constructor(){super(Kt,"phones")}};const Qu=new Gu;class Yu{constructor(e){l(this,"id");l(this,"nameRus","");O.BuildClass(this,e)}}var Xu=Object.defineProperty,Zu=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Xu(e,i,r),r};class Hs{constructor(e){l(this,"id");l(this,"nameRus","");l(this,"fields",[]);O.BuildClass(this,e)}}Zu([O.GetClassConstructor(Yu)],Hs.prototype,"fields");let Ju=class extends ce{constructor(){super(Hs,"schemas")}};const Ku=new Ju;class Us{constructor(e){l(this,"id","");l(this,"value","");l(this,"label","");l(this,"key","");l(this,"description","");l(this,"route","");l(this,"searchElementMetas",[]);O.BuildClass(this,e)}}class ef{constructor(e){l(this,"id");l(this,"name","");l(this,"label","");O.BuildClass(this,e)}}var tf=Object.defineProperty,qs=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&tf(e,i,r),r};class Mn{constructor(e){l(this,"id");l(this,"key","");l(this,"label","");l(this,"order",0);l(this,"route","");l(this,"table","");l(this,"active",!0);l(this,"searchColumn","");l(this,"descriptionColumn","");l(this,"labelColumn","");l(this,"valueColumn","");l(this,"options",[]);l(this,"searchGroupMetaColumns",[]);O.BuildClass(this,e)}}qs([O.GetClassConstructor(Us)],Mn.prototype,"options"),qs([O.GetClassConstructor(ef)],Mn.prototype,"searchGroupMetaColumns");class jo{constructor(e){l(this,"query","");l(this,"key","");l(this,"params","");l(this,"suggester",!1);l(this,"mustBeTranslated",!0);l(this,"options",[]);l(this,"searchGroupId","");l(this,"searchGroups",[]);l(this,"searchGroup",new Mn);l(this,"searchObjects",[]);l(this,"pagination",new Bi);l(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(i=>new Mn(i))),e.searchGroup&&(this.searchGroup=new Mn(e.searchGroup)),e.options&&(this.options=e.options.map(i=>new Us(i))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const i=this.searchGroups.find(o=>o.id===e);i?this.searchGroup=i:this.searchGroup=new Mn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(xt.Route().query.groupId)}setQuery(){const e=xt.Route().query.query;e&&(this.query=e)}}let nf=class{constructor(){l(this,"isSearchDrawerOpen",t.ref(!1));l(this,"searchModel",t.reactive(new jo));l(this,"searchGroups",t.reactive([]));l(this,"count",0)}async Search(e){const i=await Ce.Get({query:`search?key=${e.key}&query=${e.query}`});i&&i.searchGroup&&i.searchGroup.options.forEach(o=>{e.searchObjects.push({id:o.id,value:o.value,label:o.label,description:o.description})})}async mainSearch(e){this.SetSearchModel(await Ce.Get({query:`search/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(o=>{o.options=[]});const i=await Ce.Get({query:`search/main?searchModel=${e.toUrl()}`});return this.SetSearchModel(i),i}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new jo}SetSearchModel(e){e&&(this.searchModel=new jo(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Wo=new nf;let of=class extends ce{constructor(){super(xi,"users-accounts")}};const rf=new of;var qe=(n=>(n.String="string",n.Text="text",n.Number="number",n.Date="date",n.DateTime="dateTime",n.Radio="radio",n.Set="set",n.Boolean="boolean",n.Files="files",n.File="file",n.MatrixRadio="matrixRadio",n.MatrixSet="matrixSet",n))(qe||{});class js{constructor(e){l(this,"id");l(this,"name",qe.String);l(this,"valueRelation",Uo.simple);O.BuildClass(this,e)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===qe.Radio)return"RadioProp";if(this.name===qe.Set)return"SetProp";if(this.name===qe.Number)return"NumberProp";if(this.name===qe.String)return"StringProp"}}let sf=class extends ce{constructor(){super(js,"value-types")}};const af=new sf;let Ws=(ot=class{},l(ot,"Auth",Du),l(ot,"Contacts",_u),l(ot,"Emails",Hu),l(ot,"FileInfos",new ce(Ge,"file-infos")),l(ot,"FTSPPresets",qu),l(ot,"Humans",Wu),l(ot,"Phones",Qu),l(ot,"Schemas",Ku),l(ot,"UserAccounts",rf),l(ot,"ValueTypes",af),l(ot,"Search",Wo),ot);var qt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(qt||{});let lf=(Xt=class{},l(Xt,"Orders",ct),l(Xt,"Sizes",qt),l(Xt,"Statuses",me),l(Xt,"DataTypes",Te),l(Xt,"ValueTypes",qe),l(Xt,"Operators",Se),Xt);class cf{constructor(){l(this,"title","");l(this,"buttons",[]);l(this,"editTitle",t.ref(!1));l(this,"showEdit",t.ref(!1))}Set(e="",i){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=i}}const df=new cf;class uf{constructor(){l(this,"menu",[]);l(this,"path","");l(this,"isOpen",!0);l(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var i;return re.SearchIn(e.name,this.filterString)||((i=e.children)==null?void 0:i.some(o=>re.SearchIn(o.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var i;return this.filterString?(i=e.children)==null?void 0:i.filter(o=>re.SearchIn(o.name,this.filterString)):e.children}}const ff=new uf;class hf{constructor(){l(this,"Menu",t.reactive(ff));l(this,"Head",t.reactive(df))}}const mf=new hf,Gs="Да",Qs="Нет";class pf extends Sn{constructor(){super(...arguments);l(this,"confirmButtonText",Gs);l(this,"cancelButtonText",Qs);l(this,"persistent",!0);l(this,"resolve");l(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(i){const o=typeof i=="string"?{text:i}:i;return this.confirmButtonText=o.confirmButtonText??Gs,this.cancelButtonText=o.cancelButtonText??Qs,this.persistent=o.persistent??!0,super.showMessage(o,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof V.Dialog.create!="function"){console.warn("[sprof] Quasar Dialog plugin is not installed. Add `app.use(Quasar, { plugins: { Dialog } })` (imported from 'quasar') to your app."),this.Settle(()=>s({type:"cancel"}));return}const a=V.Dialog.create({title:this.title||void 0,message:this.text,html:Sn.ContainsHtml(this.text),persistent:this.persistent,ok:{label:this.confirmButtonText,flat:!0,color:"primary"},cancel:{label:this.cancelButtonText,flat:!0,color:"warning"}});a.onOk(()=>this.Settle(()=>r({type:"submit"}))),a.onCancel(()=>this.Settle(()=>s({type:"cancel"}))),a.onDismiss(()=>this.Settle())})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.Settle(()=>{var i;return(i=this.resolve)==null?void 0:i.call(this,!0)})}Cancel(){this.Settle(()=>{var i;return(i=this.reject)==null?void 0:i.call(this)})}Settle(i){i==null||i(),this.resolve=void 0,this.reject=void 0}}const gf=new pf;class yf{constructor(){l(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class wf extends yf{Show(){super.show()}Hide(){super.hide()}}const bf=new wf;class jt{}l(jt,"Admin",mf),l(jt,"Dialog",gf),l(jt,"Loading",bf),l(jt,"Notify",Ct),l(jt,"Btn",Zt),l(jt,"Input",Ar);class R{}l(R,"Auth",t.reactive(Ae)),l(R,"UI",t.reactive(jt)),l(R,"Paginator",t.reactive(Ds)),l(R,"S",Ws),l(R,"H",Pu),l(R,"C",ic),l(R,"T",lf),l(R,"I",Au),l(R,"F",lc);class Ys{constructor(e){l(this,"id");l(this,"name","");l(this,"address","");l(this,"number");l(this,"building");l(this,"buildingId");R.H.Classes.BuildClass(this,e),this.setName()}setName(){this.building&&(this.name=this.building.address+", вход "+this.number,this.address=this.name)}getBuildingNumber(){var e;return String((e=this.building)==null?void 0:e.number)}getEntranceNumber(){return String(this.number)}}class Xs{constructor(e){l(this,"id");l(this,"number");l(this,"buildingId");R.H.Classes.BuildClass(this,e)}}var Sf=Object.defineProperty,Zs=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Sf(e,i,r),r};class Li{constructor(e){l(this,"id");l(this,"number","");l(this,"address","");l(this,"name","");l(this,"status","");l(this,"description","");l(this,"floors",[]);l(this,"entrances",[]);R.H.Classes.BuildClass(this,e)}}Zs([R.H.Classes.GetClassConstructor(Xs)],Li.prototype,"floors"),Zs([R.H.Classes.GetClassConstructor(Ys)],Li.prototype,"entrances");const Cf=Object.freeze(Object.defineProperty({__proto__:null,Building:Li,Entrance:Ys,Floor:Xs},Symbol.toStringTag,{value:"Module"}));let kf=class extends ce{constructor(){super(Li,"buildings")}};const xf=new kf,Ef=Object.freeze(Object.defineProperty({__proto__:null,C:Cf,S:Object.freeze(Object.defineProperty({__proto__:null,BuildingsStore:xf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var In=(n=>(n.Ping="ping",n.Enter="enter",n.Exit="exit",n.Message="message",n.Write="write",n.Empty="",n))(In||{});class sn{constructor(e){l(this,"id");l(this,"userId");l(this,"chatId");l(this,"message","");l(this,"fileInfo",new R.C.FileInfo);l(this,"createdAt",new Date);l(this,"type",In.Message);O.BuildClass(this,e)}static Create(e,i,o){const r=new sn;return r.id=R.H.Id.UUID(),r.chatId=i,r.userId=o,r.message=e,r}static CreatePingMessage(){const e=new sn;return e.type=In.Ping,e.id=R.H.Id.UUID(),e}isMessage(){return this.type===In.Message||this.type===In.Empty}}var Bf=Object.defineProperty,$f=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Bf(e,i,r),r};const Js=class Tl{constructor(e){l(this,"id");l(this,"name","");l(this,"createdAt",new Date);l(this,"newMesage","");l(this,"userId","");l(this,"chatMessages",[]);R.H.Classes.BuildClass(this,e)}static Create(){const e=new Tl;return e.id=R.H.Id.UUID(),e}addMessage(){if(this.newMesage==="")return;const e=sn.Create(this.newMesage,this.id,this.userId);return this.chatMessages.push(e),this.newMesage="",e}};$f([R.H.Classes.GetClassConstructor(sn)],Js.prototype,"chatMessages");let Ks=Js;const Nf=Object.freeze(Object.defineProperty({__proto__:null,Chat:Ks,ChatMessage:sn},Symbol.toStringTag,{value:"Module"}));let Mf=class extends ce{constructor(){super(sn,"chat-messages")}};const If=new Mf;let Vf=class extends ce{constructor(){super(Ks,"chats")}};const Tf=new Vf,Rf=Object.freeze(Object.defineProperty({__proto__:null,C:Nf,S:Object.freeze(Object.defineProperty({__proto__:null,ChatMessages:If,Chats:Tf},Symbol.toStringTag,{value:"Module"})),T:(kr=class{},l(kr,"ChatMessage",In),kr)},Symbol.toStringTag,{value:"Module"}));class ea{constructor(e){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Ge);R.H.Classes.BuildClass(this,e)}}class ni{constructor(e){l(this,"id");l(this,"passportId");l(this,"fileInfoId");l(this,"fileInfo",new R.C.FileInfo);l(this,"order",0);O.BuildClass(this,e)}static Create(e){const i=new ni;return i.id=R.H.Id.UUID(),i.passportId=e,i}}var Pf=Object.defineProperty,vf=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Pf(e,i,r),r};class Go{constructor(e){l(this,"id");l(this,"num","");l(this,"seria","");l(this,"division","");l(this,"divisionCode","");l(this,"citzenship","");l(this,"date",new Date);l(this,"address","");l(this,"passportScans",[]);O.BuildClass(this,e)}}vf([O.GetClassConstructor(ni)],Go.prototype,"passportScans");class ta{constructor(e){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Ge);R.H.Classes.BuildClass(this,e)}}const Af=Object.freeze(Object.defineProperty({__proto__:null,Inn:ea,Passport:Go,PassportScan:ni,Snils:ta},Symbol.toStringTag,{value:"Module"}));let zf=class extends ce{constructor(){super(ea,"inns")}};const Df=new zf;let Ff=class extends ce{constructor(){super(ni,"passport-scans")}};const Of=new Ff;let _f=class extends ce{constructor(){super(Go,"passports")}};const Lf=new _f;let Hf=class extends ce{constructor(){super(ta,"snilss")}};const Uf=new Hf,qf=Object.freeze(Object.defineProperty({__proto__:null,C:Af,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Df,PassportScans:Of,Passports:Lf,Snilss:Uf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Qo{constructor(e){l(this,"id");l(this,"name","");R.H.Classes.BuildClass(this,e)}static Create(e){const i=new Qo;return i.id=R.H.Id.UUID(),i.name=e,i}}const jf=Object.freeze(Object.defineProperty({__proto__:null,Extract:Qo},Symbol.toStringTag,{value:"Module"})),Wf=[{path:"/admin/extracts",name:"ExtractsList",component:()=>Promise.resolve().then(()=>cw)}];class ii{constructor(e){l(this,"id");l(this,"name","");l(this,"label","");R.H.Classes.BuildClass(this,e)}static Create(e,i){const o=new ii;return o.id=R.H.Id.UUID(),o.name=e,o.label=i,o}}let Gf=class extends ce{constructor(){super(ii,"extracts")}};const Qf=new Gf,Yf=Object.freeze(Object.defineProperty({__proto__:null,C:jf,R:Wf,S:Object.freeze(Object.defineProperty({__proto__:null,ExtractsStore:Qf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class an{constructor(e){l(this,"id");l(this,"name","");l(this,"score",0);l(this,"order",0);l(this,"showMoreQuestions",!1);l(this,"showOther",!1);l(this,"fieldId");l(this,"isMatrixY",!1);R.H.Classes.BuildClass(this,e)}static Create(e){const i=new an;return i.id=R.H.Id.UUID(),i.fieldId=e,i}}class na{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fieldId");R.H.Classes.BuildClass(this,e)}}class Yo{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);R.H.Classes.BuildClass(this,e)}}class Vn{constructor(e){l(this,"id");l(this,"name","");l(this,"fieldId");R.H.Classes.BuildClass(this,e)}static Create(e){const i=new Vn;return i.id=R.H.Id.UUID(),i.fieldId=e,i}}var Xf=Object.defineProperty,oi=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Xf(e,i,r),r};const ln=class fo{constructor(e){l(this,"id");l(this,"name","");l(this,"code","");l(this,"valueTypeId");l(this,"order",0);l(this,"ageCompare",!1);l(this,"answerVariants",[]);l(this,"answerVariantsForDelete",[]);l(this,"fieldExamples",[]);l(this,"fieldVariants",[]);l(this,"valueType",new js);l(this,"fieldMeasures",[]);l(this,"showSet",!1);l(this,"showRadio",!1);l(this,"isEdit",!1);l(this,"children",[]);l(this,"parentId");l(this,"formSectionId");l(this,"selected",!1);R.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const i=new fo;return i.id=R.H.Id.UUID(),i.formSectionId=e,i}getRegisterPropertyRadioOriginalValue(e){const i=this.answerVariants.find(o=>o.id===e);return i?i.name:""}addRadioItem(e){const i=new an(e);i.order=this.answerVariants.length,this.answerVariants.push(i)}removeRadioItem(e){const i=this.answerVariants[e].id;i&&this.answerVariantsForDelete.push(i),this.answerVariants.splice(e,1)}changeRelation(e){const i=e.find(o=>o.id===this.valueTypeId);if(i){if(i.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(i.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=i}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,i)=>e.order=i)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new Yo(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new Vn)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=an.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=fo.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=Vn.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new fo(this);return e.id=R.H.Id.UUID(),e.answerVariants.forEach(i=>{i.id=R.H.Id.UUID(),i.fieldId=e.id}),e.children=e.children.map(i=>{const o=i.copy();return o.parentId=e.id,o}),e}};oi([R.H.Classes.GetClassConstructor(an)],ln.prototype,"answerVariants"),oi([R.H.Classes.GetClassConstructor(na)],ln.prototype,"fieldExamples"),oi([R.H.Classes.GetClassConstructor(Vn)],ln.prototype,"fieldVariants"),oi([R.H.Classes.GetClassConstructor(Yo)],ln.prototype,"fieldMeasures"),oi([R.H.Classes.GetClassConstructor(ln)],ln.prototype,"children");let Hi=ln;class Xo{constructor(e){l(this,"id");l(this,"answerId");l(this,"comment","");l(this,"fileInfoId");l(this,"fileInfo",new Ge);R.H.Classes.BuildClass(this,e)}}class cn{constructor(e){l(this,"id");l(this,"answerVariantId");l(this,"answerVariantIdY");l(this,"fieldFillId");R.H.Classes.BuildClass(this,e)}static Create(e,i){const o=new cn;return o.id=Ut(),o.fieldFillId=e,o.answerVariantId=i,o}static GetClassName(){return"selectedAnswerVariant"}}var Zf=Object.defineProperty,ia=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Zf(e,i,r),r};const Zo=class Pr{constructor(e){l(this,"id");l(this,"valueString");l(this,"valueOther");l(this,"valueNumber");l(this,"valueDate");l(this,"fileInfo",new Ge);l(this,"fileInfoId");l(this,"order",0);l(this,"selectedAnswerVariants",[]);l(this,"patientId");l(this,"fieldId");l(this,"formFillId");l(this,"answerVariantId");l(this,"filled",!1);l(this,"researchResultId");l(this,"answerFiles",[]);l(this,"answerFilesForDelete",[]);R.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,i){const o=new Pr;return o.id=Ut(),o.fieldId=e.id,o.formFillId=i,o.order=e.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,i){return e.map(o=>Pr.Create(o,i))}addFile(){const e=new Xo;return e.id=Ut(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(i=>e.push(i.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,i){const o=cn.Create(this.id,e);return o.answerVariantIdY=i,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(e,i){return this.selectedAnswerVariants.find(o=>o.answerVariantId===e&&o.answerVariantIdY===i)}addSelectedAnswerVariant(e){const i=cn.Create(this.id,e);return this.selectedAnswerVariants.push(i),this.filled=!0,i}static GetClassName(){return"answer"}showOther(e){const i=e.find(o=>o.showOther);return i?this.answerVariantId===i.id||this.selectedAnswerVariants.some(o=>o.answerVariantId===i.id):!1}};ia([R.H.Classes.GetClassConstructor(cn)],Zo.prototype,"selectedAnswerVariants"),ia([R.H.Classes.GetClassConstructor(Xo)],Zo.prototype,"answerFiles");let Tn=Zo;class Jf{constructor(e){l(this,"id");l(this,"fieldId");R.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var Kf=Object.defineProperty,eh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Kf(e,i,r),r};const oa=class Rl{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fields",[]);l(this,"formId");R.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,i){return`${this.getFieldN(e)}.${i+1}`}static Create(e){const i=new Rl;return i.id=R.H.Id.UUID(),i.formId=e,i}addField(){const e=Hi.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,i)=>e.order=i)}getAnswerVariants(){const e=[];return this.fields.forEach(i=>e.push(...i.answerVariants)),e}};eh([R.H.Classes.GetClassConstructor(Hi)],oa.prototype,"fields");let Ui=oa;var th=Object.defineProperty,nh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&th(e,i,r),r};const ra=class Pl{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"isLaboratory",!1);l(this,"formSections",[]);l(this,"isEdit",!1);l(this,"withDates",!1);l(this,"withScores",!1);l(this,"selectedForExport",!1);l(this,"filterString","");l(this,"showOnlyNotFilled",!1);l(this,"showOnlyFilled",!1);R.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new Pl;return e.id=R.H.Id.UUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=Ui.Create(this.id);return this.formSections.push(e),R.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(o=>o.fields).flat(),i=e.map(o=>o.children).flat();return e.concat(i).filter(o=>o.children.length===0)}};nh([R.H.Classes.GetClassConstructor(Ui)],ra.prototype,"formSections");let sa=ra;var ih=Object.defineProperty,oh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&ih(e,i,r),r};const aa=class vl{constructor(e){l(this,"id");l(this,"date",new Date);l(this,"editMode",!1);l(this,"userFormId");l(this,"fillingPercentage",0);l(this,"fieldFills",[]);l(this,"num","");l(this,"formId");R.H.Classes.BuildClass(this,e)}static Create(e){const i=new vl;return i.id=R.H.Id.UUID(),i.formId=e.id,i.fieldFills.push(...Tn.CreateMany(e.getFields(),i.id)),i}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var i;return(i=this.fieldFills)==null?void 0:i.find(o=>o.fieldId===e)}pushRegisterProperty(e){const i=new Tn;i.researchResultId=e,this.fieldFills.push(i)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(i=>i.researchResultId===e)}getOrCreateFieldFill(e){let i=this.getFieldFill(e.id);return i||(i=Tn.Create(e),this.addFieldFill(i)),i}getFileInfos(){const e=[];return this.fieldFills.forEach(i=>e.push(...i.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(o=>o.filled).length,i=this.fieldFills.length;this.fillingPercentage=Math.round(e/i*100)}getFieldFillByFieldId(e){return this.fieldFills.find(i=>i.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(i=>i.answerVariantId===e)}getFieldsFieldFillsMap(e){const i={};return e.forEach(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;i[o.code]=s}}),i}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};oh([R.H.Classes.GetClassConstructor(Tn)],aa.prototype,"fieldFills");let la=aa;const rh=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:an,Field:Hi,FieldExample:na,FieldFill:Tn,FieldFillFile:Xo,FieldFilter:Jf,FieldMeasure:Yo,FieldVariant:Vn,Form:sa,FormFill:la,FormSection:Ui,SelectedAnswerVariant:cn},Symbol.toStringTag,{value:"Module"}));let sh=class extends ce{constructor(){super(an,"answer-variants")}};const ah=new sh;let lh=class extends ce{constructor(){super(Tn,"field-fills")}};const ch=new lh;let dh=class extends ce{constructor(){super(Hi,"fields")}};const uh=new dh;let fh=class extends ce{constructor(){super(la,"form-fills")}};const hh=new fh;let mh=class extends ce{constructor(){super(Ui,"form-sections")}};const ph=new mh;let gh=class extends ce{constructor(){super(sa,"forms")}};const yh=new gh;let wh=class extends ce{constructor(){super(cn,"selected-answer-variants")}};const bh=new wh,Sh=Object.freeze(Object.defineProperty({__proto__:null,C:rh,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:ah,FieldFills:ch,Fields:uh,FormFills:hh,FormSections:ph,Forms:yh,SelectedAnswerVariants:bh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class qi{constructor(e){l(this,"id");l(this,"name","");l(this,"link","");l(this,"selected",!1);l(this,"hide",!1);l(this,"editMode",!1);l(this,"color","");l(this,"background","");l(this,"order",0);l(this,"menuId");l(this,"iconId");l(this,"icon",new Ge);l(this,"iconName","");l(this,"svgCode","");O.BuildClass(this,e)}addFile(e){this.icon.id||(this.icon.id=De.UUID()),this.icon.originalName=e.name,this.icon.file=e.raw}}var Ch=Object.defineProperty,kh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Ch(e,i,r),r};class Jo{constructor(e){l(this,"id");l(this,"name","");l(this,"link","");l(this,"top",!0);l(this,"side",!0);l(this,"show",!1);l(this,"hide",!1);l(this,"active",!1);l(this,"order",0);l(this,"selected",!1);l(this,"editMode",!1);l(this,"subMenus",[]);l(this,"subMenusForDelete",[]);l(this,"iconId");l(this,"icon",new Ge);O.BuildClass(this,e)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const e=[];return e.push(this.icon),this.subMenus.forEach(i=>{e.push(i.icon)}),e}addFile(e){this.icon.id||(this.icon.id=De.UUID()),this.icon.originalName=e.name,this.icon.file=e.raw}addSubMenu(){this.subMenus.push(new qi)}removeSubMenu(e){const i=this.subMenus[e].id;i&&this.subMenusForDelete.push(i),this.subMenus.splice(e,1)}setColorsForSubMenus(){const e=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let i=0;this.subMenus.forEach(o=>{o.color=e[i],i=e.length-1?i=0:i++})}containPath(e){return this.link===e||!!this.subMenus.find(i=>i.link===e)}static GetClassName(){return"menu"}}kh([O.GetClassConstructor(qi)],Jo.prototype,"subMenus");const xh=Object.freeze(Object.defineProperty({__proto__:null,Menu:Jo,SubMenu:qi},Symbol.toStringTag,{value:"Module"}));let Eh=class extends R.H.BaseStore{constructor(){super(Jo,"menus")}};const Bh=new Eh;let $h=class extends R.H.BaseStore{constructor(){super(qi,"sub-menus")}};const Nh=new $h,Mh=Object.freeze(Object.defineProperty({__proto__:null,C:xh,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:Bh,SubMenus:Nh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class ji{constructor(e){l(this,"id","");l(this,"name","");l(this,"component","");l(this,"order");l(this,"active",!1);l(this,"key",0);O.BuildClass(this,e)}static Create(e,i,o,r,s){const a=new ji;return a.id=e,a.name=i,a.component=o,a.order=r,a.active=!!s,a}}var ca=(n=>(n.User="USER",n.Admin="ADMIN",n))(ca||{});class Ih{constructor(e){l(this,"id");l(this,"name",ca.User);l(this,"label","");l(this,"startPage","");O.BuildClass(this,e)}}class Ko{constructor(e){l(this,"id");l(this,"document",new Ge);l(this,"documentId");l(this,"pageId");O.BuildClass(this,e)}}var Vh=Object.defineProperty,Th=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Vh(e,i,r),r};class Wi{constructor(e){l(this,"id");l(this,"pageId");l(this,"fileInfoId");l(this,"fileInfo");l(this,"description");O.BuildClass(this,e)}}Th([O.GetClassConstructor(Ge)],Wi.prototype,"fileInfo");class Gi{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"downloadToFile",!1);l(this,"pageSectionId");l(this,"scan",new Ge);l(this,"scanId");O.BuildClass(this,e)}getFileInfos(){return[this.scan]}getFileName(){return this.name?this.name:this.scan.originalName}}var Rh=Object.defineProperty,Ph=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Rh(e,i,r),r};class Rn{constructor(e){l(this,"id");l(this,"name","");l(this,"singleScan",!1);l(this,"scan");l(this,"scanId");l(this,"order",0);l(this,"description","");l(this,"scans",[]);l(this,"scansForDelete",[]);l(this,"pageSectionDocuments",[]);l(this,"pageSideMenuId");l(this,"pageId");l(this,"text","");l(this,"documents",[]);O.BuildClass(this,e),this.documents=this.pageSectionDocuments,this.text=this.description.replace("<p>undefined</p>","")}addDocument(){const e=new Gi;e.order=this.pageSectionDocuments.length-1,this.pageSectionDocuments.push(e)}getFileInfos(){const e=[];return this.pageSectionDocuments.forEach(i=>{e.push(...i.getFileInfos())}),e}infoExists(e){const i=re.SearchIn(this.name,e),o=re.SearchIn(this.description,e),r=this.getDocuments(e);return i||o||r.length>0}getDocuments(e){return this.pageSectionDocuments.filter(i=>re.SearchIn(i.name,e))}getDescription(e){return e?re.WrapSubStr(this.description,e):this.description}filter(e){if(!e){this.text=this.description,this.documents=this.pageSectionDocuments;return}this.text=re.SearchIn(this.description,e)?re.WrapSubStr(this.description,e):"",this.documents=this.pageSectionDocuments.filter(i=>re.SearchIn(i.name,e))}}Ph([O.GetClassConstructor(Gi)],Rn.prototype,"pageSectionDocuments");var vh=Object.defineProperty,Ah=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&vh(e,i,r),r};class Wt{constructor(e){l(this,"id");l(this,"name","Новое меню");l(this,"order",0);l(this,"description","");l(this,"routeAnchor","");l(this,"slug","");l(this,"pageSections",[]);l(this,"showContent",!1);l(this,"pageId");l(this,"selected",!1);l(this,"sections",[]);l(this,"text","");O.BuildClass(this,e),this.sections=this.pageSections,this.text=this.description.replace("<p>undefined</p>","")}getFileInfos(){const e=[];return this.pageSections.forEach(i=>{e.push(...i.getFileInfos())}),e}addPageSection(){const e=new Rn;e.order=this.pageSections.length+1,e.name=`Новой раздел ${e.order}`,e.id=De.UUID(),this.pageSections.push(e)}infoExists(e){const i=re.SearchIn(this.name,e),o=re.SearchIn(this.description,e),r=this.getPageSections(e).length>0;return i||o||r}getPageSections(e){return e.length?this.pageSections.filter(i=>i.infoExists(e)):this.pageSections}filter(e){e.length?(this.sections=this.pageSections.filter(i=>i.infoExists(e)),this.text=re.SearchIn(this.description,e)?re.WrapSubStr(this.description,e):""):(this.sections=this.pageSections,this.text=this.description),this.sections.forEach(i=>i.filter(e))}}Ah([O.GetClassConstructor(Rn)],Wt.prototype,"pageSections");var zh=Object.defineProperty,Qi=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&zh(e,i,r),r};class Pn{constructor(e){l(this,"id");l(this,"title","");l(this,"content","");l(this,"slug","");l(this,"pagesGroup","Без группы");l(this,"link","");l(this,"withComments",!1);l(this,"showContacts",!1);l(this,"collaps",!1);l(this,"showContent",!1);l(this,"pageImages",[]);l(this,"pageImagesForDelete",[]);l(this,"pageImagesNames",[]);l(this,"pageSideMenus",[]);l(this,"menus",[]);l(this,"pageSideMenusForDelete",[]);l(this,"pageSections",[]);l(this,"pageSectionsForDelete",[]);l(this,"pageDocuments",[]);l(this,"contact",new Ls);l(this,"contactId");l(this,"role",new Ih);l(this,"roleId");l(this,"filterStr","");l(this,"activeMenuId","");O.BuildClass(this,e),this.menus=this.pageSideMenus}getActiveMenu(){const e=this.pageSideMenus.find(i=>i.id===this.activeMenuId);return e||this.pageSideMenus[0]}setActiveMenuId(e){this.activeMenuId=e}getLink(){return this.slug!==""?`/pages/${this.slug}`:"404"}getFileInfos(){const e=[];return this.pageSideMenus.forEach(i=>{e.push(...i.getFileInfos())}),this.pageImages.forEach(i=>{i.fileInfo&&e.push(i.fileInfo)}),e}addSideMenu(){const e=new Wt;return e.order=this.pageSideMenus.length+1,e.name=`Новое меню ${e.order}`,e.id=De.UUID(),this.pageSideMenus.push(e),e.id}selectSideMenu(e,i){if(!e&&this.pageSideMenus.length>0){this.pageSideMenus[0].selected=!0;return}this.pageSideMenus.forEach(o=>{i?o.selected=o.id===e:o.selected=o.slug===e})}getSelectedSideMenu(){const e=this.pageSideMenus.find(i=>i.selected);return e||new Wt}addCustomSectionsToSideMenu(e){e.forEach(i=>{const o=new Wt;o.id=i.id,o.name=i.name,typeof i.order<"u"?this.pageSideMenus.splice(i.order,0,o):this.pageSideMenus.push(o)})}getPageSideMenus(){if(this.showContacts&&!this.pageSideMenus.find(e=>e.id==="contacts")){const e=new Wt;e.id="contacts",e.name="Контакты",this.pageSideMenus.push(e)}return this.filterStr===""?this.pageSideMenus:this.pageSideMenus.filter(e=>e.infoExists(this.filterStr))}filter(){this.filterStr===""?this.menus=this.pageSideMenus:this.menus=this.pageSideMenus.filter(e=>e.infoExists(this.filterStr)),this.menus.forEach(e=>e.filter(this.filterStr))}static GetClassName(){return"page"}}Qi([O.GetClassConstructor(Wi)],Pn.prototype,"pageImages"),Qi([O.GetClassConstructor(Wt)],Pn.prototype,"pageSideMenus"),Qi([O.GetClassConstructor(Rn)],Pn.prototype,"pageSections"),Qi([O.GetClassConstructor(Ko)],Pn.prototype,"pageDocuments");const Dh=Object.freeze(Object.defineProperty({__proto__:null,CustomSection:ji,Page:Pn,PageDocument:Ko,PageImage:Wi,PageSection:Rn,PageSectionDocument:Gi,PageSideMenu:Wt},Symbol.toStringTag,{value:"Module"}));let Fh=class extends R.H.BaseStore{constructor(){super(ji,"custom-sections")}};const Oh=new Fh;let _h=class extends R.H.BaseStore{constructor(){super(Ko,"page-documents")}};const Lh=new _h;let Hh=class extends R.H.BaseStore{constructor(){super(Wi,"page-images")}};const Uh=new Hh;let qh=class extends R.H.BaseStore{constructor(){super(Gi,"page-section-documents")}};const jh=new qh;let Wh=class extends R.H.BaseStore{constructor(){super(Rn,"page-sections")}};const Gh=new Wh;let Qh=class extends R.H.BaseStore{constructor(){super(Wt,"page-side-menus")}};const Yh=new Qh;let Xh=class extends R.H.BaseStore{constructor(){super(Pn,"pages")}};const Zh=new Xh,Jh=Object.freeze(Object.defineProperty({__proto__:null,C:Dh,S:Object.freeze(Object.defineProperty({__proto__:null,CustomSections:Oh,PageDocuments:Lh,PageImages:Uh,PageSectionDocuments:jh,PageSections:Gh,PageSideMenus:Yh,Pages:Zh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class zt{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"sessionId");l(this,"payload",{});R.H.Classes.BuildClass(this,e)}static Create(e){const i=new zt;return i.id=R.H.Id.UUID(),i.scheduleId=e,i.startTime="9:00",i.endTime="9:30",i}}var Kh=Object.defineProperty,em=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Kh(e,i,r),r};const da=class Al{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"slots",[]);R.H.Classes.BuildClass(this,e)}static Create(e){const i=new Al;return i.id=R.H.Id.UUID(),i.scheduleId=e,i.startTime="9:00",i.endTime="9:30",i}};em([R.H.Classes.GetClassConstructor(zt)],da.prototype,"slots");let vn=da;var tm=Object.defineProperty,ua=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&tm(e,i,r),r};const er=class zl{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"scheduleDayId");l(this,"placeId");l(this,"sessions",[]);l(this,"slots",[]);R.H.Classes.BuildClass(this,e)}static Create(e,i){const o=new zl;return o.id=R.H.Id.UUID(),o.placeId=e,o.scheduleDayId=i,o}addSession(){const e=vn.Create(this.id);return this.sessions.push(e),e}addSlot(){const e=zt.Create(this.id);return this.slots.push(e),e}};ua([R.H.Classes.GetClassConstructor(vn)],er.prototype,"sessions"),ua([R.H.Classes.GetClassConstructor(zt)],er.prototype,"slots");let ri=er;var nm=Object.defineProperty,im=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&nm(e,i,r),r};const fa=class Dl{constructor(e){l(this,"id");l(this,"date",new Date(0));l(this,"description","");l(this,"ownerId");l(this,"ownerType","");l(this,"schedules",[]);R.H.Classes.BuildClass(this,e)}static Create(e,i,o=new Date){const r=new Dl;return r.id=R.H.Id.UUID(),r.ownerId=e,r.ownerType=i||"",r.date=o,r}};im([R.H.Classes.GetClassConstructor(ri)],fa.prototype,"schedules");let Yi=fa;class An{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"color","");R.H.Classes.BuildClass(this,e)}static Create(){const e=new An;return e.id=R.H.Id.UUID(),e}}const om=Object.freeze(Object.defineProperty({__proto__:null,Schedule:ri,ScheduleDay:Yi,SchedulePlace:An,ScheduleSession:vn,ScheduleSlot:zt},Symbol.toStringTag,{value:"Module"})),de=n=>n?R.H.Time.HMtoM(n):NaN,it=n=>R.H.Time.ConcatHM(Math.floor(n/60),n%60),zn=n=>{if(!n)return"";const e=R.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(e)?e:""},si=(n,e)=>R.H.Time.DiffM(n,e),dn=(n,e)=>R.H.Time.AddMtoHM(n,e),tr=(n,e)=>{const i=de(n.startTime),o=de(e.startTime);return isFinite(i)?isFinite(o)?i-o:-1:1},ai=(n,e)=>{const i=de(n.startTime),o=de(n.endTime),r=de(e.startTime),s=de(e.endTime);return!isFinite(i)||!isFinite(o)||!isFinite(r)||!isFinite(s)?!1:i<s&&r<o},li=(n,e)=>Math.round(n/e)*e,ha=(n,e=8*60,i=20*60)=>{let o=e,r=i;for(const{item:d}of n){const c=de(d.startTime),u=de(d.endTime);isFinite(c)&&(o=Math.min(o,c)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(o/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},ma=(n,e)=>{const i=de(n.item.startTime),o=de(n.item.endTime);if(!isFinite(i)||!isFinite(o))return{top:"0%",height:"48px"};const r=(i-e.start)/e.total*100,s=Math.max((o-i)/e.total*100,2.5);return{top:r+"%",height:s+"%"}},pa=(n,e)=>{const i=de(n.startTime),o=de(n.endTime);if(!isFinite(i)||!isFinite(o)||o<=i)return{top:"0%",height:"auto"};const r=o-i,s=de(e.startTime),a=de(e.endTime),d=isFinite(s)?Math.max((s-i)/r*100,0):0;let c=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return c=Math.min(Math.max(c,3),100-d),{top:d+"%",height:c+"%"}},ga=(n,e,i)=>n.some(o=>o.item.id===e.item.id||e.kind==="session"&&o.kind==="slot"&&o.item.sessionId===e.item.id?!1:i(e.item,o.item)),ya=(n,e,i)=>n.some(o=>o.id!==e.id&&i(e,o)),wa=(n,e,i,o)=>{if(!(!isFinite(e)||!isFinite(i)||i<=e))return(n||[]).find(r=>{const s=o(r.startTime),a=o(r.endTime);return isFinite(s)&&isFinite(a)&&e>=s&&i<=a})},ba=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",nr={hall:"Зал",halls:"Залы",session:"Секция",sessions:"Секции",slot:"Событие",slots:"События",addHall:"Добавить зал",addSession:"Добавить секцию",addSlot:"Добавить событие",addDay:"Добавить день",deleteDay:"Удалить день",deleteHall:"Удалить расписание (зал)",noDays:"Сначала укажите даты",noHalls:"Для этого дня не добавлены залы.",date:"Дата",newHallPlaceholder:"Название нового зала",create:"Создать",close:"Закрыть",save:"Сохранить",cancel:"Отмена",delete:"Удалить",edit:"Редактировать",grid:"Сетка",list:"Список",startTime:"Начало",endTime:"Конец",sessionSelect:"Секция",sessionsTitle:"Секции",slotsTitle:"События",noSlots:"Пусто",noSlotsInDay:"Докладов нет",conflictTitle:"Пересечение с другим блоком в этом зале",changeDurationTitle:"Изменить длительность",gridHint:"Перетаскивайте блоки мышью или пальцем — в другой зал или на другое время. Блоки не сдвигают друг друга: пересечения подсвечиваются красным. Событие, брошенное внутрь секции, автоматически становится её частью. Секции помечены фиолетовым корешком. Клик по блоку — редактирование, нижняя кромка — длительность, двойной клик по пустому месту — новое событие.",listHint:"Перетаскивайте строки — порядок сохраняется, время блоков при этом не меняется.",alreadyAdded:"Зал уже добавлен в этот день",selectDayFirst:"Сначала выберите день",cannotCreate:"Не удалось добавить зал: сервер не ответил",createFailed:"Ошибка при добавлении зала",hallCreated:"Зал «{name}» создан",hallCreateFailed:"Не удалось создать зал",hallNotAdded:"Не удалось добавить зал: сервер не ответил",dayAdded:"День добавлен",saveEventFirst:"Сначала сохраните",correctStartTime:"Укажите корректное время начала",name:"Название",description:"Описание",participants:"Участники",enterName:"Введите название",intoSession:"в секцию",conflictCount:"пересечение"},Sa={createDay(n){return Yi.Create(void 0,void 0,n)},createSchedule(n,e){return ri.Create(n,e)},createSession(n){const e=(n==null?void 0:n.sessions)||[],i=e[e.length-1],o=(i==null?void 0:i.endTime)||"9:00",r=vn.Create(n==null?void 0:n.id);return r.startTime=o,r.endTime=R.H.Time.AddMtoHM(o,30),r},createSlot(n){return zt.Create(n==null?void 0:n.id)},createPlace(n){const e=An.Create();return e.name=n||"",e}},rm={class:"schedule-admin"},sm={key:0,class:"no-days text-center text-grey q-py-xl"},am={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},lm={key:1,class:"row items-center q-gutter-xs zoom-control"},cm={key:0,class:"grid-view"},dm={key:0,class:"text-grey text-center q-py-lg"},um={class:"grid-header"},fm={class:"row items-center justify-center q-gutter-xs"},hm={class:"ellipsis"},mm={class:"time-gutter"},pm=["data-schedule-id","onDblclick"],gm=["title","onPointerdown","onClick"],ym={class:"block-content"},wm={class:"block-time"},bm={class:"block-name ellipsis"},Sm={key:0,class:"block-speakers ellipsis"},Cm={key:0,class:"session-perfoms"},km=["title","onPointerdown","onClick"],xm={class:"nested-time"},Em={class:"nested-name ellipsis"},Bm={key:0,class:"nested-speakers ellipsis"},$m=["title","onPointerdown"],Nm={class:"block-actions"},Mm=["title","onPointerdown"],Im=["title"],Vm={class:"session-spine-name"},Tm={class:"block-time"},Rm={key:0,class:"session-badge"},Pm={key:1,class:"conflict-badge"},vm={class:"block-name ellipsis"},Am={class:"text-caption text-grey-6 q-pa-xs"},zm={key:1,class:"list-view"},Dm={class:"row items-center q-gutter-sm"},Fm={class:"text-subtitle2"},Om={key:0,class:"sub-block"},_m={class:"sub-title"},Lm={class:"list-row session-row"},Hm={key:0,class:"nested-list"},Um={class:"col-4 ellipsis"},qm={class:"time-text"},jm={class:"sub-block"},Wm={class:"sub-title"},Gm={class:"list-row slot-row"},Qm={key:0,class:"text-grey text-center q-py-sm"},Ym={class:"text-caption text-grey-6 q-mb-sm"},Xm={class:"text-h6"},Zm={class:"row items-center q-gutter-sm q-mb-md"},Jm={key:0,class:"text-grey text-center q-py-md"},Km={class:"col ellipsis"},ep={class:"text-h6"},tp={class:"row q-col-gutter-sm q-mb-sm"},np={class:"col-6"},ip={class:"col-6"},un=15,Ca=6,ka=v(t.defineComponent({__name:"ScheduleGridEditor",props:{days:{},places:{},persist:{},labels:{default:()=>({})},factories:{default:()=>({})},hallName:{type:Function,default:void 0},dayTitle:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotSubtitle:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0}},setup(n){var Bl,$l;const e=n,i=t.computed(()=>({...nr,...e.labels})),o=t.computed(()=>({...Sa,...e.factories})),r=p=>e.slotListOf?e.slotListOf(p):(p==null?void 0:p.slots)||[],s=p=>e.nestedSlotListOf?e.nestedSlotListOf(p):(p==null?void 0:p.slots)||[],a=p=>(p==null?void 0:p.name)||i.value.hall,d=p=>e.sessionName?e.sessionName(p):(p==null?void 0:p.name)||`${i.value.session} ${(p==null?void 0:p.startTime)||""}–${(p==null?void 0:p.endTime)||""}`.trim(),c=p=>e.slotName?e.slotName(p):(p==null?void 0:p.name)||i.value.slot,u=p=>e.slotSubtitle?e.slotSubtitle(p):"",f=t.ref("grid"),h=t.ref(($l=(Bl=e.days)==null?void 0:Bl[0])==null?void 0:$l.id),m=t.ref(!1),b=t.ref(""),C=t.ref(!1),B=t.ref(null),$=t.ref(null),x=t.ref(void 0),M=t.ref(null),k=t.ref(null),P=t.ref(!1),D=t.ref(0),Z=t.ref(null),K=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],fe=t.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);t.watch(fe,p=>localStorage.setItem("schedule-grid-zoom",String(p)));const ht=t.computed(()=>Math.max(be.value.total/60*fe.value,360)),Qe=t.computed(()=>ht.value+"px"),Pe=t.computed(()=>[...e.days||[]].sort((p,g)=>new Date(p.date).getTime()-new Date(g.date).getTime())),ke=t.computed(()=>Pe.value.find(p=>p.id===h.value));t.watch(()=>Pe.value.map(p=>p.id).join(","),()=>{var p;(!h.value||!Pe.value.some(g=>g.id===h.value))&&(h.value=(p=Pe.value[0])==null?void 0:p.id)});const hn=p=>{if(e.dayTitle)return e.dayTitle(p);const g=new Date(p.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Ye=p=>{const g=new Date(p);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},It=async(p,g)=>{g&&(p.date=new Date(g),await e.persist.updateDay(p),await e.persist.refresh())},Vt=async p=>{var w;if(!p)return;for(const I of mt(p))await se(I);await e.persist.removeDay(p);const g=(e.days||[]).indexOf(p);g>=0&&e.days.splice(g,1),await e.persist.refresh(),h.value=(w=Pe.value[0])==null?void 0:w.id},Lt=async()=>{var H,X;const p=Pe.value,g=p[p.length-1],w=g?new Date(new Date(g.date).getTime()+864e5):new Date;let I;try{I=o.value.createDay(w)}catch{e.persist.notify("warning",i.value.saveEventFirst);return}try{await((X=(H=e.persist).createDay)==null?void 0:X.call(H,I));for(const ue of e.places||[])await j(ue,I);await e.persist.refresh()}catch{e.persist.notify("negative",i.value.createFailed);return}h.value=I.id,e.persist.notify("positive",`${i.value.dayAdded}: ${hn(I)}`)},mt=p=>((p==null?void 0:p.schedules)||[]).slice().sort((g,w)=>{const I=wt(g),H=wt(w);return I.localeCompare(H,"ru")}),wt=p=>{if(e.hallName)return e.hallName(p);const g=p.place||(e.places||[]).find(w=>w.id===p.placeId);return(g==null?void 0:g.name)||i.value.hall},nt=()=>{m.value=!0},we=t.computed(()=>{const p=ke.value,g=new Set(((p==null?void 0:p.schedules)||[]).map(w=>w.placeId));return(e.places||[]).filter(w=>!g.has(w.id))}),j=async(p,g)=>{if(e.persist.bindPlaceToDay){await e.persist.bindPlaceToDay(p,g,o.value.createSchedule);return}const w=o.value.createSchedule(p.id,g.id);await e.persist.createSchedule(w)},Le=async p=>{m.value=!1;const g=ke.value;if(!g){e.persist.notify("warning",i.value.selectDayFirst);return}if(mt(g).some(w=>w.placeId===p.id)){e.persist.notify("warning",i.value.alreadyAdded);return}try{await j(p,g)}catch(w){console.warn("addPlaceToDay failed:",w),e.persist.notify("negative",i.value.createFailed),await e.persist.refresh();return}await e.persist.refresh(),h.value=g.id},Tt=async()=>{var w,I,H;const p=(w=b.value)==null?void 0:w.trim();if(!p){e.persist.notify("warning",i.value.enterName);return}const g=o.value.createPlace(p);try{if(!await((H=(I=e.persist).createPlace)==null?void 0:H.call(I,g))){e.persist.notify("negative",i.value.hallCreateFailed);return}}catch(X){console.warn("createPlace failed:",X),e.persist.notify("negative",i.value.hallCreateFailed);return}b.value="",await Le(g),e.persist.notify("positive",i.value.hallCreated.replace("{name}",p))},ge=async p=>{await se(p);const g=je(p);g&&(g.schedules=(g.schedules||[]).filter(w=>w.id!==p.id)),await e.persist.refresh()},se=async p=>{for(const g of p.sessions||[]){for(const w of s(g))await e.persist.removeSlot(w);await e.persist.removeSession(g)}for(const g of r(p))await e.persist.removeSlot(g);await e.persist.removeSchedule(p)},je=p=>(e.days||[]).find(g=>(g.schedules||[]).some(w=>w.id===p.id)),We=p=>[...s(p)].sort(tr),Hn=p=>(p.sessions||[]).some(g=>s(g).length>0),Xe=new WeakMap,Ht=p=>{const g=Xe.get(p),w=r(p);if(g&&g.src===w)return g.list;const I=new Set((p.sessions||[]).map(X=>X.id)),H=w.filter(X=>!X.sessionId||!I.has(X.sessionId));return Xe.set(p,{src:w,list:H}),H},Me=p=>[...(p.sessions||[]).map(g=>({kind:"session",item:g})),...Ht(p).map(g=>({kind:"slot",item:g}))],mn=p=>(p.sessions||[]).map(g=>({kind:"session",item:g})),be=t.computed(()=>{var g,w;const p=(((g=ke.value)==null?void 0:g.schedules)||[]).flatMap(I=>Me(I));for(const I of((w=ke.value)==null?void 0:w.schedules)||[])for(const H of I.sessions||[])p.push(...We(H).map(X=>({kind:"slot",item:X})));return ha(p)}),Ze=t.computed(()=>{const p=[];for(let g=be.value.start;g<=be.value.end;g+=60)p.push({min:g,label:it(g)});return p}),ee=t.computed(()=>{const p=[];for(let g=be.value.start+30;g<be.value.end;g+=60)p.push({min:g,label:it(g)});return p}),Ie=p=>ma(p,be.value),rt=t.computed(()=>{if(!M.value||!$.value)return{};const p=be.value,g=(M.value.minutes-p.start)/p.total*100,w=Math.max($.value.duration/p.total*100,2.5);return{top:g+"%",height:w+"%"}}),st=t.computed(()=>!M.value||!$.value?"":it(M.value.minutes+$.value.duration)),pn=t.computed(()=>{if(!M.value)return{};const p=be.value,g=(M.value.minutes-p.start)/p.total*100,w=Math.max(un/p.total*100,1.5);return{top:g+"%",height:w+"%"}}),bt=t.computed(()=>{var H,X,ue,$e,Ve;if(!M.value||!$.value||!$.value.id)return 0;const p=hi(M.value.scheduleId);if(!p)return 0;const g={startTime:M.value.time,endTime:st.value},w=(H=M.value.session)==null?void 0:H.id;let I=0;for(const T of Me(p))T.item.id!==((X=$.value)==null?void 0:X.id)&&(((ue=$.value)==null?void 0:ue.kind)==="slot"&&T.kind==="session"&&T.item.id===w||ai(g,T.item)&&I++);if((($e=$.value)==null?void 0:$e.kind)==="slot"&&M.value.session)for(const T of We(M.value.session))T.id!==((Ve=$.value)==null?void 0:Ve.id)&&ai(g,T)&&I++;return I}),Rt=t.computed(()=>bt.value>0),co=(p,g)=>ga(Me(p),g,ai),xr=(p,g)=>ya(We(p),g,ai),Er=(p,g)=>pa(p,g),gn=p=>{const g=be.value,w=de(p.item.startTime),I=de(p.item.endTime);return!isFinite(w)||!isFinite(I)?48:(I-w)/g.total*ht.value},Un=p=>ba(gn(p)),Br=p=>{const g=e.slotName?e.slotName(p.item):p.item.name||(p.kind==="session"?i.value.session:i.value.slot);if(p.kind==="slot"&&Un(p)!=="h-full"){const w=u(p.item);if(w)return`${g} — ${w}`}return g},$r=(p,g)=>{const w=c(p);if(g!=="h-full"){const I=u(p);if(I)return`${w} — ${I}`}return w},fi=p=>{const g=`${p.item.startTime||"?"}–${p.item.endTime||"?"}`;if(p.kind==="slot"){const w=u(p.item);return[c(p.item),g,w?`${i.value.participants}: ${w}`:""].filter(Boolean).join(`
22
+ `+s)}}catch{}}throw o}}_request(e,i){typeof e=="string"?(i=i||{},i.url=e):i=e||{},i=tn(this.defaults,i);const{transitional:o,paramsSerializer:r,headers:s}=i;o!==void 0&&Di.assertOptions(o,{silentJSONParsing:Ue.transitional(Ue.boolean),forcedJSONParsing:Ue.transitional(Ue.boolean),clarifyTimeoutError:Ue.transitional(Ue.boolean),legacyInterceptorReqResOrdering:Ue.transitional(Ue.boolean),advertiseZstdAcceptEncoding:Ue.transitional(Ue.boolean),validateStatusUndefinedResolves:Ue.transitional(Ue.boolean)},!1),r!=null&&(y.isFunction(r)?i.paramsSerializer={serialize:r}:Di.assertOptions(r,{encode:Ue.function,serialize:Ue.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),Di.assertOptions(i,{baseUrl:Ue.spelling("baseURL"),withXsrfToken:Ue.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let a=s&&y.merge(s.common,s[i.method]);s&&y.forEach(["delete","get","head","post","put","patch","query","common"],w=>{delete s[w]}),i.headers=He.concat(a,s);const d=[];let c=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(i)===!1)return;c=c&&E.synchronous;const B=i.transitional||To;B&&B.legacyInterceptorReqResOrdering?d.unshift(E.fulfilled,E.rejected):d.push(E.fulfilled,E.rejected)});const u=[];this.interceptors.response.forEach(function(E){u.push(E.fulfilled,E.rejected)});let f,h=0,m;if(!c){const w=[Vs.bind(this),void 0];for(w.unshift(...d),w.push(...u),m=w.length,f=Promise.resolve(i);h<m;)f=f.then(w[h++],w[h++]);return f}m=d.length;let S=i;for(;h<m;){const w=d[h++],E=d[h++];try{S=w(S)}catch(B){E.call(this,B);break}}try{f=Vs.call(this,S)}catch(w){return Promise.reject(w)}for(h=0,m=u.length;h<m;)f=f.then(u[h++],u[h++]);return f}getUri(e){e=tn(this.defaults,e);const i=Ss(e.baseURL,e.url,e.allowAbsoluteUrls,e);return ds(i,e.params,e.paramsSerializer)}};y.forEach(["delete","get","head","options"],function(e){nn.prototype[e]=function(i,o){return this.request(tn(o||{},{method:e,url:i,data:o&&y.hasOwnProp(o,"data")?o.data:void 0}))}}),y.forEach(["post","put","patch","query"],function(e){function i(o){return function(s,a,d){return this.request(tn(d||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}nn.prototype[e]=i(),e!=="query"&&(nn.prototype[e+"Form"]=i(!0))});let Jd=class Il{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(s){i=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(d=>{o.subscribe(d),s=d}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},e(function(s,a,d){o.reason||(o.reason=new Zn(s,a,d),i(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const i=this._listeners.indexOf(e);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const e=new AbortController,i=o=>{e.abort(o)};return this.subscribe(i),e.signal.unsubscribe=()=>this.unsubscribe(i),e.signal}static source(){let e;return{token:new Il(function(r){e=r}),cancel:e}}};function Kd(n){return function(i){return n.apply(null,i)}}function eu(n){return y.isObject(n)&&n.isAxiosError===!0}const Fo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Fo).forEach(([n,e])=>{Fo[e]=n});function Rs(n){const e=new nn(n),i=Gr(nn.prototype.request,e);return y.extend(i,nn.prototype,e,{allOwnKeys:!0}),y.extend(i,e,null,{allOwnKeys:!0}),i.create=function(r){return Rs(tn(n,r))},i}const xe=Rs(Xn);xe.Axios=nn,xe.CanceledError=Zn,xe.CancelToken=Jd,xe.isCancel=ps,xe.VERSION=Ao,xe.toFormData=Ri,xe.AxiosError=z,xe.Cancel=xe.CanceledError,xe.all=function(e){return Promise.all(e)},xe.spread=Kd,xe.isAxiosError=eu,xe.mergeConfig=tn,xe.AxiosHeaders=He,xe.formToJSON=n=>ms(y.isHTMLForm(n)?new FormData(n):n),xe.getAdapter=Is.getAdapter,xe.HttpStatusCode=Fo,xe.default=xe;const{Axios:Nw,AxiosError:Mw,CanceledError:Iw,isCancel:Vw,CancelToken:Tw,VERSION:Rw,all:Pw,Cancel:vw,isAxiosError:Aw,spread:zw,toFormData:Dw,AxiosHeaders:Fw,HttpStatusCode:Ow,formToJSON:_w,getAdapter:Lw,mergeConfig:Hw,create:Uw}=xe;var Jn=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(Jn||{});const Kn=(()=>{function n(){const c=r();return!(!c||c==="undefined")}function e(c){c.accessToken&&localStorage.setItem("access_token",c.accessToken),c.refreshToken&&localStorage.setItem("refresh_token",c.refreshToken)}function i(){const c=localStorage.getItem("user");return c?JSON.parse(c).id:""}function o(){const c=localStorage.getItem("user");if(c)return JSON.parse(c)}function r(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function d(c){if(!n())return;const u=Kn.getUser();u&&(u.human=c,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:e,getAccessToken:r,getRefreshToken:s,getUserId:i,clearTokens:a,getUser:o,updateHuman:d}})();class Oo{constructor(e){l(this,"code",400);l(this,"err","");O.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,i){const o=e.config;if(e.response){if(e.response.status===401&&!o._retry)return o._retry=!0,i.defaults.headers.common.token=Kn.getAccessToken(),e.config.headers.token=Kn.getAccessToken(),e.config.baseURL=void 0,i.request(o);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){Sn.Error("Неверный логин или пароль");return}Sn.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const r=new Oo(e.response.data).getErr();r&&Sn.Error(r)}return Promise.reject(e)}}}const Nn=xe.create();Nn.interceptors.response.use(n=>n,async n=>await Oo.Handle(n,Nn));class ei{static async Get(e,i,o){return await Nn({method:Jn.GET,url:e,headers:i,responseType:o})}static async Post(e,i,o,r){return i["Content-Type"]="multipart/form-data",await Nn({method:Jn.POST,url:e,headers:i,responseType:o,data:r})}static async Put(e,i,o){return i["Content-Type"]="multipart/form-data",await Nn({method:Jn.PUT,url:e,headers:i,data:o})}static async Delete(e,i){return await Nn({method:Jn.DELETE,url:e,headers:i})}}class Fi{constructor(e){l(this,"name","");O.BuildClass(this,e)}static Set(){}static Get(e,i){const o=sessionStorage.getItem(e);if(o){const r=JSON.parse(o),s=new Date,a=new Date(r.time),d=s.getTime()-a.getTime();return Math.round(d/6e4)>(i||10)?null:r.data}else return null}static async TryGet(e,i,o){let r;return r=Fi.Get(e,o),r||(r=await i()),r}}var _o=(n=>(n.ContentType="Content-Type",n.Token="token",n))(_o||{}),Ps=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Ps||{});const pe=class pe{static Setup(e="http://localhost",i,o="api"){this.baseUrl=re.BuildSafeUrl(e,i,o),this.host=e,this.apiVersion=o}static newWebSocket(e){const i=this.host.replace("http","ws")+"/ws/"+e;return new WebSocket(i)}static download(e,i){const o=pe.getDownloadFileName(e,i.headers);if(!(i.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(i.data),s=document.createElement("a");s.href=r,s.setAttribute("download",o),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(e,i){if(e)return e;const o=i["content-disposition"];if(!o)return"file";const r=o.indexOf('"')+1,s=o.lastIndexOf('"'),a=o.substring(r,s);return a||"file"}static getHeaders(e){const i=Ct.Get(lt.AccessToken);return e||(e=pe.headers),i&&(e[_o.Token]=i),e??pe.headers}static returnResponse(e,i){if(i)return e!=null&&e.isBlob?pe.download(e.downloadFileName,i):i.data}static async Get(e){return pe.returnResponse(e,await ei.Get(pe.buildUrl((e==null?void 0:e.query)??""),pe.getHeaders(e==null?void 0:e.headers),pe.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return pe.returnResponse(e,await ei.Post(pe.buildUrl(e==null?void 0:e.query),pe.getHeaders(e==null?void 0:e.headers),pe.getResponseType(e.isBlob),pe.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return pe.returnResponse(e,await ei.Put(pe.buildUrl(e==null?void 0:e.query),pe.getHeaders(e==null?void 0:e.headers),pe.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return pe.returnResponse(e,await ei.Delete(pe.buildUrl(e==null?void 0:e.query),pe.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:i}=e;return new EventSource(pe.buildUrl(i))}static buildUrl(e=""){try{return bo(this.baseUrl,e)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,i){const o=new FormData;if(o.append("form",JSON.stringify(e)),i)for(const r of i)r.file&&o.append(r.id??"files",r.file,r.originalName);return o}};l(pe,"baseUrl",""),l(pe,"apiVersion","api"),l(pe,"host",""),l(pe,"headers",{[_o.ContentType]:Ps.ApplicationJson});let Ce=pe;const v=(n,e)=>{const i=n.__vccOpts||n;for(const[o,r]of e)i[o]=r;return i},tu={},nu={style:{"text-align":"center"}};function iu(n,e){return t.openBlock(),t.createElementBlock("div",nu,[...e[0]||(e[0]=[t.createElementVNode("h1",null,"Страница не найдена",-1)])])}const vs=v(tu,[["render",iu]]),ou=[{path:"/:pathMatch(.*)*",name:"NotFound",component:vs}],ft=class ft{static Setup(e,i=""){this.router=e,this.title=i,this.ChangeDocumentTitle(),this.AddRoutes(ou)}static Get(){return this.router}static AddRoutes(e){e.forEach(i=>{this.Get().addRoute(i)})}static async To(e){await this.Get().push(e)}static async ToHome(){}static async Replace(e){await this.Get().replace(e)}static Id(){return ft.GetStringParam("id")}static Slug(){return ft.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return ft.GetStringQueryParam("qid")}static Route(){var e;return(e=this.Get())==null?void 0:e.currentRoute.value}static RouterPushBlank(e){const i=this.Get().resolve({path:e});window.open(i==null?void 0:i.href,"_blank")}static GetPath(){var i;const e=(i=ft.Route())==null?void 0:i.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.Get().push("/admin");return}let i=e;i[0]==="/"&&(i=e.substring(1)),await ft.To(`/admin/${i}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){var i;return(i=this.Route())==null?void 0:i.params[e]}static SetQueryParam(e,i){const o=new URL(window.location);o.searchParams.set(e,String(i)),history.replaceState(null,"",o)}static Resolve(e){return this.Get().resolve(e)}};l(ft,"router"),l(ft,"title",""),l(ft,"ChangeDocumentTitle",(e="")=>{let i=ft.Route().meta.title??e;i&&(i=" | "+i),document.title=ft.title+i});let kt=ft;class ce{constructor(e,i){l(this,"items",t.reactive([]));l(this,"item");l(this,"options",t.reactive([]));l(this,"count",t.ref(0));l(this,"classConstructor");l(this,"url","");l(this,"searchStr",t.ref(""));this.classConstructor=e,this.item=t.reactive(new this.classConstructor),this.url=i}Set(e){Object.assign(this.item,new this.classConstructor(e))}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetOptions(e="name",i="id"){const o=`${this.getUrl()}/options/${e}/${i}`;try{const r=await Ce.Get({query:o});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(e){try{let i;const o=Ce.Get;e&&e.withCache?i=await Fi.TryGet(this.getUrl(),o):i=await o({query:this.getUrl()}),Array.isArray(i)?this.SetAll(i):this.SetAllWithCount(i)}catch(i){console.warn("GetAll failed:",i)}}async Get(e){try{e||(e=kt.Id()),this.Set(await Ce.Get({query:this.getUrl(e)}))}catch(i){console.warn("Get failed:",i)}}async GetBySlug(e){try{e||(e=kt.Slug()),this.Set(await R.H.HttpClient.Get({query:this.getUrl("by-slug/"+e)}))}catch(i){console.warn("GetBySlug failed:",i)}}async FTSP(e){var i;try{const r=((e==null?void 0:e.ftsp)??Pt.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await Ce.Post(s);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(r.p.append){this.AppendToAll((i=a.data)==null?void 0:i.items);return}this.SetAllWithCount(a.data)}}catch(o){console.warn("FTSP failed:",o)}}async Create(e){try{const i=e??this.item,o={payload:i,query:this.getUrl()};return i.getFileInfos&&(o.fileInfos=i.getFileInfos()),await Ce.Post(o)}catch(i){console.warn("Create failed:",i)}}async CreateAndSet(e){const i=await this.Create(e);this.Set(i)}async CreateMany(e){if(!e)return;const i=[];e.forEach(o=>{i.push(new Promise(()=>this.Create(o)))}),Promise.all(i)}async Update(e){try{const i=e??this.item,o={query:this.getUrl(`${i.id}`),payload:i};return i.getFileInfos&&(o.fileInfos=i.getFileInfos(),o.fileInfos.forEach(r=>r.url="")),await Ce.Put(o)}catch(i){console.warn("Update failed:",i)}}async UpdateAndSet(e){const i=await this.Update(e);this.Set(i)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){if(e)try{await Ce.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e)}catch(i){console.warn("Remove failed:",i)}}async UpdateMany(e){if(e||(e=this.items),!e)return;const i=[];e.forEach(o=>{i.push(new Promise(()=>this.Update(o)))}),Promise.all(i)}SetAll(e){this.items.splice(0,this.items.length),e&&this.items.push(...e.map(i=>new this.classConstructor(i)))}SetAllWithCount(e){this.SetAll(e.items),this.count.value=e.count}RemoveItem(e){const i=this.items.findIndex(o=>o.id===e);i<0||this.items.splice(i,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const i=e.map(o=>new this.classConstructor(o));this.items.push(...i);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){O.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const i=e.map(o=>new this.classConstructor(o));this.items.unshift(...i);return}this.items.unshift(new this.classConstructor(e))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(e=>R.H.Strings.SearchInFields(this.searchStr.value,e.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function ru(n,e){n=="left"&&e.next(),n=="right"&&e.prev()}const su=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class au{static GetRandColor(e){return Rt.GetRandEL(e??su)}}function As(n,e){const i=[],o=e||ct.Asc,r=o===ct.Asc?ct.Desc:ct.Asc;return Object.values(n).forEach(s=>{i.push(s(o)),i.push(s(r))}),i.length>0&&!i.some(s=>s.default)&&(i[0].default=!0),e&&i.forEach(s=>{s.default&&(s.default=s.order===e)}),i}let lu=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",qn.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",Ci[qn.FiveMinutes])}startDrag(e,i){this.draggedStartTime=e,this.draggedEndTime=i,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Ci[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Rt.GenerateNumsRange(this.startHour,this.endHour)}};const Lo=n=>n===8||n===46,cu=n=>n>46&&n<58,du=n=>n>34&&n<41,uu=n=>n+".",fu=(n,e,i)=>{Lo(e)||du(e)||(!cu(e)||i>9)&&n.preventDefault()};function hu(n,e){if(e>8){let i=n.substring(0,2).replace(".","1");Number(i)>31&&(i="31");let o=n.substring(3,5).replace(".","1");Number(o)>12&&(o="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=i+"."+o+"."+r}return n}function mu(n){const e=n.keyCode;let i=n.srcElement.value;const o=i.length;fu(n,e,o),!Lo(e)&&(o===2||o===5)&&(i=uu(i));const r=n.srcElement.value+String.fromCharCode(n.which);if(Lo(e)){n.srcElement.value=i;return}i.length===0&&Number(r)>3&&(i="3",n.preventDefault()),i.length===1&&Number(r)>31&&(i="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(i=i.substring(0,3)+"12",n.preventDefault()),i=hu(i,o),n.srcElement.value=i}const pu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],gu="ru-RU";class Ht{constructor(){l(this,"locale","ru-RU")}static Format(e,i){if(!e)return"";const o={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return i&&(o.year=i.year||i.year===void 0?i.year:o.year,o.month=i.month||i.month===void 0?i.month:o.month,o.day=i.day||i.day===void 0?i.day:o.day,o.hour=i.hour??o.hour,o.minute=i.minute??o.minute),Intl.DateTimeFormat(gu,o).format(new Date(e))}static FormatWithTime(e){return Ht.Format(e,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(e){const i=e.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetPeriod(e,i,o){return`${this.Format(e,o)}-${this.Format(i,o)}`}static GetShortDayName(e){return e?pu[e.getDay()]:""}static GetCurrentWeekPeriod(e){const i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()+1),r=new Date(i.getFullYear(),i.getMonth(),o.getDate()+7);return this.GetPeriod(o,r,e||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(e,i){const o=new Date,r=new Date,s=Ht.SplitHourTime(e),a=Ht.SplitHourTime(i);return o.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-o.getTime())/1e3/60}static HourTimeinMunutes(e){const i=Ht.SplitHourTime(e);return i[0]*60+i[1]}static SplitHourTime(e){const i=e.split(":");return[Number(i[0]),Number(i[1])]}static AddMinutesToHM(e,i){const o=new Date,r=Ht.SplitHourTime(e);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),d=s.getMinutes();return`${a}:${d}`}static GetMonthsDiff(e,i){return i.getMonth()-e.getMonth()+12*(i.getFullYear()-e.getFullYear())}static StringToDate(e){const i=e.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetDateOrToday(e){return e?e.date:new Date}static InPeriod(e,i,o){return new Date(e)>=new Date(i)&&new Date(e)<=new Date(o)}static GetDatesFromPeriod(e,i){const o=[new Date(e)];let r=e;for(;r<=i;)r=Ht.AddDays(r,1),o.push(r);return o}static AddDays(e,i){const o=new Date(e);return o.setDate(o.getDate()+i),o}static Eq(e,i){return e.getTime()===i.getTime()}}class yu{constructor(){l(this,"dragged",!1);l(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class zs{static Get(e){const i=e.split(".");return i[i.length-1]}}const wu=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function e(s,a){const d=localStorage.getItem(`${s}_favourite`);return d?d.split(",").includes(a):!1}function i(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d){n(s,[a]);return}const c=d.split(",");c.push(a),n(s,c)}function o(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d)return;const c=d.split(",").filter(u=>u!==a);n(s,c)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:i,removeFromFavourite:o,setFavourite:n,isFavourite:e,clearFavourite:r}})();class bu{constructor(){l(this,"list",[]);l(this,"defaultSortModel");l(this,"changeFlag",!1)}Set(e){this.Reset(),e&&(Array.isArray(e)?this.list=e:this.list=As(e),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(e=>e.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const on=new bu;function Su(){const n=t.ref(!1),e=t.ref(!1);return{confirmLeave:n,saveButtonClick:e,beforeWindowUnload:s=>{n.value&&s.preventDefault()},formUpdated:()=>{n.value=!0},showConfirmModal:(s,a)=>{n.value&&!e.value?s():a()}}}const Cu=(()=>{const n=(s,a)=>t.onBeforeMount(async()=>{R.F.FTSP.Get().reset(),on.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:e,showConfirmModal:i}=Su(),o=s=>Fl.onBeforeRouteLeave((a,d,c)=>{i((s||r)(),c)}),r=s=>async()=>{e.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:o,submit:r}})();function Ds(n,e){const i=[];if(n)for(let o=0;o<Math.ceil(n.length/e);o++)i[o]=n.slice(o*e,o*e+e);return i}class Ho{constructor(){l(this,"items",[]);l(this,"idx",0);l(this,"key","")}preSelect(){const e=kt.GetStringQueryParam(this.key);if(!e||e==="undefined"){this.Select(0);return}const i=this.items.findIndex(o=>o.slug===e);i>-1&&this.Select(i)}static Create(e,i){const o=new Ho;return o.key=e,o.items=i,o.items.length&&o.preSelect(),o}Select(e){if(this.items.length){if(e===void 0)return this.preSelect();this.idx=e,kt.SetQueryParam(this.key,this.GetSlug())}}GetMenu(){return this.items[this.idx]}GetComponent(){return this.items[this.idx].component}GetSlug(){return this.items[this.idx].slug}}const co=class co{static Format(e){let i=e;if(!i)e=i;else{(i[0]==="7"||i[0]==="8")&&i.length!==1&&(i=i.slice(1));const o=i.replace(/\+7|[^\d]/g,""),r=o.length;switch(!0){case r===0:e="";break;case(r===1&&i.length===1&&o==="7"):case(r===1&&i.length===1&&o==="8"):e="+7 (";break;case r<4:e=`+7 (${o}`;break;case r<7:e=`+7 (${o.slice(0,3)}) ${o.slice(3)}`;break;case r<9:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}`;break;default:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}-${o.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};l(co,"validatePhone",(e,i,o)=>{co.getPhoneRegExp().test(i)||!i?o():o(new Error("Пожалуйста, введите корректный номер телефона"))});let Uo=co;class ku{static Count(e){const i=e.filter(s=>s.rating!==0);let o=0;i.forEach(s=>o=o+s.rating);const r=o/i.length;return isNaN(r)?0:Number((o/i.length).toFixed(2))}}class xu{static async Auth(e){e&&e()}static Dev(){}}class Eu{constructor(){l(this,"startHour",9);l(this,"startHM",`${this.startHour}:00`);l(this,"endHour",19);l(this,"endHM",`${this.endHour}:00`);l(this,"timelinePxHeight",50);l(this,"timelineStep",qn.FiveMinutes);l(this,"timelines",Ci[qn.FiveMinutes])}periodIsCorrect(e,i){return ie.GtOrEq(e,this.startHM)&&ie.GtOrEq(this.endHM,i)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Ci[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Rt.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,i,o,r){return r.filter(s=>s.id!==o).every(s=>!ie.PeriodsIntersects(e,i,s.startTime,s.endTime))}sortByStartTime(e){e.sort((i,o)=>ie.HMtoM(i.startTime)-ie.HMtoM(o.startTime))}}const Bu=-68;function $u(n,e){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const i=document.querySelector(n),o=e??Bu;let r=0;i&&(r=i.getBoundingClientRect().top+o+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class Nu{static Sort(e){e.forEach((i,o)=>i.order=o)}}class Oi{static Wait(e,i){return new Promise(o=>setTimeout(()=>o(i),e))}static WaitS(e,i){return Oi.Wait(ie.S(e),i)}static WaitM(e,i){return Oi.Wait(ie.M(e),i)}}function Mu(n,e){let i=!0;return n.value.validate(o=>(o||(i=!1),i)),i}const Iu=n=>new Promise(e=>{if(document.querySelector(n))return e(document.querySelector(n));const i=new MutationObserver(()=>{document.querySelector(n)&&(i.disconnect(),e(document.querySelector(n)))});i.observe(document.body,{childList:!0,subtree:!0})});let Vu=class Pr{constructor(e){l(this,"id");l(this,"message","");l(this,"userName");l(this,"createdOn",new Date);l(this,"chatId");l(this,"type","message");O.BuildClass(this,e)}static Create(e,i,o,r){const s=new Pr;return s.id=Lt(),s.chatId=e,s.message=o,s.userName=r,s}static CreatePingMessage(){const e=new Pr;return e.type="ping",e.id=Lt(),e}isMessage(){return this.type==="message"||this.type===""}};const Tu="";class Ru{constructor(e="",i="",o="set"){l(this,"client");l(this,"endpoint","");l(this,"query","");l(this,"period",2e4);O.BuildClass(this,{endpoint:e,query:i,mutation:o}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(Vu.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,Tu.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}let Pu=(oe=class{},l(oe,"Arrays",Rt),l(oe,"Axios",ei),l(oe,"BaseStore",ce),l(oe,"Cache",Fi),l(oe,"Classes",O),l(oe,"CarouselSwipe",ru),l(oe,"Color",au),l(oe,"CreateSortModels",As),l(oe,"Cursor",lu),l(oe,"DateMask",mu),l(oe,"Dates",Ht),l(oe,"Dragger",yu),l(oe,"Extension",zs),l(oe,"Favourite",wu),l(oe,"Hooks",Cu),l(oe,"HttpClient",Ce),l(oe,"Id",De),l(oe,"MakeCarousel",Ds),l(oe,"Period",yo),l(oe,"PhoneService",Uo),l(oe,"Rating",ku),l(oe,"Router",kt),l(oe,"RouterGuard",xu),l(oe,"Scheduler",Eu),l(oe,"Scroll",$u),l(oe,"Sorter",Nu),l(oe,"Static",So),l(oe,"Strings",re),l(oe,"Time",ie),l(oe,"Timer",Oi),l(oe,"Token",Kn),l(oe,"Menus",Ho),l(oe,"validate",Mu),l(oe,"WaitElement",Iu),l(oe,"WebSocketClient",Ru),oe);class vu{constructor(){l(this,"limit",25);l(this,"count",0);l(this,"curPage",1);l(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Fs=new vu;var Os=(n=>(n.TableList="tableList",n.Default="",n))(Os||{}),xt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(xt||{}),_s=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(_s||{}),Ls=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(Ls||{}),qo=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(qo||{});const Au=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:Os,Animations:xt,CalendarScale:_s,LocalStoreKeys:lt,SocialTypes:Ls,ValueRelation:qo},Symbol.toStringTag,{value:"Module"}));let zu=class{async Login(e=Ae.Form.GetValues()){const i=await Ce.Post({query:"auth/login",payload:e});if(!i)throw"Ошибка авторизации";Ae.Status.SetState(i)}async LoginAs(e){await Ce.Post({query:"auth/login-as",payload:{email:e}})}async Register(e=Ae.Form.GetValues()){const i=await Ce.Post({query:"auth/register",payload:e});if(!i)throw i}async RestorePassword(e=Ae.Form.GetValues()){await Ce.Post({query:"auth/restore-password",payload:e})}async PasswordChange(e=Ae.Form.GetValues()){e.id=kt.GetStringParam("userId"),await Ce.Put({query:"auth/password-change",payload:e})}async RefreshToken(){await Ce.Post({query:"auth/refresh-token",payload:{refreshToken:Kn.getRefreshToken()}})}async CheckUuid(e){await Ce.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}async ConfirmEmail(e){await Ce.Get({query:`auth/confirm-email/${e}`})}async EmailIsConfirm(e){await Ce.Get({query:`auth/email-is-confirm/${e}`})}};const Du=new zu;var Fu=Object.defineProperty,_i=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Fu(e,i,r),r};const ti=class Vl{constructor(e){l(this,"id");l(this,"description","");l(this,"time","");l(this,"latitude","");l(this,"longitude","");l(this,"emails",[]);l(this,"postAddresses",[new ki]);l(this,"phones",[]);l(this,"websites",[]);O.BuildClass(this,e)}addEmail(){const e=Zt.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=Jt.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new Vl;return e.id=De.UUID(),e}removeEmail(e){O.RemoveFromClassById(e,this.emails)}removePhone(e){O.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new ki)}addWebsite(){this.websites.push(new Co)}pushFirst(){this.emails.length||this.emails.push(new Zt),this.phones.length||this.phones.push(new Jt)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};_i([O.GetClassConstructor(Zt)],ti.prototype,"emails"),_i([O.GetClassConstructor(ki)],ti.prototype,"postAddresses"),_i([O.GetClassConstructor(Jt)],ti.prototype,"phones"),_i([O.GetClassConstructor(Co)],ti.prototype,"websites");let Hs=ti,Ou=class extends ce{constructor(){super(Hs,"contacts")}};const _u=new Ou;let Lu=class extends ce{constructor(){super(Zt,"emails")}};const Hu=new Lu;class jo{constructor(e){l(this,"id");l(this,"ftsp");l(this,"name","");O.BuildClass(this,e)}static Create(e){const i=new jo;return i.id=De.UUID(),i.ftsp=JSON.stringify(e),i}}let Uu=class extends ce{constructor(){super(jo,"ftsp-presets")}};const qu=new Uu;let ju=class extends ce{constructor(){super(qr,"humans")}};const Wu=new ju;let Gu=class extends ce{constructor(){super(Jt,"phones")}};const Qu=new Gu;class Yu{constructor(e){l(this,"id");l(this,"nameRus","");O.BuildClass(this,e)}}var Xu=Object.defineProperty,Zu=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Xu(e,i,r),r};class Us{constructor(e){l(this,"id");l(this,"nameRus","");l(this,"fields",[]);O.BuildClass(this,e)}}Zu([O.GetClassConstructor(Yu)],Us.prototype,"fields");let Ju=class extends ce{constructor(){super(Us,"schemas")}};const Ku=new Ju;class qs{constructor(e){l(this,"id","");l(this,"value","");l(this,"label","");l(this,"key","");l(this,"description","");l(this,"route","");l(this,"searchElementMetas",[]);O.BuildClass(this,e)}}class ef{constructor(e){l(this,"id");l(this,"name","");l(this,"label","");O.BuildClass(this,e)}}var tf=Object.defineProperty,js=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&tf(e,i,r),r};class Mn{constructor(e){l(this,"id");l(this,"key","");l(this,"label","");l(this,"order",0);l(this,"route","");l(this,"table","");l(this,"active",!0);l(this,"searchColumn","");l(this,"descriptionColumn","");l(this,"labelColumn","");l(this,"valueColumn","");l(this,"options",[]);l(this,"searchGroupMetaColumns",[]);O.BuildClass(this,e)}}js([O.GetClassConstructor(qs)],Mn.prototype,"options"),js([O.GetClassConstructor(ef)],Mn.prototype,"searchGroupMetaColumns");class Wo{constructor(e){l(this,"query","");l(this,"key","");l(this,"params","");l(this,"suggester",!1);l(this,"mustBeTranslated",!0);l(this,"options",[]);l(this,"searchGroupId","");l(this,"searchGroups",[]);l(this,"searchGroup",new Mn);l(this,"searchObjects",[]);l(this,"pagination",new Bi);l(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(i=>new Mn(i))),e.searchGroup&&(this.searchGroup=new Mn(e.searchGroup)),e.options&&(this.options=e.options.map(i=>new qs(i))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const i=this.searchGroups.find(o=>o.id===e);i?this.searchGroup=i:this.searchGroup=new Mn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(kt.Route().query.groupId)}setQuery(){const e=kt.Route().query.query;e&&(this.query=e)}}let nf=class{constructor(){l(this,"isSearchDrawerOpen",t.ref(!1));l(this,"searchModel",t.reactive(new Wo));l(this,"searchGroups",t.reactive([]));l(this,"count",0)}async Search(e){const i=await Ce.Get({query:`search?key=${e.key}&query=${e.query}`});i&&i.searchGroup&&i.searchGroup.options.forEach(o=>{e.searchObjects.push({id:o.id,value:o.value,label:o.label,description:o.description})})}async mainSearch(e){this.SetSearchModel(await Ce.Get({query:`search/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(o=>{o.options=[]});const i=await Ce.Get({query:`search/main?searchModel=${e.toUrl()}`});return this.SetSearchModel(i),i}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new Wo}SetSearchModel(e){e&&(this.searchModel=new Wo(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Go=new nf;let of=class extends ce{constructor(){super(xi,"users-accounts")}};const rf=new of;var qe=(n=>(n.String="string",n.Text="text",n.Number="number",n.Date="date",n.DateTime="dateTime",n.Radio="radio",n.Set="set",n.Boolean="boolean",n.Files="files",n.File="file",n.MatrixRadio="matrixRadio",n.MatrixSet="matrixSet",n))(qe||{});class Ws{constructor(e){l(this,"id");l(this,"name",qe.String);l(this,"valueRelation",qo.simple);O.BuildClass(this,e)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===qe.Radio)return"RadioProp";if(this.name===qe.Set)return"SetProp";if(this.name===qe.Number)return"NumberProp";if(this.name===qe.String)return"StringProp"}}let sf=class extends ce{constructor(){super(Ws,"value-types")}};const af=new sf;let Gs=(ot=class{},l(ot,"Auth",Du),l(ot,"Contacts",_u),l(ot,"Emails",Hu),l(ot,"FileInfos",new ce(Ge,"file-infos")),l(ot,"FTSPPresets",qu),l(ot,"Humans",Wu),l(ot,"Phones",Qu),l(ot,"Schemas",Ku),l(ot,"UserAccounts",rf),l(ot,"ValueTypes",af),l(ot,"Search",Go),ot);var Ut=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(Ut||{});let lf=(Yt=class{},l(Yt,"Orders",ct),l(Yt,"Sizes",Ut),l(Yt,"Statuses",me),l(Yt,"DataTypes",Te),l(Yt,"ValueTypes",qe),l(Yt,"Operators",Se),Yt);class cf{constructor(){l(this,"title","");l(this,"buttons",[]);l(this,"editTitle",t.ref(!1));l(this,"showEdit",t.ref(!1))}Set(e="",i){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=i}}const df=new cf;class uf{constructor(){l(this,"menu",[]);l(this,"path","");l(this,"isOpen",!0);l(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var i;return re.SearchIn(e.name,this.filterString)||((i=e.children)==null?void 0:i.some(o=>re.SearchIn(o.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var i;return this.filterString?(i=e.children)==null?void 0:i.filter(o=>re.SearchIn(o.name,this.filterString)):e.children}}const ff=new uf;class hf{constructor(){l(this,"Menu",t.reactive(ff));l(this,"Head",t.reactive(df))}}const mf=new hf,Qs="Да",Ys="Нет";class pf extends bn{constructor(){super(...arguments);l(this,"confirmButtonText",Qs);l(this,"cancelButtonText",Ys);l(this,"persistent",!0);l(this,"resolve");l(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(i){const o=typeof i=="string"?{text:i}:i;return this.confirmButtonText=o.confirmButtonText??Qs,this.cancelButtonText=o.cancelButtonText??Ys,this.persistent=o.persistent??!0,super.showMessage(o,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof V.Dialog.create!="function"){console.warn("[sprof] Quasar Dialog plugin is not installed. Add `app.use(Quasar, { plugins: { Dialog } })` (imported from 'quasar') to your app."),this.Settle(()=>s({type:"cancel"}));return}const a=V.Dialog.create({title:this.title||void 0,message:this.text,html:bn.ContainsHtml(this.text),persistent:this.persistent,ok:{label:this.confirmButtonText,flat:!0,color:"primary"},cancel:{label:this.cancelButtonText,flat:!0,color:"warning"}});a.onOk(()=>this.Settle(()=>r({type:"submit"}))),a.onCancel(()=>this.Settle(()=>s({type:"cancel"}))),a.onDismiss(()=>this.Settle())})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.Settle(()=>{var i;return(i=this.resolve)==null?void 0:i.call(this,!0)})}Cancel(){this.Settle(()=>{var i;return(i=this.reject)==null?void 0:i.call(this)})}Settle(i){i==null||i(),this.resolve=void 0,this.reject=void 0}}const gf=new pf;class yf{constructor(){l(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class wf extends yf{Show(){super.show()}Hide(){super.hide()}}const bf=new wf;class qt{}l(qt,"Admin",mf),l(qt,"Dialog",gf),l(qt,"Loading",bf),l(qt,"Notify",Sn),l(qt,"Btn",Xt),l(qt,"Input",zr);class R{}l(R,"Auth",t.reactive(Ae)),l(R,"UI",t.reactive(qt)),l(R,"Paginator",t.reactive(Fs)),l(R,"S",Gs),l(R,"H",Pu),l(R,"C",ic),l(R,"T",lf),l(R,"I",Au),l(R,"F",lc);class Xs{constructor(e){l(this,"id");l(this,"name","");l(this,"address","");l(this,"number");l(this,"building");l(this,"buildingId");R.H.Classes.BuildClass(this,e),this.setName()}setName(){this.building&&(this.name=this.building.address+", вход "+this.number,this.address=this.name)}getBuildingNumber(){var e;return String((e=this.building)==null?void 0:e.number)}getEntranceNumber(){return String(this.number)}}class Zs{constructor(e){l(this,"id");l(this,"number");l(this,"buildingId");R.H.Classes.BuildClass(this,e)}}var Sf=Object.defineProperty,Js=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Sf(e,i,r),r};class Li{constructor(e){l(this,"id");l(this,"number","");l(this,"address","");l(this,"name","");l(this,"status","");l(this,"description","");l(this,"floors",[]);l(this,"entrances",[]);R.H.Classes.BuildClass(this,e)}}Js([R.H.Classes.GetClassConstructor(Zs)],Li.prototype,"floors"),Js([R.H.Classes.GetClassConstructor(Xs)],Li.prototype,"entrances");const Cf=Object.freeze(Object.defineProperty({__proto__:null,Building:Li,Entrance:Xs,Floor:Zs},Symbol.toStringTag,{value:"Module"}));let kf=class extends ce{constructor(){super(Li,"buildings")}};const xf=new kf,Ef=Object.freeze(Object.defineProperty({__proto__:null,C:Cf,S:Object.freeze(Object.defineProperty({__proto__:null,BuildingsStore:xf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var In=(n=>(n.Ping="ping",n.Enter="enter",n.Exit="exit",n.Message="message",n.Write="write",n.Empty="",n))(In||{});class rn{constructor(e){l(this,"id");l(this,"userId");l(this,"chatId");l(this,"message","");l(this,"fileInfo",new R.C.FileInfo);l(this,"createdAt",new Date);l(this,"type",In.Message);O.BuildClass(this,e)}static Create(e,i,o){const r=new rn;return r.id=R.H.Id.UUID(),r.chatId=i,r.userId=o,r.message=e,r}static CreatePingMessage(){const e=new rn;return e.type=In.Ping,e.id=R.H.Id.UUID(),e}isMessage(){return this.type===In.Message||this.type===In.Empty}}var Bf=Object.defineProperty,$f=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Bf(e,i,r),r};const Ks=class Tl{constructor(e){l(this,"id");l(this,"name","");l(this,"createdAt",new Date);l(this,"newMesage","");l(this,"userId","");l(this,"chatMessages",[]);R.H.Classes.BuildClass(this,e)}static Create(){const e=new Tl;return e.id=R.H.Id.UUID(),e}addMessage(){if(this.newMesage==="")return;const e=rn.Create(this.newMesage,this.id,this.userId);return this.chatMessages.push(e),this.newMesage="",e}};$f([R.H.Classes.GetClassConstructor(rn)],Ks.prototype,"chatMessages");let ea=Ks;const Nf=Object.freeze(Object.defineProperty({__proto__:null,Chat:ea,ChatMessage:rn},Symbol.toStringTag,{value:"Module"}));let Mf=class extends ce{constructor(){super(rn,"chat-messages")}};const If=new Mf;let Vf=class extends ce{constructor(){super(ea,"chats")}};const Tf=new Vf,Rf=Object.freeze(Object.defineProperty({__proto__:null,C:Nf,S:Object.freeze(Object.defineProperty({__proto__:null,ChatMessages:If,Chats:Tf},Symbol.toStringTag,{value:"Module"})),T:(xr=class{},l(xr,"ChatMessage",In),xr)},Symbol.toStringTag,{value:"Module"}));class ta{constructor(e){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Ge);R.H.Classes.BuildClass(this,e)}}class ni{constructor(e){l(this,"id");l(this,"passportId");l(this,"fileInfoId");l(this,"fileInfo",new R.C.FileInfo);l(this,"order",0);O.BuildClass(this,e)}static Create(e){const i=new ni;return i.id=R.H.Id.UUID(),i.passportId=e,i}}var Pf=Object.defineProperty,vf=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Pf(e,i,r),r};class Qo{constructor(e){l(this,"id");l(this,"num","");l(this,"seria","");l(this,"division","");l(this,"divisionCode","");l(this,"citzenship","");l(this,"date",new Date);l(this,"address","");l(this,"passportScans",[]);O.BuildClass(this,e)}}vf([O.GetClassConstructor(ni)],Qo.prototype,"passportScans");class na{constructor(e){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Ge);R.H.Classes.BuildClass(this,e)}}const Af=Object.freeze(Object.defineProperty({__proto__:null,Inn:ta,Passport:Qo,PassportScan:ni,Snils:na},Symbol.toStringTag,{value:"Module"}));let zf=class extends ce{constructor(){super(ta,"inns")}};const Df=new zf;let Ff=class extends ce{constructor(){super(ni,"passport-scans")}};const Of=new Ff;let _f=class extends ce{constructor(){super(Qo,"passports")}};const Lf=new _f;let Hf=class extends ce{constructor(){super(na,"snilss")}};const Uf=new Hf,qf=Object.freeze(Object.defineProperty({__proto__:null,C:Af,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Df,PassportScans:Of,Passports:Lf,Snilss:Uf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Yo{constructor(e){l(this,"id");l(this,"name","");R.H.Classes.BuildClass(this,e)}static Create(e){const i=new Yo;return i.id=R.H.Id.UUID(),i.name=e,i}}const jf=Object.freeze(Object.defineProperty({__proto__:null,Extract:Yo},Symbol.toStringTag,{value:"Module"})),Wf=[{path:"/admin/extracts",name:"ExtractsList",component:()=>Promise.resolve().then(()=>cw)}];class ii{constructor(e){l(this,"id");l(this,"name","");l(this,"label","");R.H.Classes.BuildClass(this,e)}static Create(e,i){const o=new ii;return o.id=R.H.Id.UUID(),o.name=e,o.label=i,o}}let Gf=class extends ce{constructor(){super(ii,"extracts")}};const Qf=new Gf,Yf=Object.freeze(Object.defineProperty({__proto__:null,C:jf,R:Wf,S:Object.freeze(Object.defineProperty({__proto__:null,ExtractsStore:Qf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class sn{constructor(e){l(this,"id");l(this,"name","");l(this,"score",0);l(this,"order",0);l(this,"showMoreQuestions",!1);l(this,"showOther",!1);l(this,"fieldId");l(this,"isMatrixY",!1);R.H.Classes.BuildClass(this,e)}static Create(e){const i=new sn;return i.id=R.H.Id.UUID(),i.fieldId=e,i}}class ia{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fieldId");R.H.Classes.BuildClass(this,e)}}class Xo{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);R.H.Classes.BuildClass(this,e)}}class Vn{constructor(e){l(this,"id");l(this,"name","");l(this,"fieldId");R.H.Classes.BuildClass(this,e)}static Create(e){const i=new Vn;return i.id=R.H.Id.UUID(),i.fieldId=e,i}}var Xf=Object.defineProperty,oi=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Xf(e,i,r),r};const an=class ho{constructor(e){l(this,"id");l(this,"name","");l(this,"code","");l(this,"valueTypeId");l(this,"order",0);l(this,"ageCompare",!1);l(this,"answerVariants",[]);l(this,"answerVariantsForDelete",[]);l(this,"fieldExamples",[]);l(this,"fieldVariants",[]);l(this,"valueType",new Ws);l(this,"fieldMeasures",[]);l(this,"showSet",!1);l(this,"showRadio",!1);l(this,"isEdit",!1);l(this,"children",[]);l(this,"parentId");l(this,"formSectionId");l(this,"selected",!1);R.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const i=new ho;return i.id=R.H.Id.UUID(),i.formSectionId=e,i}getRegisterPropertyRadioOriginalValue(e){const i=this.answerVariants.find(o=>o.id===e);return i?i.name:""}addRadioItem(e){const i=new sn(e);i.order=this.answerVariants.length,this.answerVariants.push(i)}removeRadioItem(e){const i=this.answerVariants[e].id;i&&this.answerVariantsForDelete.push(i),this.answerVariants.splice(e,1)}changeRelation(e){const i=e.find(o=>o.id===this.valueTypeId);if(i){if(i.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(i.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=i}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,i)=>e.order=i)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new Xo(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new Vn)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=sn.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=ho.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=Vn.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new ho(this);return e.id=R.H.Id.UUID(),e.answerVariants.forEach(i=>{i.id=R.H.Id.UUID(),i.fieldId=e.id}),e.children=e.children.map(i=>{const o=i.copy();return o.parentId=e.id,o}),e}};oi([R.H.Classes.GetClassConstructor(sn)],an.prototype,"answerVariants"),oi([R.H.Classes.GetClassConstructor(ia)],an.prototype,"fieldExamples"),oi([R.H.Classes.GetClassConstructor(Vn)],an.prototype,"fieldVariants"),oi([R.H.Classes.GetClassConstructor(Xo)],an.prototype,"fieldMeasures"),oi([R.H.Classes.GetClassConstructor(an)],an.prototype,"children");let Hi=an;class Zo{constructor(e){l(this,"id");l(this,"answerId");l(this,"comment","");l(this,"fileInfoId");l(this,"fileInfo",new Ge);R.H.Classes.BuildClass(this,e)}}class ln{constructor(e){l(this,"id");l(this,"answerVariantId");l(this,"answerVariantIdY");l(this,"fieldFillId");R.H.Classes.BuildClass(this,e)}static Create(e,i){const o=new ln;return o.id=Lt(),o.fieldFillId=e,o.answerVariantId=i,o}static GetClassName(){return"selectedAnswerVariant"}}var Zf=Object.defineProperty,oa=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Zf(e,i,r),r};const Jo=class vr{constructor(e){l(this,"id");l(this,"valueString");l(this,"valueOther");l(this,"valueNumber");l(this,"valueDate");l(this,"fileInfo",new Ge);l(this,"fileInfoId");l(this,"order",0);l(this,"selectedAnswerVariants",[]);l(this,"patientId");l(this,"fieldId");l(this,"formFillId");l(this,"answerVariantId");l(this,"filled",!1);l(this,"researchResultId");l(this,"answerFiles",[]);l(this,"answerFilesForDelete",[]);R.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,i){const o=new vr;return o.id=Lt(),o.fieldId=e.id,o.formFillId=i,o.order=e.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,i){return e.map(o=>vr.Create(o,i))}addFile(){const e=new Zo;return e.id=Lt(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(i=>e.push(i.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,i){const o=ln.Create(this.id,e);return o.answerVariantIdY=i,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(e,i){return this.selectedAnswerVariants.find(o=>o.answerVariantId===e&&o.answerVariantIdY===i)}addSelectedAnswerVariant(e){const i=ln.Create(this.id,e);return this.selectedAnswerVariants.push(i),this.filled=!0,i}static GetClassName(){return"answer"}showOther(e){const i=e.find(o=>o.showOther);return i?this.answerVariantId===i.id||this.selectedAnswerVariants.some(o=>o.answerVariantId===i.id):!1}};oa([R.H.Classes.GetClassConstructor(ln)],Jo.prototype,"selectedAnswerVariants"),oa([R.H.Classes.GetClassConstructor(Zo)],Jo.prototype,"answerFiles");let Tn=Jo;class Jf{constructor(e){l(this,"id");l(this,"fieldId");R.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var Kf=Object.defineProperty,eh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Kf(e,i,r),r};const ra=class Rl{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fields",[]);l(this,"formId");R.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,i){return`${this.getFieldN(e)}.${i+1}`}static Create(e){const i=new Rl;return i.id=R.H.Id.UUID(),i.formId=e,i}addField(){const e=Hi.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,i)=>e.order=i)}getAnswerVariants(){const e=[];return this.fields.forEach(i=>e.push(...i.answerVariants)),e}};eh([R.H.Classes.GetClassConstructor(Hi)],ra.prototype,"fields");let Ui=ra;var th=Object.defineProperty,nh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&th(e,i,r),r};const sa=class Pl{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"isLaboratory",!1);l(this,"formSections",[]);l(this,"isEdit",!1);l(this,"withDates",!1);l(this,"withScores",!1);l(this,"selectedForExport",!1);l(this,"filterString","");l(this,"showOnlyNotFilled",!1);l(this,"showOnlyFilled",!1);R.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new Pl;return e.id=R.H.Id.UUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=Ui.Create(this.id);return this.formSections.push(e),R.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(o=>o.fields).flat(),i=e.map(o=>o.children).flat();return e.concat(i).filter(o=>o.children.length===0)}};nh([R.H.Classes.GetClassConstructor(Ui)],sa.prototype,"formSections");let aa=sa;var ih=Object.defineProperty,oh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&ih(e,i,r),r};const la=class vl{constructor(e){l(this,"id");l(this,"date",new Date);l(this,"editMode",!1);l(this,"userFormId");l(this,"fillingPercentage",0);l(this,"fieldFills",[]);l(this,"num","");l(this,"formId");R.H.Classes.BuildClass(this,e)}static Create(e){const i=new vl;return i.id=R.H.Id.UUID(),i.formId=e.id,i.fieldFills.push(...Tn.CreateMany(e.getFields(),i.id)),i}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var i;return(i=this.fieldFills)==null?void 0:i.find(o=>o.fieldId===e)}pushRegisterProperty(e){const i=new Tn;i.researchResultId=e,this.fieldFills.push(i)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(i=>i.researchResultId===e)}getOrCreateFieldFill(e){let i=this.getFieldFill(e.id);return i||(i=Tn.Create(e),this.addFieldFill(i)),i}getFileInfos(){const e=[];return this.fieldFills.forEach(i=>e.push(...i.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(o=>o.filled).length,i=this.fieldFills.length;this.fillingPercentage=Math.round(e/i*100)}getFieldFillByFieldId(e){return this.fieldFills.find(i=>i.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(i=>i.answerVariantId===e)}getFieldsFieldFillsMap(e){const i={};return e.forEach(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;i[o.code]=s}}),i}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};oh([R.H.Classes.GetClassConstructor(Tn)],la.prototype,"fieldFills");let ca=la;const rh=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:sn,Field:Hi,FieldExample:ia,FieldFill:Tn,FieldFillFile:Zo,FieldFilter:Jf,FieldMeasure:Xo,FieldVariant:Vn,Form:aa,FormFill:ca,FormSection:Ui,SelectedAnswerVariant:ln},Symbol.toStringTag,{value:"Module"}));let sh=class extends ce{constructor(){super(sn,"answer-variants")}};const ah=new sh;let lh=class extends ce{constructor(){super(Tn,"field-fills")}};const ch=new lh;let dh=class extends ce{constructor(){super(Hi,"fields")}};const uh=new dh;let fh=class extends ce{constructor(){super(ca,"form-fills")}};const hh=new fh;let mh=class extends ce{constructor(){super(Ui,"form-sections")}};const ph=new mh;let gh=class extends ce{constructor(){super(aa,"forms")}};const yh=new gh;let wh=class extends ce{constructor(){super(ln,"selected-answer-variants")}};const bh=new wh,Sh=Object.freeze(Object.defineProperty({__proto__:null,C:rh,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:ah,FieldFills:ch,Fields:uh,FormFills:hh,FormSections:ph,Forms:yh,SelectedAnswerVariants:bh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class qi{constructor(e){l(this,"id");l(this,"name","");l(this,"link","");l(this,"selected",!1);l(this,"hide",!1);l(this,"editMode",!1);l(this,"color","");l(this,"background","");l(this,"order",0);l(this,"menuId");l(this,"iconId");l(this,"icon",new Ge);l(this,"iconName","");l(this,"svgCode","");O.BuildClass(this,e)}addFile(e){this.icon.id||(this.icon.id=De.UUID()),this.icon.originalName=e.name,this.icon.file=e.raw}}var Ch=Object.defineProperty,kh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Ch(e,i,r),r};class Ko{constructor(e){l(this,"id");l(this,"name","");l(this,"link","");l(this,"top",!0);l(this,"side",!0);l(this,"show",!1);l(this,"hide",!1);l(this,"active",!1);l(this,"order",0);l(this,"selected",!1);l(this,"editMode",!1);l(this,"subMenus",[]);l(this,"subMenusForDelete",[]);l(this,"iconId");l(this,"icon",new Ge);O.BuildClass(this,e)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const e=[];return e.push(this.icon),this.subMenus.forEach(i=>{e.push(i.icon)}),e}addFile(e){this.icon.id||(this.icon.id=De.UUID()),this.icon.originalName=e.name,this.icon.file=e.raw}addSubMenu(){this.subMenus.push(new qi)}removeSubMenu(e){const i=this.subMenus[e].id;i&&this.subMenusForDelete.push(i),this.subMenus.splice(e,1)}setColorsForSubMenus(){const e=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let i=0;this.subMenus.forEach(o=>{o.color=e[i],i=e.length-1?i=0:i++})}containPath(e){return this.link===e||!!this.subMenus.find(i=>i.link===e)}static GetClassName(){return"menu"}}kh([O.GetClassConstructor(qi)],Ko.prototype,"subMenus");const xh=Object.freeze(Object.defineProperty({__proto__:null,Menu:Ko,SubMenu:qi},Symbol.toStringTag,{value:"Module"}));let Eh=class extends R.H.BaseStore{constructor(){super(Ko,"menus")}};const Bh=new Eh;let $h=class extends R.H.BaseStore{constructor(){super(qi,"sub-menus")}};const Nh=new $h,Mh=Object.freeze(Object.defineProperty({__proto__:null,C:xh,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:Bh,SubMenus:Nh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class ji{constructor(e){l(this,"id","");l(this,"name","");l(this,"component","");l(this,"order");l(this,"active",!1);l(this,"key",0);O.BuildClass(this,e)}static Create(e,i,o,r,s){const a=new ji;return a.id=e,a.name=i,a.component=o,a.order=r,a.active=!!s,a}}var da=(n=>(n.User="USER",n.Admin="ADMIN",n))(da||{});class Ih{constructor(e){l(this,"id");l(this,"name",da.User);l(this,"label","");l(this,"startPage","");O.BuildClass(this,e)}}class er{constructor(e){l(this,"id");l(this,"document",new Ge);l(this,"documentId");l(this,"pageId");O.BuildClass(this,e)}}var Vh=Object.defineProperty,Th=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Vh(e,i,r),r};class Wi{constructor(e){l(this,"id");l(this,"pageId");l(this,"fileInfoId");l(this,"fileInfo");l(this,"description");O.BuildClass(this,e)}}Th([O.GetClassConstructor(Ge)],Wi.prototype,"fileInfo");class Gi{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"downloadToFile",!1);l(this,"pageSectionId");l(this,"scan",new Ge);l(this,"scanId");O.BuildClass(this,e)}getFileInfos(){return[this.scan]}getFileName(){return this.name?this.name:this.scan.originalName}}var Rh=Object.defineProperty,Ph=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Rh(e,i,r),r};class Rn{constructor(e){l(this,"id");l(this,"name","");l(this,"singleScan",!1);l(this,"scan");l(this,"scanId");l(this,"order",0);l(this,"description","");l(this,"scans",[]);l(this,"scansForDelete",[]);l(this,"pageSectionDocuments",[]);l(this,"pageSideMenuId");l(this,"pageId");l(this,"text","");l(this,"documents",[]);O.BuildClass(this,e),this.documents=this.pageSectionDocuments,this.text=this.description.replace("<p>undefined</p>","")}addDocument(){const e=new Gi;e.order=this.pageSectionDocuments.length-1,this.pageSectionDocuments.push(e)}getFileInfos(){const e=[];return this.pageSectionDocuments.forEach(i=>{e.push(...i.getFileInfos())}),e}infoExists(e){const i=re.SearchIn(this.name,e),o=re.SearchIn(this.description,e),r=this.getDocuments(e);return i||o||r.length>0}getDocuments(e){return this.pageSectionDocuments.filter(i=>re.SearchIn(i.name,e))}getDescription(e){return e?re.WrapSubStr(this.description,e):this.description}filter(e){if(!e){this.text=this.description,this.documents=this.pageSectionDocuments;return}this.text=re.SearchIn(this.description,e)?re.WrapSubStr(this.description,e):"",this.documents=this.pageSectionDocuments.filter(i=>re.SearchIn(i.name,e))}}Ph([O.GetClassConstructor(Gi)],Rn.prototype,"pageSectionDocuments");var vh=Object.defineProperty,Ah=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&vh(e,i,r),r};class jt{constructor(e){l(this,"id");l(this,"name","Новое меню");l(this,"order",0);l(this,"description","");l(this,"routeAnchor","");l(this,"slug","");l(this,"pageSections",[]);l(this,"showContent",!1);l(this,"pageId");l(this,"selected",!1);l(this,"sections",[]);l(this,"text","");O.BuildClass(this,e),this.sections=this.pageSections,this.text=this.description.replace("<p>undefined</p>","")}getFileInfos(){const e=[];return this.pageSections.forEach(i=>{e.push(...i.getFileInfos())}),e}addPageSection(){const e=new Rn;e.order=this.pageSections.length+1,e.name=`Новой раздел ${e.order}`,e.id=De.UUID(),this.pageSections.push(e)}infoExists(e){const i=re.SearchIn(this.name,e),o=re.SearchIn(this.description,e),r=this.getPageSections(e).length>0;return i||o||r}getPageSections(e){return e.length?this.pageSections.filter(i=>i.infoExists(e)):this.pageSections}filter(e){e.length?(this.sections=this.pageSections.filter(i=>i.infoExists(e)),this.text=re.SearchIn(this.description,e)?re.WrapSubStr(this.description,e):""):(this.sections=this.pageSections,this.text=this.description),this.sections.forEach(i=>i.filter(e))}}Ah([O.GetClassConstructor(Rn)],jt.prototype,"pageSections");var zh=Object.defineProperty,Qi=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&zh(e,i,r),r};class Pn{constructor(e){l(this,"id");l(this,"title","");l(this,"content","");l(this,"slug","");l(this,"pagesGroup","Без группы");l(this,"link","");l(this,"withComments",!1);l(this,"showContacts",!1);l(this,"collaps",!1);l(this,"showContent",!1);l(this,"pageImages",[]);l(this,"pageImagesForDelete",[]);l(this,"pageImagesNames",[]);l(this,"pageSideMenus",[]);l(this,"menus",[]);l(this,"pageSideMenusForDelete",[]);l(this,"pageSections",[]);l(this,"pageSectionsForDelete",[]);l(this,"pageDocuments",[]);l(this,"contact",new Hs);l(this,"contactId");l(this,"role",new Ih);l(this,"roleId");l(this,"filterStr","");l(this,"activeMenuId","");O.BuildClass(this,e),this.menus=this.pageSideMenus}getActiveMenu(){const e=this.pageSideMenus.find(i=>i.id===this.activeMenuId);return e||this.pageSideMenus[0]}setActiveMenuId(e){this.activeMenuId=e}getLink(){return this.slug!==""?`/pages/${this.slug}`:"404"}getFileInfos(){const e=[];return this.pageSideMenus.forEach(i=>{e.push(...i.getFileInfos())}),this.pageImages.forEach(i=>{i.fileInfo&&e.push(i.fileInfo)}),e}addSideMenu(){const e=new jt;return e.order=this.pageSideMenus.length+1,e.name=`Новое меню ${e.order}`,e.id=De.UUID(),this.pageSideMenus.push(e),e.id}selectSideMenu(e,i){if(!e&&this.pageSideMenus.length>0){this.pageSideMenus[0].selected=!0;return}this.pageSideMenus.forEach(o=>{i?o.selected=o.id===e:o.selected=o.slug===e})}getSelectedSideMenu(){const e=this.pageSideMenus.find(i=>i.selected);return e||new jt}addCustomSectionsToSideMenu(e){e.forEach(i=>{const o=new jt;o.id=i.id,o.name=i.name,typeof i.order<"u"?this.pageSideMenus.splice(i.order,0,o):this.pageSideMenus.push(o)})}getPageSideMenus(){if(this.showContacts&&!this.pageSideMenus.find(e=>e.id==="contacts")){const e=new jt;e.id="contacts",e.name="Контакты",this.pageSideMenus.push(e)}return this.filterStr===""?this.pageSideMenus:this.pageSideMenus.filter(e=>e.infoExists(this.filterStr))}filter(){this.filterStr===""?this.menus=this.pageSideMenus:this.menus=this.pageSideMenus.filter(e=>e.infoExists(this.filterStr)),this.menus.forEach(e=>e.filter(this.filterStr))}static GetClassName(){return"page"}}Qi([O.GetClassConstructor(Wi)],Pn.prototype,"pageImages"),Qi([O.GetClassConstructor(jt)],Pn.prototype,"pageSideMenus"),Qi([O.GetClassConstructor(Rn)],Pn.prototype,"pageSections"),Qi([O.GetClassConstructor(er)],Pn.prototype,"pageDocuments");const Dh=Object.freeze(Object.defineProperty({__proto__:null,CustomSection:ji,Page:Pn,PageDocument:er,PageImage:Wi,PageSection:Rn,PageSectionDocument:Gi,PageSideMenu:jt},Symbol.toStringTag,{value:"Module"}));let Fh=class extends R.H.BaseStore{constructor(){super(ji,"custom-sections")}};const Oh=new Fh;let _h=class extends R.H.BaseStore{constructor(){super(er,"page-documents")}};const Lh=new _h;let Hh=class extends R.H.BaseStore{constructor(){super(Wi,"page-images")}};const Uh=new Hh;let qh=class extends R.H.BaseStore{constructor(){super(Gi,"page-section-documents")}};const jh=new qh;let Wh=class extends R.H.BaseStore{constructor(){super(Rn,"page-sections")}};const Gh=new Wh;let Qh=class extends R.H.BaseStore{constructor(){super(jt,"page-side-menus")}};const Yh=new Qh;let Xh=class extends R.H.BaseStore{constructor(){super(Pn,"pages")}};const Zh=new Xh,Jh=Object.freeze(Object.defineProperty({__proto__:null,C:Dh,S:Object.freeze(Object.defineProperty({__proto__:null,CustomSections:Oh,PageDocuments:Lh,PageImages:Uh,PageSectionDocuments:jh,PageSections:Gh,PageSideMenus:Yh,Pages:Zh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class vt{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"sessionId");l(this,"payload",{});R.H.Classes.BuildClass(this,e)}static Create(e){const i=new vt;return i.id=R.H.Id.UUID(),i.scheduleId=e,i.startTime="9:00",i.endTime="9:30",i}}var Kh=Object.defineProperty,em=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Kh(e,i,r),r};const ua=class Al{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"slots",[]);R.H.Classes.BuildClass(this,e)}static Create(e){const i=new Al;return i.id=R.H.Id.UUID(),i.scheduleId=e,i.startTime="9:00",i.endTime="9:30",i}};em([R.H.Classes.GetClassConstructor(vt)],ua.prototype,"slots");let vn=ua;var tm=Object.defineProperty,fa=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&tm(e,i,r),r};const tr=class zl{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"scheduleDayId");l(this,"placeId");l(this,"sessions",[]);l(this,"slots",[]);R.H.Classes.BuildClass(this,e)}static Create(e,i){const o=new zl;return o.id=R.H.Id.UUID(),o.placeId=e,o.scheduleDayId=i,o}addSession(){const e=vn.Create(this.id);return this.sessions.push(e),e}addSlot(){const e=vt.Create(this.id);return this.slots.push(e),e}};fa([R.H.Classes.GetClassConstructor(vn)],tr.prototype,"sessions"),fa([R.H.Classes.GetClassConstructor(vt)],tr.prototype,"slots");let ri=tr;var nm=Object.defineProperty,im=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&nm(e,i,r),r};const ha=class Dl{constructor(e){l(this,"id");l(this,"date",new Date(0));l(this,"description","");l(this,"ownerId");l(this,"ownerType","");l(this,"schedules",[]);R.H.Classes.BuildClass(this,e)}static Create(e,i,o=new Date){const r=new Dl;return r.id=R.H.Id.UUID(),r.ownerId=e,r.ownerType=i||"",r.date=o,r}};im([R.H.Classes.GetClassConstructor(ri)],ha.prototype,"schedules");let Yi=ha;class An{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"color","");R.H.Classes.BuildClass(this,e)}static Create(){const e=new An;return e.id=R.H.Id.UUID(),e}}const om=Object.freeze(Object.defineProperty({__proto__:null,Schedule:ri,ScheduleDay:Yi,SchedulePlace:An,ScheduleSession:vn,ScheduleSlot:vt},Symbol.toStringTag,{value:"Module"})),de=n=>n?R.H.Time.HMtoM(n):NaN,it=n=>R.H.Time.ConcatHM(Math.floor(n/60),n%60),zn=n=>{if(!n)return"";const e=R.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(e)?e:""},si=(n,e)=>R.H.Time.DiffM(n,e),cn=(n,e)=>R.H.Time.AddMtoHM(n,e),nr=(n,e)=>{const i=de(n.startTime),o=de(e.startTime);return isFinite(i)?isFinite(o)?i-o:-1:1},ai=(n,e)=>{const i=de(n.startTime),o=de(n.endTime),r=de(e.startTime),s=de(e.endTime);return!isFinite(i)||!isFinite(o)||!isFinite(r)||!isFinite(s)?!1:i<s&&r<o},li=(n,e)=>Math.round(n/e)*e,ma=(n,e=8*60,i=20*60)=>{let o=e,r=i;for(const{item:d}of n){const c=de(d.startTime),u=de(d.endTime);isFinite(c)&&(o=Math.min(o,c)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(o/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},pa=(n,e)=>{const i=de(n.item.startTime),o=de(n.item.endTime);if(!isFinite(i)||!isFinite(o))return{top:"0%",height:"48px"};const r=(i-e.start)/e.total*100,s=Math.max((o-i)/e.total*100,2.5);return{top:r+"%",height:s+"%"}},ga=(n,e)=>{const i=de(n.startTime),o=de(n.endTime);if(!isFinite(i)||!isFinite(o)||o<=i)return{top:"0%",height:"auto"};const r=o-i,s=de(e.startTime),a=de(e.endTime),d=isFinite(s)?Math.max((s-i)/r*100,0):0;let c=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return c=Math.min(Math.max(c,3),100-d),{top:d+"%",height:c+"%"}},ya=(n,e,i)=>n.some(o=>o.item.id===e.item.id||e.kind==="session"&&o.kind==="slot"&&o.item.sessionId===e.item.id?!1:i(e.item,o.item)),wa=(n,e,i)=>n.some(o=>o.id!==e.id&&i(e,o)),ba=(n,e,i,o)=>{if(!(!isFinite(e)||!isFinite(i)||i<=e))return(n||[]).find(r=>{const s=o(r.startTime),a=o(r.endTime);return isFinite(s)&&isFinite(a)&&e>=s&&i<=a})},Sa=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",ir={hall:"Зал",halls:"Залы",session:"Секция",sessions:"Секции",slot:"Событие",slots:"События",addHall:"Добавить зал",addSession:"Добавить секцию",addSlot:"Добавить событие",addDay:"Добавить день",deleteDay:"Удалить день",deleteHall:"Удалить расписание (зал)",noDays:"Сначала укажите даты",noHalls:"Для этого дня не добавлены залы.",date:"Дата",newHallPlaceholder:"Название нового зала",create:"Создать",close:"Закрыть",save:"Сохранить",cancel:"Отмена",delete:"Удалить",edit:"Редактировать",grid:"Сетка",list:"Список",startTime:"Начало",endTime:"Конец",sessionSelect:"Секция",sessionsTitle:"Секции",slotsTitle:"События",noSlots:"Пусто",noSlotsInDay:"Докладов нет",conflictTitle:"Пересечение с другим блоком в этом зале",changeDurationTitle:"Изменить длительность",gridHint:"Перетаскивайте блоки мышью или пальцем — в другой зал или на другое время. Блоки не сдвигают друг друга: пересечения подсвечиваются красным. Событие, брошенное внутрь секции, автоматически становится её частью. Секции помечены фиолетовым корешком. Клик по блоку — редактирование, нижняя кромка — длительность, двойной клик по пустому месту — новое событие.",listHint:"Перетаскивайте строки — порядок сохраняется, время блоков при этом не меняется.",alreadyAdded:"Зал уже добавлен в этот день",selectDayFirst:"Сначала выберите день",cannotCreate:"Не удалось добавить зал: сервер не ответил",createFailed:"Ошибка при добавлении зала",hallCreated:"Зал «{name}» создан",hallCreateFailed:"Не удалось создать зал",hallNotAdded:"Не удалось добавить зал: сервер не ответил",dayAdded:"День добавлен",saveEventFirst:"Сначала сохраните",correctStartTime:"Укажите корректное время начала",name:"Название",description:"Описание",participants:"Участники",enterName:"Введите название",intoSession:"в секцию",conflictCount:"пересечение"},Ca={createDay(n){return Yi.Create(void 0,void 0,n)},createSchedule(n,e){return ri.Create(n,e)},createSession(n){const e=(n==null?void 0:n.sessions)||[],i=e[e.length-1],o=(i==null?void 0:i.endTime)||"9:00",r=vn.Create(n==null?void 0:n.id);return r.startTime=o,r.endTime=R.H.Time.AddMtoHM(o,30),r},createSlot(n){return vt.Create(n==null?void 0:n.id)},createPlace(n){const e=An.Create();return e.name=n||"",e}},rm={class:"schedule-admin"},sm={key:0,class:"no-days text-center text-grey q-py-xl"},am={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},lm={key:1,class:"row items-center q-gutter-xs zoom-control"},cm={key:0,class:"grid-view"},dm={key:0,class:"text-grey text-center q-py-lg"},um={class:"grid-header"},fm={class:"row items-center justify-center q-gutter-xs"},hm={class:"ellipsis"},mm={class:"time-gutter"},pm=["data-schedule-id","onDblclick"],gm=["title","onPointerdown","onClick"],ym={class:"block-content"},wm={class:"block-time"},bm={class:"block-name ellipsis"},Sm={key:0,class:"block-speakers ellipsis"},Cm={key:0,class:"session-perfoms"},km=["title","onPointerdown","onClick"],xm={class:"nested-time"},Em={class:"nested-name ellipsis"},Bm={key:0,class:"nested-speakers ellipsis"},$m=["title","onPointerdown"],Nm={class:"block-actions"},Mm=["title","onPointerdown"],Im=["title"],Vm={class:"session-spine-name"},Tm={class:"block-time"},Rm={key:0,class:"session-badge"},Pm={key:1,class:"conflict-badge"},vm={class:"block-name ellipsis"},Am={class:"text-caption text-grey-6 q-pa-xs"},zm={key:1,class:"list-view"},Dm={class:"row items-center q-gutter-sm"},Fm={class:"text-subtitle2"},Om={key:0,class:"sub-block"},_m={class:"sub-title"},Lm={class:"list-row session-row"},Hm={key:0,class:"nested-list"},Um={class:"col-4 ellipsis"},qm={class:"time-text"},jm={class:"sub-block"},Wm={class:"sub-title"},Gm={class:"list-row slot-row"},Qm={key:0,class:"text-grey text-center q-py-sm"},Ym={class:"text-caption text-grey-6 q-mb-sm"},Xm={class:"text-h6"},Zm={class:"row items-center q-gutter-sm q-mb-md"},Jm={key:0,class:"text-grey text-center q-py-md"},Km={class:"col ellipsis"},ep={class:"text-h6"},tp={class:"row q-col-gutter-sm q-mb-sm"},np={class:"col-6"},ip={class:"col-6"},dn=15,ka=6,xa=v(t.defineComponent({__name:"ScheduleGridEditor",props:{days:{},places:{},persist:{},labels:{default:()=>({})},factories:{default:()=>({})},hallName:{type:Function,default:void 0},dayTitle:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotSubtitle:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0}},setup(n){var Bl,$l;const e=n,i=t.computed(()=>({...ir,...e.labels})),o=t.computed(()=>({...Ca,...e.factories})),r=p=>e.slotListOf?e.slotListOf(p):(p==null?void 0:p.slots)||[],s=p=>e.nestedSlotListOf?e.nestedSlotListOf(p):(p==null?void 0:p.slots)||[],a=p=>(p==null?void 0:p.name)||i.value.hall,d=p=>e.sessionName?e.sessionName(p):(p==null?void 0:p.name)||`${i.value.session} ${(p==null?void 0:p.startTime)||""}–${(p==null?void 0:p.endTime)||""}`.trim(),c=p=>e.slotName?e.slotName(p):(p==null?void 0:p.name)||i.value.slot,u=p=>e.slotSubtitle?e.slotSubtitle(p):"",f=t.ref("grid"),h=t.ref(($l=(Bl=e.days)==null?void 0:Bl[0])==null?void 0:$l.id),m=t.ref(!1),S=t.ref(""),w=t.ref(!1),E=t.ref(null),B=t.ref(null),x=t.ref(void 0),N=t.ref(null),C=t.ref(null),P=t.ref(!1),D=t.ref(0),Z=t.ref(null),K=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],fe=t.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);t.watch(fe,p=>localStorage.setItem("schedule-grid-zoom",String(p)));const ht=t.computed(()=>Math.max(be.value.total/60*fe.value,360)),Qe=t.computed(()=>ht.value+"px"),Pe=t.computed(()=>[...e.days||[]].sort((p,g)=>new Date(p.date).getTime()-new Date(g.date).getTime())),ke=t.computed(()=>Pe.value.find(p=>p.id===h.value));t.watch(()=>Pe.value.map(p=>p.id).join(","),()=>{var p;(!h.value||!Pe.value.some(g=>g.id===h.value))&&(h.value=(p=Pe.value[0])==null?void 0:p.id)});const fn=p=>{if(e.dayTitle)return e.dayTitle(p);const g=new Date(p.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Ye=p=>{const g=new Date(p);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},Nt=async(p,g)=>{g&&(p.date=new Date(g),await e.persist.updateDay(p),await e.persist.refresh())},Mt=async p=>{var b;if(!p)return;for(const I of mt(p))await se(I);await e.persist.removeDay(p);const g=(e.days||[]).indexOf(p);g>=0&&e.days.splice(g,1),await e.persist.refresh(),h.value=(b=Pe.value[0])==null?void 0:b.id},Ot=async()=>{var H,X;const p=Pe.value,g=p[p.length-1],b=g?new Date(new Date(g.date).getTime()+864e5):new Date;let I;try{I=o.value.createDay(b)}catch{e.persist.notify("warning",i.value.saveEventFirst);return}try{await((X=(H=e.persist).createDay)==null?void 0:X.call(H,I));for(const ue of e.places||[])await j(ue,I);await e.persist.refresh()}catch{e.persist.notify("negative",i.value.createFailed);return}h.value=I.id,e.persist.notify("positive",`${i.value.dayAdded}: ${fn(I)}`)},mt=p=>((p==null?void 0:p.schedules)||[]).slice().sort((g,b)=>{const I=wt(g),H=wt(b);return I.localeCompare(H,"ru")}),wt=p=>{if(e.hallName)return e.hallName(p);const g=p.place||(e.places||[]).find(b=>b.id===p.placeId);return(g==null?void 0:g.name)||i.value.hall},nt=()=>{m.value=!0},we=t.computed(()=>{const p=ke.value,g=new Set(((p==null?void 0:p.schedules)||[]).map(b=>b.placeId));return(e.places||[]).filter(b=>!g.has(b.id))}),j=async(p,g)=>{if(e.persist.bindPlaceToDay){await e.persist.bindPlaceToDay(p,g,o.value.createSchedule);return}const b=o.value.createSchedule(p.id,g.id);await e.persist.createSchedule(b)},Le=async p=>{m.value=!1;const g=ke.value;if(!g){e.persist.notify("warning",i.value.selectDayFirst);return}if(mt(g).some(b=>b.placeId===p.id)){e.persist.notify("warning",i.value.alreadyAdded);return}try{await j(p,g)}catch(b){console.warn("addPlaceToDay failed:",b),e.persist.notify("negative",i.value.createFailed),await e.persist.refresh();return}await e.persist.refresh(),h.value=g.id},It=async()=>{var b,I,H;const p=(b=S.value)==null?void 0:b.trim();if(!p){e.persist.notify("warning",i.value.enterName);return}const g=o.value.createPlace(p);try{if(!await((H=(I=e.persist).createPlace)==null?void 0:H.call(I,g))){e.persist.notify("negative",i.value.hallCreateFailed);return}}catch(X){console.warn("createPlace failed:",X),e.persist.notify("negative",i.value.hallCreateFailed);return}S.value="",await Le(g),e.persist.notify("positive",i.value.hallCreated.replace("{name}",p))},ge=async p=>{await se(p);const g=je(p);g&&(g.schedules=(g.schedules||[]).filter(b=>b.id!==p.id)),await e.persist.refresh()},se=async p=>{for(const g of p.sessions||[]){for(const b of s(g))await e.persist.removeSlot(b);await e.persist.removeSession(g)}for(const g of r(p))await e.persist.removeSlot(g);await e.persist.removeSchedule(p)},je=p=>(e.days||[]).find(g=>(g.schedules||[]).some(b=>b.id===p.id)),We=p=>[...s(p)].sort(nr),Hn=p=>(p.sessions||[]).some(g=>s(g).length>0),Xe=new WeakMap,_t=p=>{const g=Xe.get(p),b=r(p);if(g&&g.src===b)return g.list;const I=new Set((p.sessions||[]).map(X=>X.id)),H=b.filter(X=>!X.sessionId||!I.has(X.sessionId));return Xe.set(p,{src:b,list:H}),H},Me=p=>[...(p.sessions||[]).map(g=>({kind:"session",item:g})),..._t(p).map(g=>({kind:"slot",item:g}))],hn=p=>(p.sessions||[]).map(g=>({kind:"session",item:g})),be=t.computed(()=>{var g,b;const p=(((g=ke.value)==null?void 0:g.schedules)||[]).flatMap(I=>Me(I));for(const I of((b=ke.value)==null?void 0:b.schedules)||[])for(const H of I.sessions||[])p.push(...We(H).map(X=>({kind:"slot",item:X})));return ma(p)}),Ze=t.computed(()=>{const p=[];for(let g=be.value.start;g<=be.value.end;g+=60)p.push({min:g,label:it(g)});return p}),ee=t.computed(()=>{const p=[];for(let g=be.value.start+30;g<be.value.end;g+=60)p.push({min:g,label:it(g)});return p}),Ie=p=>pa(p,be.value),rt=t.computed(()=>{if(!N.value||!B.value)return{};const p=be.value,g=(N.value.minutes-p.start)/p.total*100,b=Math.max(B.value.duration/p.total*100,2.5);return{top:g+"%",height:b+"%"}}),st=t.computed(()=>!N.value||!B.value?"":it(N.value.minutes+B.value.duration)),mn=t.computed(()=>{if(!N.value)return{};const p=be.value,g=(N.value.minutes-p.start)/p.total*100,b=Math.max(dn/p.total*100,1.5);return{top:g+"%",height:b+"%"}}),bt=t.computed(()=>{var H,X,ue,$e,Ve;if(!N.value||!B.value||!B.value.id)return 0;const p=hi(N.value.scheduleId);if(!p)return 0;const g={startTime:N.value.time,endTime:st.value},b=(H=N.value.session)==null?void 0:H.id;let I=0;for(const T of Me(p))T.item.id!==((X=B.value)==null?void 0:X.id)&&(((ue=B.value)==null?void 0:ue.kind)==="slot"&&T.kind==="session"&&T.item.id===b||ai(g,T.item)&&I++);if((($e=B.value)==null?void 0:$e.kind)==="slot"&&N.value.session)for(const T of We(N.value.session))T.id!==((Ve=B.value)==null?void 0:Ve.id)&&ai(g,T)&&I++;return I}),Vt=t.computed(()=>bt.value>0),uo=(p,g)=>ya(Me(p),g,ai),Er=(p,g)=>wa(We(p),g,ai),Br=(p,g)=>ga(p,g),pn=p=>{const g=be.value,b=de(p.item.startTime),I=de(p.item.endTime);return!isFinite(b)||!isFinite(I)?48:(I-b)/g.total*ht.value},Un=p=>Sa(pn(p)),$r=p=>{const g=e.slotName?e.slotName(p.item):p.item.name||(p.kind==="session"?i.value.session:i.value.slot);if(p.kind==="slot"&&Un(p)!=="h-full"){const b=u(p.item);if(b)return`${g} — ${b}`}return g},Nr=(p,g)=>{const b=c(p);if(g!=="h-full"){const I=u(p);if(I)return`${b} — ${I}`}return b},fi=p=>{const g=`${p.item.startTime||"?"}–${p.item.endTime||"?"}`;if(p.kind==="slot"){const b=u(p.item);return[c(p.item),g,b?`${i.value.participants}: ${b}`:""].filter(Boolean).join(`
23
23
  `)}return[d(p.item),g].filter(Boolean).join(`
24
- `)},S=p=>{const g=u(p);return[c(p),`${p.startTime}–${p.endTime}`,g?`${i.value.participants}: ${g}`:""].filter(Boolean).join(`
25
- `)},E=(p,g)=>{var w;return{conflict:xr(p.item,g),dragging:((w=pt.value)==null?void 0:w.perfom.id)===g.id,[Un(p)]:!0}},N=t.ref(null),A=(p,g)=>{const w=p.getBoundingClientRect(),I=Math.min(Math.max((g-w.top)/w.height,0),1);return be.value.start+li(I*be.value.total,un)},Y=(p,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||P.value||(N.value={gi:p,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",Ee),window.addEventListener("pointerup",F),window.addEventListener("pointercancel",te),window.addEventListener("keydown",he))},Ee=p=>{const g=N.value;if(g){if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<Ca)return;g.moved=!0;const w=si(g.gi.item.startTime,g.gi.item.endTime);$.value={kind:g.gi.kind,id:g.gi.item.id,name:g.gi.item.name||(g.gi.kind==="session"?i.value.session:i.value.slot),duration:isFinite(w)&&w>0?w:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}Be(p.clientX,p.clientY),ne(p.clientX,p.clientY)}},Be=(p,g)=>{var $e,Ve;const w=document.elementFromPoint(p,g),I=w==null?void 0:w.closest(".hall-col"),H=I==null?void 0:I.getAttribute("data-schedule-id");if(!I||!H){x.value=void 0,M.value=null;return}const X=hi(H);if(!X)return;x.value=X.id;const ue=A(I,g);M.value={scheduleId:X.id,minutes:ue,time:it(ue),hallName:wt(X),...(($e=$.value)==null?void 0:$e.kind)==="slot"?{session:Vr(X.sessions,ue,ue+(((Ve=$.value)==null?void 0:Ve.duration)||30),de)}:{}},k.value={x:p,y:g}},ne=(p,g)=>{const w=Z.value;if(!w)return;const I=w.getBoundingClientRect();g<I.top+48?w.scrollTop-=14:g>I.bottom-48&&(w.scrollTop+=14),p<I.left+48?w.scrollLeft-=14:p>I.right-48&&(w.scrollLeft+=14)},F=p=>{_(p)},_=async p=>{const g=N.value;if(L(),N.value=null,!g||!g.moved)return;D.value=Date.now();const w=document.elementFromPoint(p.clientX,p.clientY),I=w==null?void 0:w.closest(".hall-col"),H=I==null?void 0:I.getAttribute("data-schedule-id"),X=H?hi(H):void 0;if(I&&X){const ue=A(I,p.clientY);await yl(X,ue)}U()},L=()=>{window.removeEventListener("pointermove",Ee),window.removeEventListener("pointerup",F),window.removeEventListener("pointercancel",te),window.removeEventListener("keydown",he)},U=()=>{N.value=null,$.value=null,x.value=void 0,M.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor="",D.value=Date.now()},te=()=>{L(),U()},he=p=>{p.key==="Escape"&&te()};t.onBeforeUnmount(()=>{L(),Ir(),document.body.style.userSelect="",document.body.style.cursor=""});const ye=p=>{if(!p)return null;for(const g of e.days||[])for(const w of g.schedules||[]){const I=(w.sessions||[]).find(X=>X.id===p);if(I)return{kind:"session",item:I,schedule:w};const H=r(w).find(X=>X.id===p);if(H)return{kind:"slot",item:H,schedule:w}}return null},at=()=>{var p;return ye((p=$.value)==null?void 0:p.id)},uo=(p,g)=>{g.preventDefault(),g.stopPropagation();const w=p.item,I=de(w.startTime),H=de(w.endTime);if(!isFinite(I)||!isFinite(H))return;const X=g.clientY;P.value=!0;const ue=T=>{const Q=(T.clientY-X)/fe.value*60,J=li(H+Q,un);w.endTime=it(Math.max(J,I+un))},$e=async()=>{window.removeEventListener("pointermove",ue),window.removeEventListener("pointerup",Ve),P.value=!1,D.value=Date.now();const T=ye(w.id);T&&(await St(w,T.kind),await e.persist.refresh())},Ve=()=>{$e()};window.addEventListener("pointermove",ue),window.addEventListener("pointerup",Ve)},pt=t.ref(null),Nr=(p,g,w)=>{if(w.target.closest(".nested-edit, .nested-resize")||w.button!==0||P.value)return;const I=w.target.closest(".session-perfoms"),H=de(p.startTime),X=de(p.endTime),ue=si(g.startTime,g.endTime);!I||!isFinite(H)||!isFinite(X)||X<=H||(pt.value={perfom:g,session:p,startX:w.clientX,startY:w.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:H,sessionDur:X-H,durMin:isFinite(ue)&&ue>0?ue:30,container:I},window.addEventListener("pointermove",ml),window.addEventListener("pointerup",pl),window.addEventListener("pointercancel",Mr),window.addEventListener("keydown",gl))},ml=p=>{const g=pt.value;if(!g)return;if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<Ca)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const w=g.container.getBoundingClientRect(),I=Math.min(Math.max((p.clientY-w.top)/w.height,0),1);let H=g.sessionStart+li(I*g.sessionDur,un);const X=g.sessionStart+g.sessionDur-g.durMin;H=Math.min(Math.max(H,g.sessionStart),Math.max(X,g.sessionStart)),g.perfom.startTime=it(H),g.perfom.endTime=it(H+g.durMin),k.value={x:p.clientX,y:p.clientY}},pl=p=>{dw(p)},dw=async p=>{var ue;const g=pt.value;if(Ir(),pt.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;D.value=Date.now();const w=document.elementFromPoint(p.clientX,p.clientY),I=w==null?void 0:w.closest(".hall-col"),H=I==null?void 0:I.getAttribute("data-schedule-id"),X=H?hi(H):void 0;if(I&&X){$.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||i.value.slot,duration:g.durMin};const $e=A(I,p.clientY),Ve=it($e),T=si(g.perfom.startTime,g.perfom.endTime),Q=dn(Ve,T>0?T:30),J=((ue=Sl(g.perfom))==null?void 0:ue.id)===X.id&&g.perfom.startTime===Ve&&g.perfom.endTime===Q;await yl(X,$e),J&&(await e.persist.updateSlot(g.perfom),await e.persist.refresh()),$.value=null;return}g.perfom.startTime=zn(g.perfom.startTime),g.perfom.endTime=zn(g.perfom.endTime),g.perfom.startTime&&(await e.persist.updateSlot(g.perfom),await e.persist.refresh())},Mr=()=>{const p=pt.value;Ir(),p&&(p.perfom.startTime=p.savedStart,p.perfom.endTime=p.savedEnd),pt.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor=""},Ir=()=>{window.removeEventListener("pointermove",ml),window.removeEventListener("pointerup",pl),window.removeEventListener("pointercancel",Mr),window.removeEventListener("keydown",gl)},gl=p=>{p.key==="Escape"&&Mr()},uw=(p,g,w)=>{w.preventDefault(),w.stopPropagation();const I=de(p.startTime),H=de(p.endTime),X=de(g.startTime),ue=w.target.closest(".nested-perfom"),$e=ue==null?void 0:ue.closest(".session-perfoms");if(!ue||!$e||!isFinite(I)||!isFinite(H)||H<=I||!isFinite(X))return;const Ve=$e.getBoundingClientRect(),T=H-I;P.value=!0;const Q=yn=>{const yw=Math.min(Math.max((yn.clientY-Ve.top)/Ve.height,0),1),ww=Math.min(Math.max(X+un,I+li(yw*T,un)),H);g.endTime=it(ww)},J=async()=>{window.removeEventListener("pointermove",Q),window.removeEventListener("pointerup",q),P.value=!1,D.value=Date.now(),await e.persist.updateSlot(g),await e.persist.refresh()},q=()=>{J()};window.addEventListener("pointermove",Q),window.addEventListener("pointerup",q)},yl=async(p,g)=>{var Q;x.value=void 0,M.value=null,k.value=null;const w=at();if(!w)return;const I=it(g),H=si(w.item.startTime,w.item.endTime),X=dn(I,H>0?H:30);if(((Q=w.schedule)==null?void 0:Q.id)===p.id&&w.item.startTime===I&&w.item.endTime===X)return;const ue=w.item.startTime;if(w.item.startTime=I,w.item.endTime=X,w.kind==="slot"){const J=Vr(p.sessions,de(I),de(X),de);J?w.item.sessionId=J.id:delete w.item.sessionId}if(w.kind==="session"){const J=de(I)-de(ue);for(const q of We(w.item))q.startTime&&(q.startTime=dn(q.startTime,J),q.endTime&&(q.endTime=dn(q.endTime,J)),q.scheduleId=p.id,await St(q,"slot"))}const $e=w.schedule,Ve=w.kind==="session"?p.sessions:r(p),T=w.item;if($e&&$e.id!==p.id){T.scheduleId=p.id;const J=w.kind==="session"?$e.sessions:r($e);R.H.Classes.RemoveFromClassById(T.id,J,[]),Ve.push(T)}await St(T,w.kind),await e.persist.refresh()},fw=async(p,g)=>{if(g.target.closest(".timeline-block"))return;const w=A(g.currentTarget,g.clientY),I=o.value.createSlot(p);I.startTime=it(w),I.endTime=it(w+30);const H=Vr(p.sessions,w,w+30,de);H!=null&&H.id&&(I.sessionId=H.id),await e.persist.createSlot(I),await e.persist.refresh();const X=ye(I.id);X&&mi(X)},wl=async(p,g,w)=>{if(p.added){if(p.added.element.scheduleId=g.id,w==="slot"&&p.added.element.sessionId&&((g.sessions||[]).some(H=>H.id===p.added.element.sessionId)||delete p.added.element.sessionId),await St(p.added.element,w),w==="session")for(const I of s(p.added.element))I.scheduleId=g.id,await e.persist.updateSlot(I);await e.persist.refresh()}},hi=p=>{for(const g of e.days||[]){const w=(g.schedules||[]).find(I=>I.id===p);if(w)return w}},Vr=(p,g,w,I)=>wa(p,g,w,I),bl=p=>((p==null?void 0:p.sessions)||[]).map(g=>({id:g.id,label:d(g)})),Sl=p=>{for(const g of e.days||[])for(const w of g.schedules||[])if(r(w).some(I=>I.id===p.id)||p.sessionId&&(w.sessions||[]).some(I=>I.id===p.sessionId))return w},Cl=t.computed(()=>{const p=B.value;if(p)return p.kind==="session"?hi(p.item.scheduleId)||mw(p.item):Sl(p.item)}),hw=t.computed(()=>{const p=B.value;return!p||p.kind!=="slot"?[]:bl(Cl.value)}),mw=(p,g)=>{for(const w of e.days||[])for(const I of w.schedules||[])if((I.sessions||[]).some(H=>H.id===p.id))return I},kl=async(p,g)=>{g?p.sessionId=g:delete p.sessionId,await e.persist.updateSlot(p),await e.persist.refresh()},xl=async p=>{const g=o.value.createSession(p);await e.persist.createSession(g),await e.persist.refresh()},El=async p=>{const g=o.value.createSlot(p),w=[...r(p)].sort(tr).slice(-1)[0];g.startTime=zn(w==null?void 0:w.endTime)||"9:00",g.endTime=dn(g.startTime,30),await e.persist.createSlot(g),await e.persist.refresh()},Tr=async(p,g)=>{if(g==="slot")await e.persist.removeSlot(p);else{for(const w of s(p))delete w.sessionId,await e.persist.updateSlot(w);await e.persist.removeSession(p)}await e.persist.refresh()},St=async(p,g)=>{const w=zn(p.startTime),I=zn(p.endTime);if(!w){e.persist.notify("warning",i.value.correctStartTime);return}p.startTime=w,p.endTime=I||dn(w,30),g==="slot"?await e.persist.updateSlot(p):await e.persist.updateSession(p)},mi=p=>{P.value||Date.now()-D.value<400||(B.value={kind:p.kind,item:p.item},C.value=!0)},pw=async()=>{const p=B.value;p&&(await St(p.item,p.kind),C.value=!1,B.value=null,await e.persist.refresh())},gw=async()=>{const p=B.value;p&&(await Tr(p.item,p.kind),C.value=!1,B.value=null)};return e.persist.loadOptions&&e.persist.loadOptions(),(p,g)=>{var $e,Ve;const w=t.resolveComponent("PButton"),I=t.resolveComponent("PInput"),H=t.resolveComponent("PTooltip"),X=t.resolveComponent("PSelect"),ue=t.resolveComponent("PDialog");return t.openBlock(),t.createElementBlock("div",rm,[($e=n.days)!=null&&$e.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",am,[t.createVNode(t.unref(V.QTabs),{modelValue:h.value,"onUpdate:modelValue":g[0]||(g[0]=T=>h.value=T),dense:"",class:"day-tabs","active-color":"primary"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Pe.value,T=>(t.openBlock(),t.createBlock(t.unref(V.QTab),{key:T.id,name:T.id,label:hn(T)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"]),t.createVNode(t.unref(V.QSpace)),ke.value?(t.openBlock(),t.createBlock(I,{key:0,"model-value":Ye(ke.value.date),label:i.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=T=>It(ke.value,T))},null,8,["model-value","label"])):t.createCommentVNode("",!0),t.createVNode(w,{size:"sm",color:"negative",outline:"",icon:"delete",label:i.value.deleteDay,disable:!ke.value,onClick:g[2]||(g[2]=T=>Vt(ke.value))},null,8,["label","disable"]),t.createVNode(w,{size:"sm",color:"primary",outline:"",icon:"event",label:i.value.addDay,onClick:Lt},null,8,["label"]),t.createVNode(w,{size:"sm",color:"primary",outline:"",icon:"add",label:i.value.addHall,onClick:nt},null,8,["label"]),f.value==="grid"?(t.openBlock(),t.createElementBlock("div",lm,[t.createVNode(t.unref(V.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),t.createVNode(t.unref(V.QBtnToggle),{modelValue:fe.value,"onUpdate:modelValue":g[3]||(g[3]=T=>fe.value=T),"toggle-color":"primary",options:K,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QBtnToggle),{modelValue:f.value,"onUpdate:modelValue":g[4]||(g[4]=T=>f.value=T),"toggle-color":"primary",options:[{label:i.value.grid,value:"grid",icon:"calendar_view_week"},{label:i.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),f.value==="grid"?(t.openBlock(),t.createElementBlock("div",cm,[mt(ke.value).length?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:Z,class:"grid-scroll"},[t.createElementVNode("div",{class:"grid-wrap",style:t.normalizeStyle({"--halls":mt(ke.value).length,"--hours":Math.max(be.value.total/60,1),"--half-hours":Math.max(be.value.total/60*2,2)})},[t.createElementVNode("div",um,[g[15]||(g[15]=t.createElementVNode("div",{class:"time-gutter"},null,-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(mt(ke.value),T=>(t.openBlock(),t.createElementBlock("div",{key:T.id,class:t.normalizeClass(["hall-head",{"drag-over":x.value===T.id}])},[t.createElementVNode("div",fm,[t.createVNode(t.unref(V.QIcon),{name:"meeting_room",size:"15px"}),t.createElementVNode("span",hm,t.toDisplayString(wt(T)),1),t.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:Q=>El(T)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),t.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:Q=>xl(T)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.addSession),1)]),_:1})]),_:1},8,["onClick"]),t.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>ge(T)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])],2))),128))]),t.createElementVNode("div",{class:"grid-body",style:t.normalizeStyle({height:Qe.value})},[t.createElementVNode("div",mm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ze.value,T=>(t.openBlock(),t.createElementBlock("div",{key:T.min,class:"hour-label",style:t.normalizeStyle({top:(T.min-be.value.start)/be.value.total*100+"%"})},t.toDisplayString(T.label),5))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ee.value,T=>(t.openBlock(),t.createElementBlock("div",{key:T.min,class:"half-label",style:t.normalizeStyle({top:(T.min-be.value.start)/be.value.total*100+"%"})},t.toDisplayString(T.label),5))),128))]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(mt(ke.value),T=>(t.openBlock(),t.createElementBlock("div",{key:T.id,class:t.normalizeClass(["hall-col",{"drag-over":x.value===T.id}]),"data-schedule-id":T.id,onDblclick:Q=>fw(T,Q)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Me(T),Q=>{var J;return t.openBlock(),t.createElementBlock("div",{key:Q.item.id,class:t.normalizeClass(["timeline-block",[Q.kind,{conflict:co(T,Q),dragging:((J=$.value)==null?void 0:J.id)===Q.item.id},Un(Q)]]),style:t.normalizeStyle(Ie(Q)),title:fi(Q),onPointerdown:q=>Y(Q,q),onClick:q=>mi(Q)},[t.createVNode(t.unref(V.QIcon),{name:"drag_indicator",class:"drag-handle"}),t.createElementVNode("div",ym,[t.createElementVNode("div",wm,t.toDisplayString(Q.item.startTime)+"–"+t.toDisplayString(Q.item.endTime),1),t.createElementVNode("div",bm,t.toDisplayString(Br(Q)),1),Q.kind==="slot"&&u(Q.item)?(t.openBlock(),t.createElementBlock("div",Sm,t.toDisplayString(u(Q.item)),1)):t.createCommentVNode("",!0)]),Q.kind==="session"&&We(Q.item).length?(t.openBlock(),t.createElementBlock("div",Cm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(We(Q.item),q=>(t.openBlock(),t.createElementBlock("div",{key:q.id,class:t.normalizeClass(["nested-perfom",E(Q,q)]),style:t.normalizeStyle(Er(Q.item,q)),title:S(q),onPointerdown:t.withModifiers(yn=>Nr(Q.item,q,yn),["stop"]),onClick:t.withModifiers(yn=>mi({kind:"slot",item:q}),["stop"])},[t.createElementVNode("div",xm,t.toDisplayString(q.startTime)+"–"+t.toDisplayString(q.endTime),1),t.createElementVNode("div",Em,t.toDisplayString($r(q,Un(Q))),1),u(q)?(t.openBlock(),t.createElementBlock("div",Bm,t.toDisplayString(u(q)),1)):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),t.createElementVNode("div",{class:"nested-resize",title:i.value.changeDurationTitle,onPointerdown:t.withModifiers(yn=>uw(Q.item,q,yn),["stop","prevent"])},null,40,$m)],46,km))),128))])):t.createCommentVNode("",!0),t.createElementVNode("div",Nm,[co(T,Q)?(t.openBlock(),t.createBlock(t.unref(V.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.conflictTitle),1)]),_:1})]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:t.withModifiers(q=>mi(Q),["stop"])},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),t.createElementVNode("div",{class:"block-resize",title:i.value.changeDurationTitle,onPointerdown:t.withModifiers(q=>uo(Q,q),["stop","prevent"])},null,40,Mm)],46,gm)}),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(mn(T),Q=>{var J;return t.openBlock(),t.createElementBlock("div",{key:"spine-"+Q.item.id,class:t.normalizeClass(["session-spine",{dragging:((J=$.value)==null?void 0:J.id)===Q.item.id}]),style:t.normalizeStyle(Ie(Q)),title:d(Q.item)},[t.createVNode(t.unref(V.QIcon),{name:"groups",size:"11px"}),t.createElementVNode("span",Vm,t.toDisplayString(d(Q.item)),1)],14,Im)}),128)),M.value&&M.value.scheduleId===T.id&&$.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["drop-zone",{conflict:Rt.value}]),style:t.normalizeStyle(pn.value)},null,6)):t.createCommentVNode("",!0),M.value&&M.value.scheduleId===T.id&&$.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["drop-preview",[$.value.kind,{conflict:Rt.value}]]),style:t.normalizeStyle(rt.value)},[t.createElementVNode("div",Tm,[t.createTextVNode(t.toDisplayString(M.value.time)+"–"+t.toDisplayString(st.value)+" ",1),M.value.session?(t.openBlock(),t.createElementBlock("span",Rm,t.toDisplayString(i.value.intoSession),1)):t.createCommentVNode("",!0),bt.value?(t.openBlock(),t.createElementBlock("span",Pm," ⚠ "+t.toDisplayString(i.value.conflictCount)+": "+t.toDisplayString(bt.value),1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",vm,t.toDisplayString($.value.name),1)],6)):t.createCommentVNode("",!0)],42,pm))),128))],4),t.createElementVNode("div",Am,t.toDisplayString(i.value.gridHint),1)],4)],512)):(t.openBlock(),t.createElementBlock("div",dm,[t.createTextVNode(t.toDisplayString(i.value.noHalls)+" ",1),t.createVNode(w,{flat:"",color:"primary",size:"sm",label:i.value.addHall,onClick:nt},null,8,["label"])])),k.value&&M.value?(t.openBlock(),t.createElementBlock("div",{key:2,class:"drag-time-chip",style:t.normalizeStyle({left:k.value.x+"px",top:k.value.y+"px"})},[t.createVNode(t.unref(V.QIcon),{name:"schedule",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(M.value.time)+" · "+t.toDisplayString(M.value.hallName)+" ",1),M.value.session?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[g[16]||(g[16]=t.createTextVNode(" · ",-1)),t.createVNode(t.unref(V.QIcon),{name:"groups",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(i.value.intoSession)+" «"+t.toDisplayString(d(M.value.session))+"» ",1)],64)):t.createCommentVNode("",!0),bt.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[g[17]||(g[17]=t.createTextVNode(" · ",-1)),t.createVNode(t.unref(V.QIcon),{name:"warning",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(bt.value),1)],64)):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0),(Ve=pt.value)!=null&&Ve.moved&&k.value?(t.openBlock(),t.createElementBlock("div",{key:3,class:"drag-time-chip",style:t.normalizeStyle({left:k.value.x+"px",top:k.value.y+"px"})},[t.createVNode(t.unref(V.QIcon),{name:"schedule",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(pt.value.perfom.startTime)+"–"+t.toDisplayString(pt.value.perfom.endTime)+" · "+t.toDisplayString(i.value.intoSession),1)],4)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",zm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(mt(ke.value),T=>(t.openBlock(),t.createBlock(t.unref(V.QCard),{key:T.id,class:"hall-card q-mb-md"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCardSection),{class:"hall-card-head"},{default:t.withCtx(()=>[t.createElementVNode("div",Dm,[t.createVNode(t.unref(V.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),t.createElementVNode("span",Fm,t.toDisplayString(wt(T)),1),t.createVNode(t.unref(V.QSpace)),t.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.session,onClick:Q=>xl(T)},null,8,["label","onClick"]),t.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.slot,onClick:Q=>El(T)},null,8,["label","onClick"]),t.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>ge(T)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])]),_:2},1024),t.createVNode(t.unref(V.QCardSection),{class:"q-pt-none"},{default:t.withCtx(()=>{var Q;return[(Q=T.sessions)!=null&&Q.length?(t.openBlock(),t.createElementBlock("div",Om,[t.createElementVNode("div",_m,[t.createVNode(t.unref(V.QIcon),{name:"groups",size:"15px"}),t.createTextVNode(" "+t.toDisplayString(i.value.sessionsTitle),1)]),t.createVNode(t.unref(ho),{list:T.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:J=>wl(J,T,"session")},{item:t.withCtx(({element:J})=>[t.createElementVNode("div",Lm,[t.createVNode(t.unref(V.QIcon),{name:"drag_indicator",class:"drag-handle"}),t.createVNode(I,{"model-value":J.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":q=>J.name=q,onBlur:q=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.startTime=q,onBlur:q=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.endTime=q,onBlur:q=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.renderSlot(p.$slots,"session-row-extra",{element:J,schedule:T},void 0,!0),t.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:q=>Tr(J,"session")},null,8,["onClick"])]),We(J).length?(t.openBlock(),t.createElementBlock("div",Hm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(We(J),q=>(t.openBlock(),t.createElementBlock("div",{key:q.id,class:"list-row nested-row"},[t.createVNode(t.unref(V.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),t.createElementVNode("div",Um,t.toDisplayString(c(q)),1),t.createElementVNode("div",qm,t.toDisplayString(q.startTime)+"–"+t.toDisplayString(q.endTime),1),t.createVNode(t.unref(V.QSpace)),t.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:yn=>mi({kind:"slot",item:q})},null,8,["onClick"])]))),128))])):t.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):t.createCommentVNode("",!0),t.createElementVNode("div",jm,[t.createElementVNode("div",Wm,[t.createVNode(t.unref(V.QIcon),{name:"mic",size:"15px"}),t.createTextVNode(" "+t.toDisplayString(i.value.slotsTitle),1)]),t.createVNode(t.unref(ho),{list:Ht(T),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:J=>wl(J,T,"slot")},{item:t.withCtx(({element:J})=>[t.createElementVNode("div",Gm,[t.createVNode(t.unref(V.QIcon),{name:"drag_indicator",class:"drag-handle"}),t.createVNode(I,{"model-value":J.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":q=>J.name=q,onBlur:q=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.startTime=q,onBlur:q=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.endTime=q,onBlur:q=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(X,{"model-value":J.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:bl(T),"option-value":"id","option-label":"label","onUpdate:modelValue":q=>kl(J,q)},null,8,["model-value","label","options","onUpdate:modelValue"]),t.renderSlot(p.$slots,"slot-row-extra",{element:J,schedule:T},void 0,!0),t.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:q=>Tr(J,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!Ht(T).length&&!Hn(T)?(t.openBlock(),t.createElementBlock("div",Qm,t.toDisplayString(i.value.noSlotsInDay),1)):t.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),t.createElementVNode("div",Ym,t.toDisplayString(i.value.listHint),1)]))],64)):(t.openBlock(),t.createElementBlock("div",sm,[t.createVNode(t.unref(V.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),t.createElementVNode("div",null,t.toDisplayString(i.value.noDays),1),t.createVNode(w,{color:"primary",outline:"",label:i.value.addDay,icon:"event",class:"q-mt-sm",onClick:Lt},null,8,["label"])])),t.createVNode(ue,{modelValue:m.value,"onUpdate:modelValue":g[7]||(g[7]=T=>m.value=T)},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCard),{style:{width:"700px","max-width":"80vw"}},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCardSection),null,{default:t.withCtx(()=>[t.createElementVNode("div",Xm,t.toDisplayString(i.value.addHall),1)]),_:1}),t.createVNode(t.unref(V.QCardSection),null,{default:t.withCtx(()=>[t.createElementVNode("div",Zm,[t.createVNode(I,{modelValue:b.value,"onUpdate:modelValue":g[5]||(g[5]=T=>b.value=T),label:i.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:t.withKeys(Tt,["enter"])},null,8,["modelValue","label"]),t.createVNode(w,{color:"primary",label:i.value.create,icon:"add",dense:"",onClick:Tt},null,8,["label"])]),t.renderSlot(p.$slots,"places-list",{day:ke.value,add:Le},()=>[we.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Jm,t.toDisplayString(i.value.noHalls),1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(we.value,T=>(t.openBlock(),t.createElementBlock("div",{key:T.id,class:"place-row row items-center q-gutter-sm"},[t.createVNode(t.unref(V.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),t.createElementVNode("span",Km,t.toDisplayString(a(T)),1),t.createVNode(w,{size:"sm",color:"primary",outline:"",label:i.value.addHall,icon:"add",dense:"",onClick:Q=>Le(T)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),t.createVNode(t.unref(V.QCardActions),{align:"right"},{default:t.withCtx(()=>[t.createVNode(w,{label:i.value.close,color:"primary",onClick:g[6]||(g[6]=T=>m.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),t.createVNode(ue,{modelValue:C.value,"onUpdate:modelValue":g[14]||(g[14]=T=>C.value=T)},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCard),{style:{width:"640px","max-width":"90vw"}},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCardSection),null,{default:t.withCtx(()=>{var T;return[t.createElementVNode("div",ep,t.toDisplayString(((T=B.value)==null?void 0:T.kind)==="session"?i.value.session:i.value.slot),1)]}),_:1}),B.value?(t.openBlock(),t.createBlock(t.unref(V.QCardSection),{key:0,class:"q-pt-none"},{default:t.withCtx(()=>[t.createVNode(I,{modelValue:B.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=T=>B.value.item.name=T),label:i.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),t.createElementVNode("div",tp,[t.createElementVNode("div",np,[t.createVNode(I,{modelValue:B.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=T=>B.value.item.startTime=T),label:i.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),t.createElementVNode("div",ip,[t.createVNode(I,{modelValue:B.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=T=>B.value.item.endTime=T),label:i.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),B.value.kind==="slot"?(t.openBlock(),t.createBlock(X,{key:0,"model-value":B.value.item.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:hw.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=T=>kl(B.value.item,T))},null,8,["model-value","label","options"])):t.createCommentVNode("",!0),t.renderSlot(p.$slots,"edit-form",{kind:B.value.kind,item:B.value.item,schedule:Cl.value},void 0,!0),B.value.kind==="slot"?(t.openBlock(),t.createBlock(I,{key:1,modelValue:B.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=T=>B.value.item.description=T),label:i.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):t.createCommentVNode("",!0)]),_:3})):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QCardActions),{align:"right"},{default:t.withCtx(()=>[B.value?(t.openBlock(),t.createBlock(w,{key:0,flat:"",color:"negative",label:i.value.delete,onClick:gw},null,8,["label"])):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QSpace)),t.createVNode(w,{flat:"",label:i.value.cancel,color:"primary",onClick:g[13]||(g[13]=T=>C.value=!1)},null,8,["label"]),t.createVNode(w,{label:i.value.save,color:"primary",onClick:pw},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"])])}}}),[["__scopeId","data-v-cfbff9e3"]]),op={class:"schedule-timeline"},rp={key:0,class:"timeline-container"},sp={class:"day-header"},ap={class:"day-title"},lp={class:"timeline"},cp={key:0,class:"schedule-place"},dp={class:"events-column"},up={key:0,class:"event-item session-item"},fp={class:"event-content"},hp={class:"event-time"},mp={class:"event-main"},pp={class:"event-name"},gp={key:0,class:"speakers-list"},yp=["onClick"],wp={class:"speaker-details"},bp={class:"speaker-name"},Sp={class:"bio-text"},Cp=["onClick"],kp={key:0,class:"perfom-divider"},xp={class:"event-content"},Ep={class:"event-time"},Bp={class:"event-main"},$p={class:"event-name"},Np={class:"event-badges"},Mp={key:0,class:"speakers-list"},Ip=["onClick"],Vp={class:"speaker-details"},Tp={class:"speaker-name"},Rp={class:"bio-text"},Pp={key:1,class:"no-program"},xa=v(t.defineComponent({__name:"ScheduleTimeline",props:{days:{},dayTitle:{type:Function,default:void 0},placeName:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotParticipants:{type:Function,default:void 0},sessionParticipants:{type:Function,default:void 0},participantName:{type:Function,default:void 0},participantBio:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},noProgramText:{default:"Программа пока не опубликована"},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0},slotClickable:{type:Boolean,default:!1}},emits:["open-participant","slot-click"],setup(n,{emit:e}){const i=n,o=e,r=t.computed(()=>({noProgram:i.noProgramText||"Программа пока не опубликована"})),s=k=>{if(i.dayTitle)return i.dayTitle(k);const P=new Date(k.date);return isNaN(P.getTime())||P.getFullYear()<2e3?"":P.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=k=>{var P;return i.placeName?i.placeName(k):((P=k.place)==null?void 0:P.name)||k.placeName||""},d=k=>i.slotName?i.slotName(k):(k==null?void 0:k.name)||"",c=k=>i.sessionName?i.sessionName(k):(k==null?void 0:k.name)||"",u=k=>i.slotParticipants?i.slotParticipants(k):(k==null?void 0:k.participants)||[],f=k=>i.sessionParticipants?i.sessionParticipants(k):(k==null?void 0:k.participants)||[],h=k=>{var P,D;return i.participantName?i.participantName(k):(k==null?void 0:k.name)||(k==null?void 0:k.fullName)||((D=(P=k==null?void 0:k.human)==null?void 0:P.getFullName)==null?void 0:D.call(P))||""},m=k=>i.participantBio?i.participantBio(k):(k==null?void 0:k.bio)||(k==null?void 0:k.regalias)||"",b=k=>i.slotListOf?i.slotListOf(k):(k==null?void 0:k.slots)||[],C=k=>i.nestedSlotListOf?i.nestedSlotListOf(k):(k==null?void 0:k.slots)||[],B=k=>k.schedules.filter(P=>{var D;return b(P).length>0||(((D=P.sessions)==null?void 0:D.length)||0)>0}),$=k=>{const P=[],D=new Set((k.sessions||[]).map(K=>K.id));for(const K of k.sessions||[]){P.push({kind:"session",item:K,nested:!1,index:0});for(const fe of C(K))P.push({kind:"slot",item:fe,nested:!0,index:0})}let Z=0;for(const K of b(k).filter(fe=>!fe.sessionId||!D.has(fe.sessionId)))P.push({kind:"slot",item:K,nested:!1,index:Z++});return P},x=t.computed(()=>{var k;return(k=i.days)==null?void 0:k.some(P=>{var D;return(D=P.schedules)==null?void 0:D.some(Z=>{var K;return b(Z).length>0||(((K=Z.sessions)==null?void 0:K.length)||0)>0})})}),M=(k,P)=>`${k} - ${P}`;return(k,P)=>(t.openBlock(),t.createElementBlock("div",op,[x.value?(t.openBlock(),t.createElementBlock("div",rp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.days,D=>(t.openBlock(),t.createElementBlock("div",{key:D.id,class:"day-section"},[t.createElementVNode("div",sp,[t.createElementVNode("div",ap,[t.createVNode(t.unref(V.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),t.createTextVNode(" "+t.toDisplayString(s(D)),1)])]),t.createElementVNode("div",lp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B(D),Z=>(t.openBlock(),t.createElementBlock("div",{key:Z.id,class:"time-slot"},[a(Z)?(t.openBlock(),t.createElementBlock("div",cp,[t.createVNode(t.unref(V.QIcon),{name:"meeting_room",size:"14px"}),t.createTextVNode(" "+t.toDisplayString(a(Z)),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",dp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($(Z),K=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:K.item.id},[K.kind==="session"?(t.openBlock(),t.createElementBlock("div",up,[t.createElementVNode("div",fp,[t.createElementVNode("div",hp,t.toDisplayString(M(K.item.startTime,K.item.endTime)),1),t.createElementVNode("div",mp,[t.createElementVNode("div",pp,t.toDisplayString(c(K.item)),1),f(K.item).length?(t.openBlock(),t.createElementBlock("div",gp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f(K.item),fe=>(t.openBlock(),t.createElementBlock("div",{key:fe.id,class:"speaker-item",onClick:ht=>o("open-participant",fe)},[t.createElementVNode("div",wp,[t.createElementVNode("div",bp,[t.createVNode(t.unref(V.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),t.createTextVNode(" "+t.toDisplayString(h(fe)),1)]),t.createElementVNode("div",Sp,t.toDisplayString(m(fe)),1)])],8,yp))),128))])):t.createCommentVNode("",!0)])])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["event-item",[{"event-active":K.item.active,"nested-item":K.nested},{clickable:i.slotClickable}]]),onClick:fe=>i.slotClickable&&o("slot-click",K.item)},[!K.nested&&K.index>0?(t.openBlock(),t.createElementBlock("div",kp)):t.createCommentVNode("",!0),t.createElementVNode("div",xp,[t.createElementVNode("div",Ep,t.toDisplayString(M(K.item.startTime,K.item.endTime)),1),t.createElementVNode("div",Bp,[t.createElementVNode("div",$p,t.toDisplayString(d(K.item)),1),t.createElementVNode("div",Np,[t.renderSlot(k.$slots,"badges",{item:K.item},void 0,!0)]),u(K.item).length?(t.openBlock(),t.createElementBlock("div",Mp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u(K.item),fe=>(t.openBlock(),t.createElementBlock("div",{key:fe.id,class:"speaker-item",onClick:ht=>o("open-participant",fe)},[t.createElementVNode("div",Vp,[t.createElementVNode("div",Tp,[t.createVNode(t.unref(V.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),t.createTextVNode(" "+t.toDisplayString(h(fe)),1)]),t.createElementVNode("div",Rp,t.toDisplayString(m(fe)),1)])],8,Ip))),128))])):t.createCommentVNode("",!0)])])],10,Cp))],64))),128))])]))),128))])]))),128))])):(t.openBlock(),t.createElementBlock("div",Pp,[t.createVNode(t.unref(V.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),t.createElementVNode("p",null,t.toDisplayString(r.value.noProgram),1)])),t.renderSlot(k.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),vp=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:ka,ScheduleTimeline:xa},Symbol.toStringTag,{value:"Module"})),Ap=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:dn,blockSizeClass:ba,blockStyle:ma,byStart:tr,diffM:si,findEnclosingSession:wa,fromMin:it,gridBounds:ha,hasConflict:ga,intersects:ai,nestedConflict:ya,nestedSlotStyle:pa,normTime:zn,snapMinutes:li,toMin:de},Symbol.toStringTag,{value:"Module"}));let zp=class extends ce{constructor(){super(Yi,"schedule-days")}};const Dp=new zp;let Fp=class extends ce{constructor(){super(An,"schedule-places")}};const Op=new Fp;let _p=class extends ce{constructor(){super(vn,"schedule-sessions")}};const Lp=new _p;let Hp=class extends ce{constructor(){super(zt,"schedule-slots")}};const Up=new Hp;let qp=class extends ce{constructor(){super(ri,"schedule-timetables")}};const jp=new qp,Wp=Object.freeze(Object.defineProperty({__proto__:null,C:om,Components:vp,H:Ap,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Dp,SchedulePlacesStore:Op,ScheduleSessionsStore:Lp,ScheduleSlotsStore:Up,SchedulesStore:jp},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:Sa,defaultScheduleLabels:nr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Gp=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:ii},Symbol.toStringTag,{value:"Module"}));let Qp=class extends ce{constructor(){super(ii,"color-themes")}};const Yp=new Qp,Xp=Object.freeze(Object.defineProperty({__proto__:null,Buildings:Ef,Chats:Rf,Docs:qf,Extracts:Yf,Forms:Sh,Menus:Mh,Pages:Jh,Schedule:Wp,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:Gp,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Yp},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Ea=t.defineComponent({inheritAttrs:!1,__name:"PBadge",props:{label:{type:[String,Number],default:void 0},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},floating:{type:Boolean,default:!1},multiLine:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1}},setup(n){const e=t.useAttrs(),i=t.computed(()=>{const o={};for(const r of Object.keys(e))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(o[r]=e[r]);return o});return(o,r)=>(t.openBlock(),t.createBlock(t.unref(V.QBadge),t.mergeProps(t.unref(i),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,rounded:n.rounded,floating:n.floating,"multi-line":n.multiLine,transparent:n.transparent}),{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),_:3},16,["label","color","text-color","outline","rounded","floating","multi-line","transparent"]))}}),Ke=t.defineComponent({inheritAttrs:!1,__name:"PButton",props:{text:{type:String,default:"",required:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},skin:{type:String,default:"base",required:!1},size:{type:String,default:qt.M,required:!1},type:{type:String,default:me.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const e=n,i=t.useAttrs(),o=t.computed(()=>{const x={};for(const M of Object.keys(i))["disable","color","size","flat","outline","unelevated","type"].includes(M)||(x[M]=i[M]);return x}),r=["submit","button","reset"],s=t.computed(()=>r.includes(e.type)),a=t.computed(()=>s.value?e.type:void 0),d=t.computed(()=>s.value?me.Primary:e.type),c=t.computed(()=>{const x={};return e.margin&&(x.margin=e.margin),e.padding&&(x.padding=e.padding),e.width&&(x.maxWidth=e.width,x.minWidth=e.width),e.height&&(x.minHeight=e.height,x.maxHeight=e.height),e.fontSize&&(x.fontSize=e.fontSize),x}),u={[me.Primary]:"primary",[me.Success]:"positive",[me.Warning]:"warning",[me.Error]:"negative",[me.Info]:"info"},f=t.computed(()=>i.color!==void 0?i.color:u[d.value]??"primary"),h={[qt.XS]:"xs",[qt.S]:"sm",[qt.M]:"md",[qt.L]:"lg",[qt.XL]:"xl"},m=t.computed(()=>i.size!==void 0?i.size:["xs","sm","md","lg","xl"].includes(e.size)?e.size:h[e.size]??"md"),b=t.computed(()=>i.flat!==void 0?i.flat:["text","pag","text_ano"].includes(e.skin)),C=t.computed(()=>i.outline!==void 0?i.outline:e.skin==="invert"),B=t.computed(()=>i.unelevated!==void 0?i.unelevated:e.skin==="base"),$=t.computed(()=>i.disable??e.disabled);return(x,M)=>(t.openBlock(),t.createBlock(t.unref(V.QBtn),t.mergeProps(t.unref(o),{style:t.unref(c),color:t.unref(f),size:t.unref(m),flat:t.unref(b),outline:t.unref(C),unelevated:t.unref(B),disable:t.unref($),type:t.unref(a),"no-wrap":""}),{default:t.withCtx(()=>[t.renderSlot(x.$slots,"default"),t.createTextVNode(" "+t.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),Ba=t.defineComponent({inheritAttrs:!1,__name:"PCheckBox",props:t.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},value:{type:[String,Boolean],default:void 0},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=t.useAttrs(),s=t.computed(()=>{const d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{o("change",i.value)};return(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"p-checkbox",style:t.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[t.createVNode(t.unref(V.QCheckbox),t.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},t.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),$a=t.defineComponent({inheritAttrs:!1,__name:"PChip",props:{label:{type:String,default:""},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},square:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["remove","update:model-value","update:selected"],setup(n,{emit:e}){const i=e,o=t.useAttrs(),r=t.computed(()=>{const s={};for(const a of Object.keys(o))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=o[a]);return s});return(s,a)=>(t.openBlock(),t.createBlock(t.unref(V.QChip),t.mergeProps(t.unref(r),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,square:n.square,dense:n.dense,removable:n.removable,onRemove:a[0]||(a[0]=d=>i("remove"))}),t.createSlots({default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:2},[s.$slots.avatar?{name:"avatar",fn:t.withCtx(()=>[t.renderSlot(s.$slots,"avatar")]),key:"0"}:void 0,s.$slots.remove?{name:"remove",fn:t.withCtx(()=>[t.renderSlot(s.$slots,"remove")]),key:"1"}:void 0]),1040,["label","color","text-color","outline","square","dense","removable"]))}}),Gt=v(t.defineComponent({inheritAttrs:!1,__name:"PInput",props:t.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},width:{type:String,required:!1,default:""},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["blur","input","focus","clear"],["update:modelValue"]),setup(n,{expose:e,emit:i}){const o=i,r=t.useModel(n,"modelValue"),s=t.useAttrs(),a=t.computed(()=>typeof s.id=="string"?s.id:void 0),d=t.computed(()=>{const C={};for(const B of Object.keys(s))B!=="id"&&B!=="disable"&&(C[B]=s[B]);return C}),c=n,u=t.computed(()=>s.disable??c.disabled),f=t.ref(null);function h(){var C;(C=f.value)==null||C.focus()}e({focus:h});const m=()=>{o("input",r.value)},b=t.computed(()=>{const C={};return c.margin&&(C.margin=c.margin),c.padding&&(C.padding=c.padding),c.width&&(C.width=c.width),c.borderColor&&(C["--p-border-color"]=c.borderColor),C});return(C,B)=>(t.openBlock(),t.createBlock(t.unref(V.QInput),t.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":B[0]||(B[0]=$=>r.value=$)},t.unref(d),{for:t.unref(a),label:n.label||void 0,mask:n.mask,disable:t.unref(u),rules:n.rules,"input-style":{color:n.color||void 0},style:t.unref(b),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":m,onBlur:B[1]||(B[1]=$=>C.$emit("blur",r.value)),onFocus:B[2]||(B[2]=$=>C.$emit("focus",r.value)),onClear:B[3]||(B[3]=$=>C.$emit("clear"))}),t.createSlots({before:t.withCtx(()=>[t.renderSlot(C.$slots,"before",{},()=>[t.renderSlot(C.$slots,"default",{},void 0,!0)],!0)]),append:t.withCtx(()=>[t.renderSlot(C.$slots,"append",{},()=>[t.renderSlot(C.$slots,"right",{},void 0,!0)],!0)]),_:2},[C.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(C.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,C.$slots.after?{name:"after",fn:t.withCtx(()=>[t.renderSlot(C.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,C.$slots.label?{name:"label",fn:t.withCtx(()=>[t.renderSlot(C.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,C.$slots.error?{name:"error",fn:t.withCtx(()=>[t.renderSlot(C.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,C.$slots.hint?{name:"hint",fn:t.withCtx(()=>[t.renderSlot(C.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,C.$slots.counter?{name:"counter",fn:t.withCtx(()=>[t.renderSlot(C.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,C.$slots.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(C.$slots,"loading",{},void 0,!0)]),key:"6"}:void 0]),1040,["modelValue","for","label","mask","disable","rules","input-style","style"]))}}),[["__scopeId","data-v-c4acf8be"]]),Zp={class:"row items-center justify-end"},Xi="DD.MM.YYYY",Na=t.defineComponent({__name:"PDateInput",props:t.mergeModels({label:{type:String,required:!0},dense:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:t.mergeModels(["blur"],["update:modelValue"]),setup(n){const e=t.useModel(n,"modelValue"),i=Xi.replace(/[DMY]/g,"#"),o=c=>{if(!c)return"";const u=String(c).match(/^(\d{4})-(\d{2})-(\d{2})/);if(u)return`${u[3]}.${u[2]}.${u[1]}`;const f=new Date(c);return Number.isNaN(f.getTime())?"":V.date.formatDate(f,Xi)},r=c=>{const u=V.date.extractDate(c,Xi);if(Number.isNaN(u.getTime()))return"";const f=u.getFullYear(),h=String(u.getMonth()+1).padStart(2,"0"),m=String(u.getDate()).padStart(2,"0");return`${f}-${h}-${m}`},s=t.ref(o(e.value));t.watch(e,c=>{const u=o(c);u!==s.value&&(s.value=u)});const a=c=>{const u=typeof c=="number"?String(c):c;if(!u){e.value="";return}/^\d{2}\.\d{2}\.\d{4}$/.test(u)&&(e.value=r(u))},d={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(c,u)=>{const f=t.resolveDirective("close-popup");return t.openBlock(),t.createBlock(Gt,{modelValue:t.unref(s),"onUpdate:modelValue":[u[1]||(u[1]=h=>t.isRef(s)?s.value=h:null),a],class:"fit",label:n.label,mask:t.unref(i),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,inputmode:"numeric",onBlur:u[2]||(u[2]=h=>c.$emit("blur"))},{prepend:t.withCtx(()=>[t.createVNode(t.unref(V.QIcon),{name:"event",class:"cursor-pointer"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QDate),{modelValue:t.unref(s),"onUpdate:modelValue":u[0]||(u[0]=h=>t.isRef(s)?s.value=h:null),mask:Xi,"today-btn":"",locale:d},{default:t.withCtx(()=>[t.createElementVNode("div",Zp,[t.withDirectives(t.createVNode(Ke,{label:"Готово",color:"primary",flat:""},null,512),[[f]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:t.withCtx(()=>[t.renderSlot(c.$slots,"append")]),_:3},8,["modelValue","label","mask","dense","outlined","clearable","disable","readonly"])}}}),Jp=t.defineComponent({inheritAttrs:!1,__name:"PDatePicker",props:t.mergeModels({text:{type:String,default:"",required:!1},label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:t.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:e}){const i=e,o=t.useModel(n,"modelValue"),r=t.useAttrs(),s=t.computed(()=>typeof r.id=="string"?r.id:void 0),a=n,d=f=>{const h=f==null||f===""?null:new Date(String(f));h?(o.value=h,i("input",c(o.value))):(o.value=null,i("input",null))},c=f=>f?new Date(f.getTime()-f.getTimezoneOffset()*60*1e3).toISOString().split("T")[0]:"",u=t.computed(()=>{const f={};return a.margin&&(f.margin=a.margin),a.padding&&(f.padding=a.padding),f});return(f,h)=>(t.openBlock(),t.createBlock(t.unref(V.QInput),{for:t.unref(s),max:"2100",min:"1900","model-value":c(o.value),label:n.label||void 0,class:"p-datepicker",type:"date",name:n.label,style:t.normalizeStyle(t.unref(u)),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":d},{before:t.withCtx(()=>[t.renderSlot(f.$slots,"default")]),append:t.withCtx(()=>[t.renderSlot(f.$slots,"right")]),_:3},8,["for","model-value","label","name","style"]))}}),Zi=t.defineComponent({inheritAttrs:!1,__name:"PDialog",props:t.mergeModels({persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),i=t.useAttrs(),o=t.computed(()=>{const r={};for(const s of Object.keys(i))["persistent","maximized","transition-show","transition-hide"].includes(s)||(r[s]=i[s]);return r});return(r,s)=>(t.openBlock(),t.createBlock(t.unref(V.QDialog),t.mergeProps({modelValue:e.value,"onUpdate:modelValue":s[0]||(s[0]=a=>e.value=a)},t.unref(o),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide}),t.createSlots({default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:2},[r.$slots.title?{name:"title",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"title")]),key:"0"}:void 0,r.$slots.header?{name:"header",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"header")]),key:"1"}:void 0,r.$slots.body?{name:"body",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"body")]),key:"2"}:void 0,r.$slots.footer?{name:"footer",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),Kp=v(t.defineComponent({inheritAttrs:!1,__name:"PFlex",props:{margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},minWidth:{type:String,default:"",required:!1},maxWidth:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},justifyContent:{type:String,default:"",required:!1},background:{type:String,default:"",required:!1},alignItems:{type:String,default:"",required:!1}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"flex-line flex",style:t.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,height:n.height,justifyContent:n.justifyContent,background:n.background,alignItems:n.alignItems})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-71357bc9"]]),eg=["innerHTML"],tg={key:1},ir=v(t.defineComponent({__name:"PString",props:{string:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},fontSize:{type:String,required:!1,default:""},fontWeight:{type:String,required:!1,default:""},background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},justifyContent:{type:String,required:!1,default:"center"},isHtml:{type:Boolean,required:!1,default:!1}},emits:["click"],setup(n){const e=n,i={color:e.color||void 0,fontSize:e.fontSize||void 0,fontWeight:e.fontWeight||void 0,background:e.background||void 0,padding:e.padding||void 0,width:e.width||void 0,maxWidth:e.width||void 0,minWidth:e.minWidth||void 0,margin:e.margin||void 0,justifyContent:e.justifyContent||void 0};return(o,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["string",n.customClass]),style:i,onClick:r[0]||(r[0]=s=>o.$emit("click"))},[t.createVNode(t.unref(V.QItemLabel),null,{default:t.withCtx(()=>[n.isHtml?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:n.string},null,8,eg)):(t.openBlock(),t.createElementBlock("span",tg,t.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),ci=v(t.defineComponent({inheritAttrs:!1,__name:"PTooltip",props:{tooltipText:{type:String,default:void 0,required:!1},timeout:{type:Number,default:0,required:!1},typeStyle:{type:String,default:"primary",required:!1},height:{type:String,default:"16px",required:!1},relPosition:{type:String,default:"right",required:!1},level:{type:String,default:"top",required:!1}},setup(n){const e=n,i=t.useAttrs(),o=t.computed(()=>{const c={};for(const u of Object.keys(i))u!=="delay"&&(c[u]=i[u]);return c}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=t.computed(()=>{const c=e.relPosition==="left"?"right":"left";return`${e.level==="top"?"top":"bottom"} ${c}`}),a=t.computed(()=>{const c=e.relPosition==="left"?"right":"left";return`${e.level==="top"?"bottom":"top"} ${c}`}),d=t.computed(()=>({background:r[e.typeStyle],whiteSpace:"pre",height:e.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(c,u)=>n.tooltipText?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0},t.unref(o),{class:"tooltip-wrapper"}),[t.renderSlot(c.$slots,"default",{},void 0,!0),t.createVNode(t.unref(V.QTooltip),{delay:n.timeout,anchor:t.unref(s),self:t.unref(a),class:"tooltip-box",style:t.normalizeStyle(t.unref(d))},{default:t.withCtx(()=>[t.createVNode(ir,{string:n.tooltipText,padding:"0 3px",height:n.height},null,8,["string","height"])]),_:1},8,["delay","anchor","self","style"])],16)):(t.openBlock(),t.createBlock(t.unref(V.QTooltip),t.mergeProps({key:1},t.unref(o),{delay:n.timeout,class:"tooltip-box"}),{default:t.withCtx(()=>[t.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),ng={class:"p-hint-popup"},or=v(t.defineComponent({__name:"PHint",props:{text:{}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[n.text?(t.openBlock(),t.createBlock(t.unref(V.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:o[0]||(o[0]=t.withModifiers(r=>e.value=!0,["stop"]))},{default:t.withCtx(()=>[t.createVNode(ci,{anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"320px"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.text),1)]),_:1})]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QMenu),{modelValue:t.unref(e),"onUpdate:modelValue":o[1]||(o[1]=r=>t.isRef(e)?e.value=r:null),anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"340px"},{default:t.withCtx(()=>[t.createElementVNode("div",ng,t.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),ig=t.defineComponent({__name:"PInputDate",props:t.mergeModels({placeholder:{type:String,default:"Укажите дату"},width:{type:String,required:!1,default:"auto"},margin:{type:String,required:!1,default:""},label:{type:String,default:"",required:!1}},{modelValue:{default:new Date},modelModifiers:{}}),emits:t.mergeModels(["update:modelValue","change","beforeChange"],["update:modelValue"]),setup(n,{emit:e}){const i=e,o=t.useModel(n,"modelValue"),r=Et.Format(o.value),s=t.ref(r),a=c=>{if(!d(c))return;const u=Et.FromRuStr(c);o.value=u,i("beforeChange",u),i("change",u)},d=c=>c.length!=10?(s.value=r,Ct.Error("Неверный формат даты"),!1):Number(s.value.slice(0,2))>31?(s.value=r,Ct.Error("Неверный день месяца"),!1):Number(s.value.slice(3,5))>12?(s.value=r,Ct.Error("Неверный месяц"),!1):Number(s.value.slice(6,10))>2100?(s.value=r,Ct.Error("Неверный год"),!1):!0;return(c,u)=>{const f=t.resolveComponent("PInput");return t.openBlock(),t.createElementBlock("div",{class:"style-container",style:t.normalizeStyle({width:n.width,position:"relative"})},[t.createVNode(f,{modelValue:t.unref(s),"onUpdate:modelValue":u[0]||(u[0]=h=>t.isRef(s)?s.value=h:null),mask:"##.##.####",placeholder:n.placeholder,margin:n.margin,label:n.label,onBlur:a,onKeydown:t.withKeys(t.withModifiers(h=>{},["prevent"]),["enter"])},null,8,["modelValue","placeholder","margin","label","onKeydown"])],4)}}}),og=v(t.defineComponent({__name:"IconMinus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[t.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),rg=v(t.defineComponent({__name:"IconPlus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[t.createElementVNode("path",{d:"M11.3263 19.8672V13.8881H5.33984V11.8951H11.3263V5.91602H13.3217V11.8951H19.3081V13.8881H13.3217V19.8672H11.3263Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-1f1f064c"]]),sg=t.defineComponent({inheritAttrs:!1,__name:"PInputNumber",props:t.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},disabled:{type:Boolean,required:!1,default:!1},max:{type:Number,default:Number.MAX_VALUE,required:!1},min:{type:Number,default:Number.NEGATIVE_INFINITY,required:!1},step:{type:Number,default:1,required:!1}},{modelValue:{default:0},modelModifiers:{}}),emits:t.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:e}){const i=e,o=t.useAttrs(),r=t.computed(()=>typeof o.id=="string"?o.id:void 0),s=t.computed(()=>{const D={};for(const Z of Object.keys(o))Z!=="id"&&(D[Z]=o[Z]);return D}),a=n,d=()=>{const D=a.step.toString();return D.includes(".")?D.split(".")[1].length:0},c=d(),u=t.useModel(n,"modelValue"),h=(D=>Math.min(Math.max(D,a.min),a.max))(u.value);h!==u.value&&(u.value=h);const m=t.ref(h.toFixed(d())),b=t.computed(()=>{const D={};return a.margin&&(D.margin=a.margin),a.padding&&(D.padding=a.padding),D}),C=D=>{const Z=Math.pow(10,c);return Math.round(D*Z)/Z},B=(D,...Z)=>{u.value=C(D),m.value=C(D).toFixed(d()),Z.forEach(K=>i(K,u.value))},$=(D,...Z)=>{a.disabled||D>a.max||D<a.min||B(D,...Z)},x=()=>$(+m.value+a.step,"change"),M=()=>$(+m.value-a.step,"change"),k=D=>$(Number(D),"input"),P=()=>$(+m.value,"change","blur");return(D,Z)=>(t.openBlock(),t.createBlock(t.unref(V.QInput),t.mergeProps(t.unref(s),{for:t.unref(r),"model-value":t.unref(m),label:n.label||void 0,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:t.unref(b),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":k,onBlur:P}),{before:t.withCtx(()=>[t.createVNode(t.unref(V.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:M},{default:t.withCtx(()=>[t.createVNode(og)]),_:1})]),append:t.withCtx(()=>[t.createVNode(t.unref(V.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:x},{default:t.withCtx(()=>[t.createVNode(rg)]),_:1})]),_:1},16,["for","model-value","label","disable","input-style","style"]))}}),ag=v(sg,[["__scopeId","data-v-6f4093e8"]]),lg=v(t.defineComponent({__name:"PLeftSlider",props:{open:{type:Boolean,default:!1},shadow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},shift:{type:Boolean,default:!0},height:{type:String,required:!1,default:"100%"},widthClosed:{type:String,required:!1,default:"30px"},widthOpened:{type:String,required:!1,default:"300px"},titleOpen:{type:String,required:!1,default:"Скрыть меню"},titleClose:{type:String,required:!1,default:"Показать меню"},background:{type:String,required:!1,default:"inherit"}},emits:["open"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.open);t.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>{const c=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock(t.Fragment,null,[n.shift?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle({minWidth:n.widthClosed,maxWidth:n.widthClosed,height:n.height})},null,4)),t.createElementVNode("div",{class:"LS-body",style:t.normalizeStyle({marginLeft:t.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute",background:n.background,height:n.height})},[t.createElementVNode("div",{class:"LS-content",style:t.normalizeStyle({width:`calc(100% - ${n.widthClosed})`,height:n.height,background:"#ffffff"})},[t.renderSlot(a.$slots,"default",{},void 0,!0)],4),t.createVNode(t.unref(V.QBtn),{class:"click-line",flat:"","no-caps":"",style:t.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:d[0]||(d[0]=u=>s(!t.unref(r)))},{default:t.withCtx(()=>[t.unref(r)?(t.openBlock(),t.createBlock(c,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):t.createCommentVNode("",!0),t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),cg=t.defineComponent({__name:"PList",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"300px"}},setup(n){return(e,i)=>(t.openBlock(),t.createBlock(t.unref(V.QList),{tag:"ul",style:t.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["style"]))}}),dg=t.defineComponent({__name:"PListItem",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},showDivider:{type:Boolean,required:!1,default:!1},background:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createBlock(t.unref(V.QItem),{tag:"li",style:t.normalizeStyle({margin:n.margin,padding:n.padding,borderBottom:n.showDivider?"1px solid":"none",background:n.background})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["style"]))}}),ug={class:"tags-selector"},fg={key:0,class:"empty-state"},Ma=v(t.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:e}){const i=n,o=t.ref(""),r=i.store.Options,s=t.computed(()=>r.filter(c=>R.H.Strings.SearchIn(c.label,o.value))),a=e;t.onBeforeMount(async()=>{await i.store.GetOptions()});const d=async c=>{await i.store.Get(c.value),a("select",i.store.Item)};return(c,u)=>{const f=t.resolveDirective("ripple");return t.openBlock(),t.createElementBlock("div",ug,[t.createVNode(Gt,{modelValue:t.unref(o),"onUpdate:modelValue":u[0]||(u[0]=h=>t.isRef(o)?o.value=h:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),t.createVNode(t.unref(V.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QList),{dense:""},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),h=>t.withDirectives((t.openBlock(),t.createBlock(t.unref(V.QItem),{key:h.value,clickable:"",class:"tag-item",onClick:m=>d(h)},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QItemSection),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[f]])),128)),t.unref(s).length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",fg,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),Ji=t.defineComponent({inheritAttrs:!1,__name:"PSelect",props:t.mergeModels({label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},value:{type:String,default:"",required:!1},readonly:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},clearable:{type:Boolean,required:!1,default:!0},width:{type:String,required:!1,default:""},borderColor:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},inPadding:{type:String,required:!1,default:""},options:{type:Array,required:!1,default:()=>[]}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=t.useAttrs(),s=t.computed(()=>typeof r.id=="string"?r.id:void 0),a=t.computed(()=>{const m={};for(const b of Object.keys(r))b!=="id"&&b!=="disable"&&(m[b]=r[b]);return m}),d=n,c=t.computed(()=>r.disable??d.disabled),u=m=>{o("change",m)},f=()=>{o("clear",void 0)},h=t.computed(()=>{const m={};return d.margin&&(m.margin=d.margin),d.padding&&(m.padding=d.padding),d.width&&(m.width=d.width),d.inPadding&&(m.padding=d.inPadding),m});return(m,b)=>(t.openBlock(),t.createBlock(t.unref(V.QSelect),t.mergeProps({modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=C=>i.value=C)},t.unref(a),{for:t.unref(s),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,disable:t.unref(c),readonly:n.readonly,"input-style":{color:n.color||void 0},style:t.unref(h),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u,onClear:f}),t.createSlots({before:t.withCtx(()=>[t.renderSlot(m.$slots,"before",{},()=>[t.renderSlot(m.$slots,"left")])]),append:t.withCtx(()=>[t.renderSlot(m.$slots,"append",{},()=>[t.renderSlot(m.$slots,"right")])]),_:2},[m.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"prepend")]),key:"0"}:void 0,m.$slots.after?{name:"after",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"after")]),key:"1"}:void 0,m.$slots.default?{name:"default",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"default")]),key:"2"}:void 0,m.$slots.label?{name:"label",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"label")]),key:"3"}:void 0,m.$slots.error?{name:"error",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"error")]),key:"4"}:void 0,m.$slots.hint?{name:"hint",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"hint")]),key:"5"}:void 0,m.$slots.counter?{name:"counter",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"counter")]),key:"6"}:void 0,m.$slots.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"loading")]),key:"7"}:void 0,m.$slots.selected?{name:"selected",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"selected")]),key:"8"}:void 0,m.$slots.option?{name:"option",fn:t.withCtx(C=>[t.renderSlot(m.$slots,"option",t.normalizeProps(t.guardReactiveProps(C)))]),key:"9"}:void 0,m.$slots["no-option"]?{name:"no-option",fn:t.withCtx(C=>[t.renderSlot(m.$slots,"no-option",t.normalizeProps(t.guardReactiveProps(C)))]),key:"10"}:void 0,m.$slots["before-options"]?{name:"before-options",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"before-options")]),key:"11"}:void 0,m.$slots["after-options"]?{name:"after-options",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"after-options")]),key:"12"}:void 0,m.$slots["selected-item"]?{name:"selected-item",fn:t.withCtx(C=>[t.renderSlot(m.$slots,"selected-item",t.normalizeProps(t.guardReactiveProps(C)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","disable","readonly","input-style","style"]))}}),Ia=t.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var d;const e=n,i=((d=e.storeOpts)==null?void 0:d.Options)??[],o=t.ref(i);async function r(c,u,f,h){var B,$;const b="set"+(((B=u[0])==null?void 0:B.toUpperCase())+u.slice(1)),C=c[b];typeof C=="function"?C(f):(c[u]=f,c[u+"Id"]=f==null?void 0:f.id),await(($=h==null?void 0:h.Update)==null?void 0:$.call(h,c))}const s=(c,u)=>{if(c===""){u(()=>{o.value=i});return}u(()=>{o.value=i.filter(f=>R.H.Strings.SearchInFields(c,[f.label]))})},a=async c=>{c?(await e.storeOpts.Get(c.value),await r(e.item,e.prop,e.storeOpts.Item,e.store)):await r(e.item,e.prop,void 0,e.store)};return t.onBeforeMount(async()=>{i.length>0||await e.storeOpts.GetOptions(e.optLabel,e.optValue)}),(c,u)=>(t.openBlock(),t.createBlock(Ji,{"use-input":"",options:t.unref(o),"model-value":n.item[n.prop+"Id"],label:n.label,disable:n.disabled,"map-options":"",clearable:"",dense:"",outlined:"","hide-bottom-space":"","onUpdate:modelValue":a,onFilter:s},{append:t.withCtx(()=>[t.createVNode(or,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),hg=t.defineComponent({__name:"PRadio",props:t.mergeModels({label:{type:String,default:""},name:{type:String,default:"group"},fontSize:{type:String,default:""},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:"auto"},value:{type:[String,Boolean],default:void 0}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=n,s=()=>{o("change",r.value)};return(a,d)=>(t.openBlock(),t.createElementBlock("div",{class:"p-radio",style:t.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[t.createVNode(t.unref(V.QRadio),{modelValue:i.value,"onUpdate:modelValue":[d[0]||(d[0]=c=>i.value=c),s],val:n.value,name:n.name,label:n.label||void 0,size:n.size,style:t.normalizeStyle({fontSize:n.fontSize})},null,8,["modelValue","val","name","label","size","style"])],4))}}),mg=v(t.defineComponent({__name:"PRightSlider",props:{open:{type:Boolean,default:!1},shadow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},shift:{type:Boolean,default:!0},height:{type:String,required:!1,default:"100%"},widthClosed:{type:String,required:!1,default:"30px"},widthOpened:{type:String,required:!1,default:"300px"},titleOpen:{type:String,required:!1,default:"Скрыть"},titleClose:{type:String,required:!1,default:"Показать"},background:{type:String,required:!1,default:"inherit"}},emits:["open"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.open);t.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>{const c=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock("div",{class:"wrapper",style:t.normalizeStyle({maxHeight:n.height,height:n.height})},[t.createElementVNode("div",{class:"content",style:t.normalizeStyle({paddingRight:n.shift?"0":`${n.widthClosed}`})},[t.renderSlot(a.$slots,"content",{},void 0,!0)],4),t.createElementVNode("div",{class:"RS-body",style:t.normalizeStyle({marginRight:t.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"-5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute"})},[t.createVNode(t.unref(V.QBtn),{class:"click-line",flat:"","no-caps":"",style:t.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:d[0]||(d[0]=u=>s(!t.unref(r)))},{default:t.withCtx(()=>[t.unref(r)?(t.openBlock(),t.createBlock(c,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):t.createCommentVNode("",!0),t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"]),t.createElementVNode("div",{class:"RS-content",style:t.normalizeStyle({width:`calc(${n.widthOpened} - ${n.widthClosed} - 2px)`,background:n.background,height:n.height})},[t.renderSlot(a.$slots,"default",{},void 0,!0)],4)],4)],4)}}}),[["__scopeId","data-v-8ab50ea6"]]),pg=v(t.defineComponent({__name:"PSticky",props:{shadow:{type:Boolean,default:!1},zIndex:{type:Number,default:0},background:{type:String,default:"inherit"},padding:{type:String,default:"0"},top:{type:String,default:"0"},divider:{type:Boolean,default:!1},dividerColor:{type:String,default:"rgba(0, 0, 0, 0.12)"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"sticky-block",style:t.normalizeStyle({zIndex:1+n.zIndex,top:n.top,background:n.background,padding:n.padding,boxShadow:n.shadow?"0 0 5px 2px rgba(0,0,0,0.3)":"none",borderBottom:n.divider?"1px solid":"none",borderColor:n.dividerColor})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4748d546"]]),gg=t.defineComponent({__name:"PTable",props:{margin:{type:String,required:!1,default:"0 0 20px 0"},width:{type:String,required:!1,default:"100%"},fontSize:{type:String,required:!1,default:"var(--font-size-default)"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("table",t.mergeProps(e.$attrs,{style:{width:n.width,margin:n.margin},class:"p-table"}),[t.createElementVNode("thead",null,[t.renderSlot(e.$slots,"thead")]),t.createElementVNode("tbody",null,[t.renderSlot(e.$slots,"tbody")])],16))}}),Va=v(t.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const e=n,i=t.computed(()=>e.row[e.prop]),o=async()=>{e.row[e.prop]=!e.row[e.prop],await e.store.Update(e.row)};return(r,s)=>(t.openBlock(),t.createBlock(t.unref(V.QTd),{key:n.prop},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["toggle-cell",{clickable:!e.readonly}]),onClick:s[0]||(s[0]=a=>e.readonly?void 0:o())},[t.createVNode(t.unref(V.QIcon),{name:t.unref(i)?"check_circle":"radio_button_unchecked",color:t.unref(i)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),t.createVNode(ci,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),yg=v(t.defineComponent({inheritAttrs:!1,__name:"PTextarea",props:t.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:"0"},padding:{type:String,default:"0",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},resize:{type:String,default:"vertical",required:!1}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const e=t.useModel(n,"modelValue"),i=t.useAttrs(),o=t.computed(()=>typeof i.id=="string"?i.id:void 0),r=t.computed(()=>{const c={};for(const u of Object.keys(i))u!=="id"&&(c[u]=i[u]);return c}),s=n,a=t.computed(()=>({color:s.color||void 0,resize:s.resize})),d=t.computed(()=>{const c={};return s.margin&&(c.margin=s.margin),s.padding&&(c.padding=s.padding),s.borderColor&&(c["--p-border-color"]=s.borderColor),c});return(c,u)=>(t.openBlock(),t.createBlock(t.unref(V.QInput),t.mergeProps({modelValue:e.value,"onUpdate:modelValue":u[0]||(u[0]=f=>e.value=f)},t.unref(r),{for:t.unref(o),label:n.label||void 0,mask:n.mask,type:"textarea","input-style":t.unref(a),style:t.unref(d),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>c.$emit("input",e.value)),onBlur:u[2]||(u[2]=f=>c.$emit("blur",e.value)),onFocus:u[3]||(u[3]=f=>c.$emit("focus",e.value))}),{before:t.withCtx(()=>[t.renderSlot(c.$slots,"default",{},void 0,!0)]),append:t.withCtx(()=>[t.renderSlot(c.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","input-style","style"]))}}),[["__scopeId","data-v-8e01fef2"]]),Ta=t.defineComponent({inheritAttrs:!1,__name:"PToggle",props:t.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},size:{type:String,default:"md"},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=t.useAttrs(),s=t.computed(()=>{const d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{o("change",i.value)};return(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"p-toggle",style:t.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[t.createVNode(t.unref(V.QToggle),t.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},t.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),wg={class:"top-slider-content"},bg={class:"center"},Sg=v(t.defineComponent({__name:"PTopSlider",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},open:{type:Boolean,default:!1}},emits:["open"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.open);t.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=t.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[1]=t.withModifiers(()=>{},["stop"]))]})),t.createElementVNode("div",{class:"top-slider",style:t.normalizeStyle({marginTop:t.unref(r)?"0":`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`,height:n.sliderOnHeight}),onClick:d[3]||(d[3]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",wg,[t.createElementVNode("div",bg,[t.renderSlot(a.$slots,"default",{},void 0,!0)])]),t.createVNode(t.unref(V.QBtn),{class:"click-line",flat:"","no-caps":"",style:t.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:d[2]||(d[2]=c=>s(!t.unref(r)))},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"title",{},void 0,!0)]),_:3},8,["style"])],4)],64))}}),[["__scopeId","data-v-88b1978e"]]);function Cg(n){n.component("PButton",Ke),n.component("PBadge",Ea),n.component("PCheckBox",Ba),n.component("PChip",$a),n.component("PDateInput",Na),n.component("PDatePicker",Jp),n.component("PDialog",Zi),n.component("PFlex",Kp),n.component("PHint",or),n.component("PInput",Gt),n.component("PInputDate",ig),n.component("PInputNumber",ag),n.component("PLeftSlider",lg),n.component("PList",cg),n.component("PListItem",dg),n.component("POptionsListSingle",Ma),n.component("POpts",Ia),n.component("PRadio",hg),n.component("PRightSlider",mg),n.component("PSelect",Ji),n.component("PSticky",pg),n.component("PString",ir),n.component("PTextarea",yg),n.component("PTopSlider",Sg),n.component("PTable",gg),n.component("PTableToggle",Va),n.component("PToggle",Ta),n.component("PTooltip",ci)}const kg={key:0,class:"mainblock"},xg={class:"mainblock-right"},Eg={class:"body"},Bg=v(t.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(n){const e=n,i=t.ref(!1),o=t.ref(!0),r=t.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return t.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),i.value=!0}),(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(a.$slots,"main",{},void 0,!0),t.unref(i)?(t.openBlock(),t.createElementBlock("div",kg,[t.createElementVNode("div",{class:"mainblock-left",style:t.normalizeStyle({minWidth:t.unref(r)?"100%":n.menuWidth,maxWidth:t.unref(r)?"100%":n.menuWidth,marginLeft:t.unref(r)?"-110%":"0",position:t.unref(r)?"fixed":"relative",top:t.unref(r)?"140px":""})},[t.createElementVNode("div",{class:"left-menu",style:t.normalizeStyle({minWidth:t.unref(r)?"auto":n.menuWidth,boxShadow:t.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!t.unref(o)&&t.unref(r)?"110%":"0",borderTopLeftRadius:t.unref(r)?"0":"",borderBottomLeftRadius:t.unref(r)?"0":""}),onClick:d[0]||(d[0]=c=>s())},[t.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),t.createElementVNode("div",xg,[a.$slots.title?(t.openBlock(),t.createElementBlock("div",{key:0,class:"title",style:t.normalizeStyle({display:a.$slots.title?"flex":"none"})},[t.createElementVNode("div",{class:"icon",style:t.normalizeStyle({display:t.unref(r)?"flex":"none"}),onClick:d[1]||(d[1]=c=>s())},[t.renderSlot(a.$slots,"icon",{},void 0,!0)],4),t.renderSlot(a.$slots,"title",{},void 0,!0)],4)):t.createCommentVNode("",!0),t.createElementVNode("div",Eg,[t.renderSlot(a.$slots,"body",{},void 0,!0)])])])):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),$g={class:"mainblock-right"},Ng={class:"body"},Mg=v(t.defineComponent({__name:"AdaptiveContainerHorizontal",props:{menuWidth:{type:String,required:!1,default:"0px"},leftWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"},titleSticky:{type:Boolean,required:!1,default:!1}},setup(n){const e=n,i=t.ref(!1),o=t.ref(!0),r=t.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return t.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),i.value=!0}),(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(a.$slots,"main",{},void 0,!0),t.unref(i)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mainblock",style:t.normalizeStyle({display:t.unref(r)?"block":"flex"})},[t.createElementVNode("div",{class:"mainblock-left",style:t.normalizeStyle({minWidth:t.unref(r)?"100%":n.menuWidth,display:n.leftWidth!=="0px"?"flex":"none",top:t.unref(r)?"58px":"80px"})},[t.createElementVNode("div",{class:"left-menu",style:t.normalizeStyle({minWidth:t.unref(r)?"100%":n.menuWidth,boxShadow:t.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!t.unref(o)&&t.unref(r),"0"),overflowX:t.unref(r)?"scroll":"hidden",display:t.unref(r)?"flex":"block",background:t.unref(r)?"#ffffff":"",overflowY:t.unref(r)?"hidden":"auto"}),onClick:d[0]||(d[0]=c=>s())},[t.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),t.createElementVNode("div",$g,[t.createElementVNode("div",{class:"title",style:t.normalizeStyle({position:n.titleSticky?"sticky":"relative",top:n.titleSticky?t.unref(r)?"108px":"58px":"0",zIndex:n.titleSticky?"10":""})},[t.createElementVNode("div",{class:"icon",style:t.normalizeStyle({display:t.unref(r)?"flex":"none"}),onClick:d[1]||(d[1]=c=>s())},[t.renderSlot(a.$slots,"icon",{},void 0,!0)],4),t.renderSlot(a.$slots,"title",{},void 0,!0)],4),t.createElementVNode("div",Ng,[t.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),Ra=v(t.defineComponent({__name:"GridContainer",props:{maxWidth:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"100%"},background:{type:String,required:!1,default:"inherit"},gridGap:{type:String,required:!1,default:"10px"},gridTemplateColumns:{type:String,required:!1,default:"repeat(auto-fit, minmax(250px, 1fr))"},gridTemplateRows:{type:String,required:!1,default:"repeat(0 0px)"},margin:{type:String,required:!1,default:"10px 0 0 0"},customClass:{type:String,required:!1,default:""}},setup(n){return t.useCssVars(e=>({d143e9f0:n.maxWidth,b9d56180:n.width,v52bd0ff4:n.background,v1795aeac:n.gridGap,v0cfa7c52:n.gridTemplateColumns,v0c6d2a1f:n.gridTemplateRows,a3ccd918:n.margin})),(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid-block",n.customClass])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]),Ig={class:"container"},Vg={class:"slide-box"},Tg={class:"image"},Rg={class:"image-box"},Pg=["id","src","alt"],vg={class:"link-number"},Ag=["id","onClick"],zg=v(t.defineComponent({__name:"CarouselImages",props:{events:{type:Array,required:!0},quantity:{type:Number,default:1,required:!1},animationTime:{type:Number,default:500},height:{type:String,default:"360px"},maxHeight:{type:String,default:"360px"},startActiveGroupIndex:{type:Number,default:0}},emits:["openModalWindow"],setup(n){t.useCssVars(b=>({v582c9d05:i}));const e=n,i=`${e.animationTime}ms`,o=t.ref(e.startActiveGroupIndex),r=t.ref(Bt.None),s=t.ref(zs(e.events,e.quantity)),a=t.computed(()=>s.value[o.value]);t.onMounted(()=>{});const d=()=>o.value=o.value+1<s.value.length?o.value+1:0,c=()=>o.value=o.value-1<0?s.value.length-1:o.value-1,u=b=>{r.value=b,setTimeout(()=>r.value=Bt.None,e.animationTime)},f=b=>{b!=o.value&&(u(b<o.value?Bt.Prev:Bt.Next),setTimeout(()=>o.value=b,e.animationTime/2))},h=()=>{u(Bt.Next),setTimeout(d,e.animationTime/2)},m=()=>{u(Bt.Prev),setTimeout(c,e.animationTime/2)};return(b,C)=>(t.openBlock(),t.createElementBlock("div",{class:"field",style:t.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[t.createElementVNode("div",Ig,[(t.openBlock(),t.createElementBlock("svg",{class:"icon-arrow",onClick:C[0]||(C[0]=t.withModifiers(B=>m(),["stop"]))},[...C[3]||(C[3]=[t.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),t.createElementVNode("div",Vg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a),(B,$)=>(t.openBlock(),t.createElementBlock("div",{key:$,class:t.normalizeClass({animationnext:t.unref(r)===t.unref(Bt).Next,animationprev:t.unref(r)===t.unref(Bt).Prev})},[t.createElementVNode("div",Tg,[t.createElementVNode("div",Rg,[t.createElementVNode("img",{id:B.fileInfo.getImageUrl(),style:t.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:B.fileInfo.getImageUrl(),alt:B.fileInfo.originalName,onClick:C[1]||(C[1]=x=>b.showImageInFullScreen())},null,12,Pg)])])],2))),128))]),(t.openBlock(),t.createElementBlock("svg",{class:"icon-arrow",onClick:C[2]||(C[2]=t.withModifiers(B=>h(),["stop"]))},[...C[4]||(C[4]=[t.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),t.createElementVNode("div",vg,[t.createVNode(Ra,{"grid-template-columns":"repeat(auto-fit, minmax(26px, 1fr))","grid-gap":"5px",margin:"0"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),(B,$)=>(t.openBlock(),t.createElementBlock("div",{id:$.toString(),key:$,class:"number",style:t.normalizeStyle({background:$.toString()===t.unref(o).toString()?"#9D9D9D":""}),onClick:t.withModifiers(x=>f($),["stop"])},t.toDisplayString($+1),13,Ag))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),Dg=t.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.x),s=t.ref(i.y),a=t.computed(()=>r.value+"px"),d=t.computed(()=>s.value+"px"),c=()=>{o("close")};return(u,f)=>{const h=t.resolveDirective("click-outside");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:"context-window",style:t.normalizeStyle({left:t.unref(a),top:t.unref(d)})},[t.renderSlot(u.$slots,"default")],4)),[[h,c]])}}}),Fg={class:"date-range"},Og=v(t.defineComponent({__name:"DateInputRange",props:{start:{type:Date,default:void 0},end:{type:Date,default:void 0}},emits:["update:start","update:end","setStart","setEnd"],setup(n,{emit:e}){const i=n,o=e;t.watch(()=>[i.start,i.end],()=>{i.start||(r.value=void 0),i.end||(s.value=void 0)});const r=t.ref(i.start),s=t.ref(i.end),a=c=>{r.value=c,!(!i.end||c>i.end)&&(o("update:start",c),o("setStart",c))},d=c=>{s.value=c,!(!i.start||c<i.start)&&(o("update:end",c),o("setEnd",c))};return(c,u)=>{const f=t.resolveComponent("PInputDate");return t.openBlock(),t.createElementBlock("div",Fg,[t.createVNode(f,{"model-value":t.unref(r),"onUpdate:modelValue":u[0]||(u[0]=h=>t.isRef(r)?r.value=h:null),onChange:a},null,8,["model-value"]),u[2]||(u[2]=t.createTextVNode(" - ",-1)),t.createVNode(f,{"model-value":t.unref(s),"onUpdate:modelValue":u[1]||(u[1]=h=>t.isRef(s)?s.value=h:null),onChange:d},null,8,["model-value"])])}}}),[["__scopeId","data-v-b93b6d46"]]),_g=t.defineComponent({name:"DateInputRangeV2"}),Lg={class:"date-range"};function Hg(n,e,i,o,r,s){return t.openBlock(),t.createElementBlock("div",Lg,[t.renderSlot(n.$slots,"default",{},void 0,!0)])}const Ug=v(_g,[["render",Hg],["__scopeId","data-v-d28c6f33"]]),qg={class:"drop-item"},jg={key:0,class:"drop-item-list"},Wg=v(t.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const e=n,i=t.ref(e.rolledUp),o=async()=>{i.value=!i.value};return(r,s)=>{const a=t.resolveComponent("PString"),d=t.resolveComponent("IconArrowDrop");return t.openBlock(),t.createElementBlock("div",qg,[t.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=c=>o())},[t.createVNode(a,{"font-size":"13px","font-weight":"600",string:n.name,"justify-content":"left",width:"auto",margin:"0 5px 0 0",padding:"6px 0",color:"inherit"},null,8,["string"]),t.createElementVNode("div",{style:t.normalizeStyle({transform:t.unref(i)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[t.createVNode(d,{size:"10px",margin:"0"})],4)]),t.unref(i)?(t.openBlock(),t.createElementBlock("div",jg,[t.renderSlot(r.$slots,"default",{},void 0,!0)])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),Gg=v(t.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new ko,required:!0}},emits:["load"],setup(n,{emit:e}){const i=n,o=t.ref(!1),r=e,s=()=>{i.model.setBoolean(o.value),o.value?R.F.FTSP.Get().setF(i.model):R.F.FTSP.Get().removeF(i.model),r("load")};return(a,d)=>{const c=t.resolveComponent("PCheckBox");return t.openBlock(),t.createBlock(c,{modelValue:t.unref(o),"onUpdate:modelValue":d[0]||(d[0]=u=>t.isRef(o)?o.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),[["__scopeId","data-v-72984c94"]]),Qg=v(t.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:e}){const i=e,o=t.ref(void 0),r=async a=>{At.Get().replaceF(a,o.value),o.value=a,At.Get().p.drop()},s=async a=>{await r(a),i("load")};return(a,d)=>{const c=t.resolveComponent("PString"),u=t.resolveComponent("PButton"),f=t.resolveComponent("GridContainer"),h=t.resolveComponent("InfoItem");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(c,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),t.createVNode(h,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:t.withCtx(()=>[...d[0]||(d[0]=[])]),default:t.withCtx(()=>[t.createVNode(f,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.models,(m,b)=>(t.openBlock(),t.createBlock(u,{key:b,color:"blue",height:"auto",text:m.label,"is-toggle":m.valueEq(t.unref(o)),"toggle-mode":!0,inverse:n.inverse,onClick:C=>s(m.valueEq(t.unref(o))?void 0:m)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-586481ea"]]),Yg=["value","label"],Xg=v(t.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:e}){const i=e,o=At.Get(),r=t.ref(void 0),s=async d=>{o.replaceF(d,r.value),r.value=d},a=async d=>{d?await s(r.value):await s(void 0),i("load")};return(d,c)=>{const u=t.resolveComponent("PSelect");return t.openBlock(),t.createBlock(u,{modelValue:t.unref(r),"onUpdate:modelValue":c[0]||(c[0]=f=>t.isRef(r)?r.value=f:null),clearable:t.unref(r),placeholder:n.defaultLabel,onChange:a},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.models,(f,h)=>(t.openBlock(),t.createElementBlock("option",{key:h,value:f,label:f.label},null,8,Yg))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-ae66df57"]]),Zg=v(t.defineComponent({__name:"FTSPPanel",setup(n){return t.onBeforeMount(async()=>{}),(e,i)=>(t.openBlock(),t.createElementBlock("div"))}}),[["__scopeId","data-v-e280d85b"]]),Jg=v(t.defineComponent({__name:"GeneralItem",props:{background:{type:String,required:!1,default:"#ffffff"},height:{type:String,required:!1,default:"40px"},width:{type:String,required:!1,default:"auto"},ready:{type:String,required:!1,default:"0%"},padding:{type:String,required:!1,default:"10px"},borderColor:{type:String,required:!1,default:"#343D5C"},margin:{type:String,required:!1,default:"5px"},scale:{type:Boolean,required:!1,default:!0},fontSize:{type:String,required:!1,default:"14px"},withIcon:{type:Boolean,required:!1,default:!1}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock("div",{class:"general-block-item",style:t.normalizeStyle({background:n.background,height:n.height,width:n.width,borderColor:n.borderColor,padding:n.padding,margin:n.margin,transform:n.scale&&t.unref(e)?"scale(1.03, 1.03)":""}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[t.createElementVNode("div",{class:"green",style:t.normalizeStyle({width:`${n.ready}`})},null,4),t.createElementVNode("div",{class:"general-block-item-title",style:t.normalizeStyle({fontSize:n.fontSize})},[t.renderSlot(i.$slots,"general-item",{},void 0,!0)],4),t.createElementVNode("div",{class:"tools-icon",style:t.normalizeStyle({display:n.withIcon?"flex":"none"})},[...o[2]||(o[2]=[t.createElementVNode("svg",{class:"icon-del"},[t.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[t.createElementVNode("path",{d:"M2.91797 8.75C2.6888 8.75 2.49255 8.66833 2.32922 8.505C2.16589 8.34167 2.08436 8.14556 2.08464 7.91667V2.5H1.66797V1.66667H3.7513V1.25H6.2513V1.66667H8.33464V2.5H7.91797V7.91667C7.91797 8.14583 7.8363 8.34208 7.67297 8.50542C7.50964 8.66875 7.31352 8.75028 7.08464 8.75H2.91797ZM7.08464 2.5H2.91797V7.91667H7.08464V2.5ZM3.7513 7.08333H4.58464V3.33333H3.7513V7.08333ZM5.41797 7.08333H6.2513V3.33333H5.41797V7.08333Z"})])],-1))],36))}}),[["__scopeId","data-v-1056443d"]]),Kg={key:0,class:"blur"},e1={style:{display:"flex","justify-content":"center"}},t1=v(t.defineComponent({__name:"InfoItem",props:{background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},openWidth:{type:String,required:!1,default:"auto"},openHeight:{type:String,required:!1,default:"auto"},maxWidth:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},height:{type:String,required:!1,default:""},withOpenWindow:{type:Boolean,required:!1,default:!0},colorSelected:{type:String,required:!1,default:"#1979CF"},borderColor:{type:String,required:!1,default:"#E3E3E3"},withHover:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},close:{type:Boolean,required:!1,default:!0},baseBoxMargin:{type:String,required:!1,default:""},closeWindowOverflow:{type:String,required:!1,default:""},showSaveDialog:{type:Boolean,required:!1,default:!1}},emits:["click","keyup-enter","after-close"],setup(n,{emit:e}){const i=n,o=e,r=i.customClass!==""?i.customClass:"inside-class",s=t.ref(!1),a=t.ref(!1),d=t.ref(!1),c=t.ref(i.close);t.watch(()=>i.close,()=>{a.value=!1});const u=P=>{P.stopPropagation(),P.key==="Escape"&&(i.showSaveDialog?d.value=!0:a.value=!1)};t.watch(a,async()=>{var P,D;await t.nextTick(),a.value?((D=(P=document.getElementById("info-item-opened-content"))==null?void 0:P.querySelector("input"))==null||D.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&o("after-close")});const f=()=>{o("click"),a.value=!!i.withOpenWindow,c.value!==i.close&&(a.value=!1,c.value=!c.value)},h=t.computed(()=>i.customClass===""?{width:i.width,minHeight:"40px",height:"auto",maxWidth:i.maxWidth,minWidth:i.minWidth,margin:i.baseBoxMargin}:void 0),m=t.computed(()=>a.value&&i.withOpenWindow),b=t.computed(()=>({background:i.background?i.background:void 0,zIndex:m.value?"2":"0",padding:m.value?"0":i.padding,margin:i.margin,width:m.value?i.openWidth:i.width,height:m.value?i.openHeight:i.height,minHeight:"40px",maxWidth:i.maxWidth,minWidth:i.minWidth,borderColor:s.value||a.value?i.colorSelected:i.borderColor,color:s.value?i.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${i.colorSelected}`:"none",alignItems:m.value?"end":"center",cursor:(i.withHover,"pointer")})),C=t.computed(()=>({height:m.value?"0":"",overflow:i.closeWindowOverflow,width:i.width})),B=t.computed(()=>({height:m.value?"auto":"0"})),$=t.computed(()=>({color:s.value?i.colorSelected:"#343E5C",fill:s.value?i.colorSelected:"#343E5C",background:i.background})),x=()=>{i.showSaveDialog?d.value=!0:a.value=!1},M=async()=>{await o("keyup-enter"),i.close&&(a.value=!1),d.value=!1},k=()=>{a.value=!1,d.value=!1};return(P,D)=>{const Z=t.resolveComponent("PString"),K=t.resolveComponent("PButton"),fe=t.resolveComponent("PModal"),ht=t.resolveDirective("click-outside");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(a)?(t.openBlock(),t.createElementBlock("div",Kg)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"base-box",style:t.normalizeStyle(t.unref(h)),onClick:D[2]||(D[2]=t.withModifiers(Qe=>f(),["prevent","stop"]))},[t.createElementVNode("div",{class:t.normalizeClass(["body",t.unref(r)]),style:t.normalizeStyle(t.unref(b)),onMouseenter:D[0]||(D[0]=Qe=>n.withHover?s.value=!0:s.value=!1),onMouseleave:D[1]||(D[1]=Qe=>s.value=!1)},[t.unref(a)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["close-window",n.customClass]),style:t.normalizeStyle(t.unref(C))},[t.renderSlot(P.$slots,"default",{},void 0,!0)],6)),t.unref(a)?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:t.normalizeStyle(t.unref(B))},[t.renderSlot(P.$slots,"open-inside-content",{},void 0,!0)],4)),[[ht,x,void 0,{prevent:!0}]]):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"top-title",style:t.normalizeStyle(t.unref($))},[t.renderSlot(P.$slots,"title",{},()=>[t.createVNode(Z,{string:n.title,"font-size":"10px",padding:"0 0 0 3px",style:t.normalizeStyle({color:t.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),t.createVNode(fe,{show:t.unref(d),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:t.withCtx(()=>[t.createElementVNode("div",e1,[t.createVNode(K,{text:"Не сохранять",onClick:k}),t.createVNode(K,{text:"Сохранять",onClick:M})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-e8e8f1a1"]]),n1=v(t.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},title:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(n,{emit:e}){const i=t.ref(!1),o=e,r=s=>{i.value=!i.value,o("select",s)};return(s,a)=>{const d=t.resolveComponent("PString"),c=t.resolveComponent("PButton"),u=t.resolveComponent("InfoItem");return t.openBlock(),t.createBlock(u,{close:t.unref(i),title:n.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.list,f=>(t.openBlock(),t.createBlock(c,{key:f,type:"admin",color:"blue",text:f,onClick:h=>r(f)},null,8,["text","onClick"]))),128)),t.createVNode(c,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:t.withCtx(()=>[t.createVNode(d,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),i1={class:"mainblock"},o1={class:"mainline"},r1=v(t.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",i1,[t.createElementVNode("div",o1,[t.createElementVNode("div",{class:"mainblock-left",style:t.normalizeStyle({minWidth:n.leftWidth,maxWidth:n.leftWidth,background:n.background,display:n.leftWidth!=="0px"?"block":"none"})},[t.renderSlot(e.$slots,"left",{},void 0,!0)],4),t.createElementVNode("div",{class:"mainblock-right",style:t.normalizeStyle({background:n.background})},[t.renderSlot(e.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),Pa=v(t.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[t.createElementVNode("path",{d:"M11 19C12.775 18.9996 14.4988 18.4054 15.897 17.312L20.293 21.708L21.707 20.294L17.311 15.898C18.405 14.4997 18.9996 12.7754 19 11C19 6.589 15.411 3 11 3C6.589 3 3 6.589 3 11C3 15.411 6.589 19 11 19ZM11 5C14.309 5 17 7.691 17 11C17 14.309 14.309 17 11 17C7.691 17 5 14.309 5 11C5 7.691 7.691 5 11 5Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-64e76eb7"]]),s1={class:"search-list"},a1=["onClick"],va=v(t.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]},width:{type:[Number,String],default:""},maxHeightResultList:{type:String,default:"200px"},zIndexResultList:{type:String,default:"10"},boxShadowResultList:{type:String,default:"var(--box-shadow)"}},emits:["select","input"],setup(n,{emit:e}){const i=e,o=n,r=t.ref(o.modelValue),s=t.ref([]);async function a(){i("input",r.value),await d()}async function d(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function c(u){r.value="",i("select",u)}return(u,f)=>(t.openBlock(),t.createElementBlock("div",{class:"container",style:t.normalizeStyle({width:n.width})},[t.createVNode(Gt,{modelValue:t.unref(r),"onUpdate:modelValue":f[0]||(f[0]=h=>t.isRef(r)?r.value=h:null),placeholder:"Найти",onInput:a},{right:t.withCtx(()=>[t.createVNode(Pa,{size:"24px"})]),_:1},8,["modelValue"]),t.unref(r)&&t.unref(r).length>=2?(t.openBlock(),t.createElementBlock("div",{key:0,class:"result",style:t.normalizeStyle({maxHeight:n.maxHeightResultList,zIndex:n.zIndexResultList,boxShadow:n.boxShadowResultList})},[t.createElementVNode("ul",s1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),h=>(t.openBlock(),t.createElementBlock("li",{key:h.value,onClick:m=>c(h)},t.toDisplayString(h.label),9,a1))),128))])],4)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),l1=v(t.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),i=async()=>{};return(o,r)=>{const s=t.resolveComponent("PInput");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(s,{modelValue:e.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>e.value.number=a),onBlur:i},null,8,["modelValue"]),t.createVNode(s,{modelValue:e.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>e.value.description=a),onBlur:i},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-51bf3f08"]]),c1={};function d1(n,e){return t.openBlock(),t.createElementBlock(t.Fragment,null,[e[0]||(e[0]=t.createElementVNode("div",{class:"blur"},null,-1)),e[1]||(e[1]=t.createElementVNode("div",{class:"loader-container"},[t.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const u1=v(c1,[["render",d1],["__scopeId","data-v-0f1f2f84"]]),f1={style:{display:"flex","justify-content":"center",width:"100%"}},h1={class:"pag-number"},m1={class:"pag-ul"},p1={key:2},g1=v(t.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},setup(n){const e=n,i=h=>h?"active":"neutral",o=h=>h?"not-active":"neutral",r=t.ref(Ds),s=t.ref(!1),a=t.ref(!1);r.value.count=e.store.Count.value,t.watch(e.store.Count,()=>{r.value.count=e.store.Count.value});const d=async h=>{if(h!==r.value.curPage&&(h<1&&(h=1),h>r.value.pagesCount()&&(h=r.value.pagesCount()),!e.showConfirm))return await c(h)},c=async(h,m)=>{r.value.setCurPage(h),At.Get().p.offset=(h-1)*r.value.limit,await e.store.FTSP(),f()},u=t.computed(()=>{const h=r.value.pagesCount();return h<8?vt.GenerateNumsRange(2,h-1).filter(m=>m<h&&m>1):vt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(m=>m<h&&m>1)}),f=()=>{const h=document.querySelector(".el-table__body-wrapper"),m=document.querySelector("#list");h?h.scrollTo({top:0}):m&&m.scrollTo({top:0})};return t.onBeforeUnmount(()=>{At.Get().p.drop()}),(h,m)=>{const b=t.resolveComponent("ArrowLeft"),C=t.resolveComponent("PButton"),B=t.resolveComponent("DoubleArrowLeft"),$=t.resolveComponent("EllipsisSvg"),x=t.resolveComponent("DoubleArrowRight"),M=t.resolveComponent("ArrowRight");return t.openBlock(),t.createElementBlock("div",f1,[t.createElementVNode("div",{class:"pag-container",style:t.normalizeStyle({justifyContent:n.justifyContent})},[t.createElementVNode("div",h1,[t.createVNode(C,{skin:"pag",type:o(t.unref(r).curPage===1),onClick:m[0]||(m[0]=k=>d(t.unref(r).curPage-1))},{default:t.withCtx(()=>[t.createVNode(b)]),_:1},8,["type"]),t.createElementVNode("ul",m1,[t.createElementVNode("li",null,[t.createVNode(C,{skin:"pag",type:i(t.unref(r).curPage===1),text:"1",onClick:m[1]||(m[1]=k=>d(1))},null,8,["type"])]),t.unref(r).pagesCount()>8&&t.unref(r).curPage>4?(t.openBlock(),t.createElementBlock("li",{key:0,onMouseenter:m[3]||(m[3]=k=>s.value=!0),onMouseleave:m[4]||(m[4]=k=>s.value=!1)},[t.createVNode(C,{skin:"pag",type:"neutral",onClick:m[2]||(m[2]=k=>d(t.unref(r).curPage-5))},{default:t.withCtx(()=>[t.unref(s)?(t.openBlock(),t.createBlock(B,{key:0})):(t.openBlock(),t.createBlock($,{key:1}))]),_:1})],32)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(u),k=>(t.openBlock(),t.createElementBlock("li",{key:k},[t.createVNode(C,{skin:"pag",type:i(k===t.unref(r).curPage),text:k,onClick:P=>d(k)},null,8,["type","text","onClick"])]))),128)),t.unref(r).pagesCount()>=8&&t.unref(r).curPage<t.unref(r).pagesCount()-3?(t.openBlock(),t.createElementBlock("li",{key:1,onMouseenter:m[6]||(m[6]=k=>a.value=!0),onMouseleave:m[7]||(m[7]=k=>a.value=!1)},[t.createVNode(C,{skin:"pag",type:"neutral",onClick:m[5]||(m[5]=k=>d(t.unref(r).curPage+5))},{default:t.withCtx(()=>[t.unref(a)?(t.openBlock(),t.createBlock(x,{key:0})):(t.openBlock(),t.createBlock($,{key:1}))]),_:1})],32)):t.createCommentVNode("",!0),t.unref(r).pagesCount()>1?(t.openBlock(),t.createElementBlock("li",p1,[t.createVNode(C,{skin:"pag",type:i(t.unref(r).pagesCount()===t.unref(r).curPage),text:t.unref(r).pagesCount(),onClick:m[8]||(m[8]=k=>d(t.unref(r).pagesCount()))},null,8,["type","text"])])):t.createCommentVNode("",!0)]),t.createVNode(C,{skin:"pag",type:o(t.unref(r).curPage===t.unref(r).pagesCount()),onClick:m[9]||(m[9]=k=>d(t.unref(r).curPage+1))},{default:t.withCtx(()=>[t.createVNode(M)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),y1=v(t.defineComponent({__name:"RemoteSearch",props:{keyValue:{type:String,default:""},modelValue:{type:String,default:""},storeModule:{type:String,default:""},placeholder:{type:String,default:"Начните вводить запрос"},showSuggestions:{type:Boolean,default:!0},width:{type:[Number,String],default:"var(--input-width-default, 100%)"},focus:{type:Boolean,default:!1},maxHeightResultList:{type:String,default:"200px"},zIndexResultList:{type:String,default:"10"},boxShadowResultList:{type:String,default:"rgba(0, 0, 0, 0.35) 0px 5px 5px"}},emits:["select","load","input"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.modelValue),s=t.ref();let a=Wo.SearchModel();t.watch(()=>i.focus,()=>{i.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const d=async f=>{if(f.length<2)return;s.value.activated=!0,a=Wo.SearchModel(),a.searchObjects=[],a.query=f,a.key=i.keyValue;const h=a.searchGroups.find(m=>m.key===i.keyValue);return h&&(a.searchGroup=h),await Ws.Search.Search(a),a.searchObjects},c=async f=>{o("select",f),r.value=""},u=f=>{o("input",f),f.length===0&&o("input","")};return(f,h)=>(t.openBlock(),t.createBlock(va,{ref_key:"searchForm",ref:s,modelValue:t.unref(r),"onUpdate:modelValue":h[0]||(h[0]=m=>t.isRef(r)?r.value=m:null),"max-height-result-list":n.maxHeightResultList,"z-index-result-list":n.zIndexResultList,"box-shadow-result-list":n.boxShadowResultList,width:n.width,"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:n.placeholder,"search-func":d,"trigger-on-focus":n.showSuggestions,suggestions:t.unref(a).searchObjects,onSelect:c,onInput:u},null,8,["modelValue","max-height-result-list","z-index-result-list","box-shadow-result-list","width","placeholder","trigger-on-focus","suggestions"]))}}),[["__scopeId","data-v-af0b4b1a"]]),w1={class:"mainblock-body"},b1={class:"mainblock-footer"},S1=v(t.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"mainblock",style:t.normalizeStyle({background:n.background,padding:n.padding})},[t.createElementVNode("div",{class:"mainblock-header",style:t.normalizeStyle({background:n.background})},[t.renderSlot(e.$slots,"header",{},void 0,!0)],4),t.createElementVNode("div",w1,[t.renderSlot(e.$slots,"body",{},void 0,!0)]),t.createElementVNode("div",b1,[t.renderSlot(e.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),C1={class:"right-slider-content"},k1={class:"right-slider-content-header"},x1={class:"right-slider-content-box"},E1={class:"right-slider-button"},B1=v(t.defineComponent({__name:"RightSliderContainer",props:{sliderOffWidth:{type:String,required:!1,default:"30px"},sliderOnWidth:{type:String,required:!1,default:"260px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1},titleOpen:{type:String,required:!1,default:"Скрыть список исследований"},titleClose:{type:String,required:!1,default:"Показать список исследований"}},emits:["toggle"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(!1);t.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,d)=>{const c=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock("div",{class:"right-slider",style:t.normalizeStyle({marginRight:t.unref(r)?`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`:"0",width:n.sliderOnWidth})},[t.createElementVNode("div",{class:"click-line",onClick:d[0]||(d[0]=u=>s(!t.unref(r)))},[t.unref(r)?(t.openBlock(),t.createBlock(c,{key:0,string:n.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):t.createCommentVNode("",!0),t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),t.createElementVNode("div",C1,[t.createElementVNode("div",k1,[t.renderSlot(a.$slots,"header",{},void 0,!0)]),t.createElementVNode("div",x1,[t.renderSlot(a.$slots,"default",{},void 0,!0)])]),t.createElementVNode("div",E1,[t.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),$1={class:"mainblock"},N1={class:"body-block"},M1={class:"tab-block"},I1=v(t.defineComponent({__name:"RightTabsContainer",props:{sliderOffWidth:{type:String,required:!1,default:"101px"},sliderOnWidth:{type:String,required:!1,default:"332px"},background:{type:String,required:!1,default:"inherit"},isToggle:{type:Boolean,required:!1,default:!1},mobileWidth:{type:String,required:!1,default:"768px"}},emits:["toggle"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(!1),s=t.ref(window.matchMedia("(max-width: 768px)").matches),a=c=>{o("toggle",c)},d=t.ref(!1);return t.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(i.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(c,u)=>(t.openBlock(),t.createElementBlock("div",$1,[t.createElementVNode("div",{class:"slider-block",style:t.normalizeStyle({marginRight:t.unref(s)?n.isToggle?"49px":`calc(49px - ${n.sliderOnWidth})`:n.isToggle?n.sliderOffWidth:`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`,width:n.sliderOnWidth,minHeight:n.sliderOffWidth,height:n.isToggle?"auto":"100px"})},[t.createElementVNode("div",{class:"slider-icon",style:t.normalizeStyle({border:n.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:n.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=f=>a(!n.isToggle)),onMouseenter:u[1]||(u[1]=f=>d.value=!0),onMouseleave:u[2]||(u[2]=f=>d.value=!1)},[t.createElementVNode("div",{class:"icon-block",style:t.normalizeStyle({transform:t.unref(d)?n.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":n.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:n.isToggle?"#379FFF":"#00B5A4"})},[t.renderSlot(c.$slots,"icon",{},void 0,!0)],4)],36),t.createElementVNode("div",{class:"slider-info",style:t.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[t.renderSlot(c.$slots,"slider-body",{},void 0,!0)],4)],4),t.createElementVNode("div",N1,[t.renderSlot(c.$slots,"body",{},void 0,!0)]),t.createElementVNode("div",M1,[t.renderSlot(c.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),V1=["label","value"],T1=v(t.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:e}){const i={[qe.String]:"Текстовый ответ",[qe.Text]:"Развёрнутый текстовый ответ",[qe.Number]:"Числовой ответ",[qe.Date]:"Ответ в виде даты",[qe.Radio]:"Выбор одного из вариантов",[qe.Set]:"Выбор нескольких вариантов",[qe.File]:"Ответ в виде файла",[qe.MatrixRadio]:"Матрица с одним выбором",[qe.MatrixSet]:"Матрица с несколькими выборами"},o=e,r=s=>{o("select",s)};return(s,a)=>{const d=t.resolveComponent("PString"),c=t.resolveComponent("PSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(d,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),t.createVNode(c,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(i,(u,f)=>t.createElementVNode("option",{key:u,label:u,value:f},null,8,V1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),R1=["label","value"],P1=v(t.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:e}){const i=t.ref(!1),o=e,r=t.ref();t.onBeforeMount(()=>{i.value=!0,r.value=rn.GetDefault()});const s=async d=>{r.value=d??rn.GetDefault(),o("load")},a=async d=>{await s(d)};return(d,c)=>{var f;const u=t.resolveComponent("PSelect");return t.unref(i)?(t.openBlock(),t.createBlock(u,{key:0,modelValue:t.unref(r),"onUpdate:modelValue":c[0]||(c[0]=h=>t.isRef(r)?r.value=h:null),"popper-append-to-body":!1,clearable:!((f=t.unref(r))!=null&&f.default),"value-key":"label",onChange:a,onClear:c[1]||(c[1]=h=>a())},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(rn).Get(),(h,m)=>(t.openBlock(),t.createElementBlock("option",{key:m,label:h.label,value:h},null,8,R1))),128))]),_:1},8,["modelValue","clearable"])):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-982338b4"]]),v1=["label","value"],A1=v(t.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:e}){const i=e,o=t.ref();t.onBeforeMount(()=>{o.value=rn.GetDefault()});const r=async a=>{a||(o.value=rn.GetDefault()),At.Get().setSortModel(o.value),At.Get().p.drop(),i("load")},s=async a=>{await r(a)};return(a,d)=>{var u;const c=t.resolveComponent("PSelect");return t.openBlock(),t.createBlock(c,{modelValue:t.unref(o),"onUpdate:modelValue":d[0]||(d[0]=f=>t.isRef(o)?o.value=f:null),"popper-append-to-body":!1,clearable:!((u=t.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(rn).Get(),(f,h)=>(t.openBlock(),t.createElementBlock("option",{key:h,label:f.label,value:f},null,8,v1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-80f413ec"]]),z1={class:"switch-container"},D1={class:"line"},F1={class:"line"},O1=v(t.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(n,{emit:e}){const i=n,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>i.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>i.secondModel.valueEq(u.value)?void 0:o,d=h=>{var b;return{color:(b=u.value)!=null&&b.valueEq(h)?"#006bb4":"#B0A4C0"}},c=e,u=t.ref(void 0),f=async h=>{var m;(m=u.value)!=null&&m.valueEq(h)||(u.value=h,c("load"))};return(h,m)=>{const b=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock("div",z1,[t.createElementVNode("div",D1,[t.createVNode(b,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:t.normalizeStyle(d(n.firstModel)),onClick:m[0]||(m[0]=C=>f(n.firstModel))},null,8,["string","style"]),t.createVNode(b,{string:"Все","font-size":"12px",padding:"0",style:t.normalizeStyle(d()),onClick:m[1]||(m[1]=C=>f())},null,8,["style"]),t.createVNode(b,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:t.normalizeStyle(d(n.secondModel)),onClick:m[2]||(m[2]=C=>f(n.secondModel))},null,8,["string","style"])]),t.createElementVNode("div",F1,[t.createElementVNode("div",{class:t.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(t.unref(u))}]),style:t.normalizeStyle(r()),onClick:m[3]||(m[3]=C=>f(n.firstModel))},null,6),t.createElementVNode("div",{class:t.normalizeClass(["switch-knob2",{active:!t.unref(u)}]),style:t.normalizeStyle(s()),onClick:m[4]||(m[4]=C=>f())},null,6),t.createElementVNode("div",{class:t.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(t.unref(u))}]),style:t.normalizeStyle(a()),onClick:m[5]||(m[5]=C=>f(n.secondModel))},null,6),m[6]||(m[6]=t.createElementVNode("div",{class:"switch-axis"},null,-1)),m[7]||(m[7]=t.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),m[8]||(m[8]=t.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),m[9]||(m[9]=t.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),_1={},L1={class:"flex"};function H1(n,e){return t.openBlock(),t.createElementBlock("div",L1,[t.renderSlot(n.$slots,"default",{},void 0,!0)])}const U1=v(_1,[["render",H1],["__scopeId","data-v-5023d414"]]),q1=v(t.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:e}){const i=t.ref(!1),o=e,r=async()=>{o("submit"),i.value=!i.value};return(s,a)=>{const d=t.resolveComponent("PString"),c=t.resolveComponent("PButton"),u=t.resolveComponent("GridContainer"),f=t.resolveComponent("InfoItem");return t.openBlock(),t.createBlock(f,{title:n.title,icon:"edit-title","with-hover":!0,close:t.unref(i),width:"100%",onKeyupEnter:r},{"open-inside-content":t.withCtx(()=>[t.createVNode(u,{"custom-class":"grid"},{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default",{},void 0,!0),t.createVNode(c,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:t.withCtx(()=>[n.content.length>0?(t.openBlock(),t.createBlock(d,{key:0,string:n.content},null,8,["string"])):(t.openBlock(),t.createBlock(d,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-0794596f"]]),j1={class:"top-slider-content"},W1={class:"center"},G1=v(t.defineComponent({__name:"TopSliderContainer",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1}},emits:["toggle"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(!0);t.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=t.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[1]=t.withModifiers(()=>{},["stop"]))]})),t.createElementVNode("div",{class:"top-slider",style:t.normalizeStyle({marginTop:t.unref(r)?`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`:"0",height:n.sliderOnHeight}),onClick:d[3]||(d[3]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",j1,[t.createElementVNode("div",W1,[t.renderSlot(a.$slots,"default",{},void 0,!0)])]),t.createElementVNode("div",{class:"click-line",style:t.normalizeStyle({height:n.sliderOffHeight}),onClick:d[2]||(d[2]=c=>s(!t.unref(r)))},[t.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function Q1(n){n.component("PageNotFound",Ps),n.component("AdaptiveContainer",Bg),n.component("AdaptiveContainerHorizontal",Mg),n.component("CarouselImages",zg),n.component("ContextWindow",Dg),n.component("DateInputRangeV2",Ug),n.component("DateInputRange",Og),n.component("DropList",Wg),n.component("FilterCheckbox",Gg),n.component("FiltersButtonsSelect",Qg),n.component("FilterSelect",Xg),n.component("FTSPPanel",Zg),n.component("GeneralItem",Jg),n.component("GridContainer",Ra),n.component("InfoItem",t1),n.component("InfoItemSelectButtons",n1),n.component("LeftRightContainer",r1),n.component("PAutocomplete",va),n.component("PhoneForm",l1),n.component("PLoader",u1),n.component("PPagination",g1),n.component("RemoteSearch",y1),n.component("ResearcheContainer",S1),n.component("RightSliderContainer",B1),n.component("RightTabsContainer",I1),n.component("SelectValueType",T1),n.component("SortList",P1),n.component("SortSelect",A1),n.component("Switch3Pos",O1),n.component("ThemeWrapper",U1),n.component("ToggleInfoItem",q1),n.component("TopSliderContainer",G1)}const Y1=v(t.defineComponent({__name:"IconDownload",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.createElementVNode("path",{d:"M15.6443 5.06141C15.0797 5.29331 15.0998 5.06141 15.0998 12.1393C15.0998 15.7388 15.0696 18.6728 15.0293 18.6728C14.9889 18.6728 14.1521 17.8763 13.1842 16.9083C11.6819 15.4061 11.3592 15.1338 11.0467 15.0733C10.724 15.0229 10.6333 15.0632 10.3611 15.3254C10.1292 15.5573 10.0586 15.7186 10.0586 16.0211C10.0586 16.3941 10.1594 16.5151 12.8615 19.2071C15.4326 21.7681 15.6947 22 16.0073 22C16.3198 22 16.582 21.7681 19.153 19.2071C21.9156 16.4546 21.9559 16.4042 21.9559 15.9908C21.9559 15.4867 21.6535 15.1641 21.109 15.0733C20.736 15.0128 20.7259 15.0229 18.8808 16.868C17.0357 18.6929 17.0155 18.7131 17.0155 18.3703C17.0054 18.1787 16.9953 15.2145 16.9853 11.7965L16.9651 5.56554L16.713 5.31348C16.4307 5.03117 15.9669 4.92026 15.6443 5.06141Z"}),t.createElementVNode("path",{d:"M5.30247 20.3872L5 20.6997L5.04033 22.081C5.07058 23.4321 5.08066 23.4825 5.44363 24.2488C6.09899 25.6099 7.17782 26.5173 8.59945 26.8904C9.47663 27.1122 22.5335 27.1223 23.4006 26.8904C25.044 26.4669 26.3245 25.2671 26.8084 23.7043C26.9496 23.2506 27 22.7868 27 21.8794C27 20.6796 27 20.6695 26.7076 20.3771C26.3144 19.9839 25.901 19.9839 25.4675 20.3771L25.1347 20.6695L25.1045 21.8189C25.0843 22.8776 25.0541 23.0086 24.7516 23.6035C24.3987 24.3093 23.7938 24.8235 23.088 25.0251C22.5839 25.1663 9.4363 25.1663 8.93217 25.0251C8.30706 24.8436 7.64161 24.3093 7.29881 23.7144C7.00642 23.2002 6.98625 23.0691 6.93584 21.9197L6.88543 20.6695L6.5527 20.3771C6.11916 19.9839 5.70577 19.9839 5.30247 20.3872Z"})])],-1))],64))}}),[["__scopeId","data-v-94c18208"]]),X1=v(t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.createElementVNode("path",{d:"M8.58216 5.14236C6.22884 5.77558 4.70721 8.02494 5.04745 10.3688C5.61452 14.2627 10.3684 15.8127 13.0714 12.9962C13.6385 12.4103 14.319 11.2194 14.319 10.8225C14.319 10.6902 14.9428 10.6713 20.3771 10.6713H26.4353L26.7094 10.3972C27.0969 10.0097 27.0969 9.44261 26.7094 9.05511L26.4353 8.78103H20.396H14.3662L14.1867 8.23287C13.4589 5.9646 10.8599 4.52803 8.58216 5.14236ZM10.9638 7.21215C13.0525 8.24232 13.0336 11.2194 10.9355 12.2496C10.2172 12.5993 9.20593 12.6276 8.54436 12.2968C6.21939 11.1533 6.43676 7.81702 8.8846 7.01368C9.45166 6.8341 10.3495 6.91916 10.9638 7.21215Z"}),t.createElementVNode("path",{d:"M21.5953 17.6266C21.1133 17.7211 20.2155 18.0519 19.8752 18.2599C18.9868 18.7986 18.0322 20.0083 17.8054 20.8778L17.6826 21.3504H12.3616C6.66257 21.3504 6.63422 21.3504 6.37904 21.8135C6.20892 22.1443 6.26562 22.6452 6.51135 22.9287L6.73818 23.1933L12.1915 23.2406L17.6448 23.2878L17.8621 23.8738C18.4292 25.4427 19.7334 26.6052 21.2929 26.936C22.1057 27.1061 23.3154 27.0021 24.062 26.6997C25.3379 26.1799 26.4059 25.0174 26.8029 23.7037C26.9635 23.165 27.0013 22.8625 26.9635 22.0781C26.9352 21.1991 26.8974 21.0479 26.5855 20.3864C25.8105 18.7513 24.2794 17.7117 22.5499 17.6172C22.1529 17.5983 21.7276 17.6077 21.5953 17.6266ZM23.5517 19.8004C24.081 20.0556 24.5913 20.5754 24.8748 21.1519C24.9977 21.4071 25.045 21.7095 25.045 22.3427C25.045 23.1555 25.0261 23.2311 24.7236 23.7415C23.5611 25.6412 20.8014 25.5656 19.7902 23.5997C19.5066 23.0421 19.4405 22.0119 19.6484 21.3787C20.1682 19.8004 22.0206 19.0537 23.5517 19.8004Z"})])],-1))],64))}}),[["__scopeId","data-v-d11e6069"]]),Z1=v(t.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[t.createElementVNode("path",{d:"M13.4323 2.0816C13.3788 2.0909 13.2951 2.12113 13.2462 2.14904C13.1997 2.17462 11.5439 3.85601 9.56715 5.8816C6.70668 8.81648 5.96017 9.59322 5.90436 9.69787C5.84622 9.8095 5.83691 9.85601 5.83691 9.99787C5.83691 10.1397 5.84622 10.1886 5.90436 10.2979C6.00436 10.4886 13.102 17.7746 13.2764 17.8653C13.3695 17.9142 13.423 17.9258 13.5555 17.9258C13.916 17.9235 14.1788 17.6583 14.1788 17.2932C14.1788 17.0374 14.1392 16.9769 13.623 16.4467C13.3695 16.1862 11.8555 14.6328 10.2555 12.9909C8.65552 11.349 7.35087 9.99787 7.35552 9.9909C7.36017 9.9816 8.86715 8.43276 10.7044 6.54904C12.5416 4.66532 14.0671 3.08392 14.0951 3.03508C14.2392 2.79555 14.1951 2.45834 13.9927 2.25834C13.8462 2.1095 13.6323 2.04206 13.4323 2.0816Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-ca16a90c"]]),J1=v(t.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.createElementVNode("path",{d:"M29.3678 7.25259C29.2732 7.3128 28.8775 7.6999 28.5076 8.13001C27.7076 9.02463 16.2409 22.0483 16.2065 22.0999C16.1549 22.1601 15.6732 21.73 13.9786 20.1042C8.31835 14.6934 8.5334 14.8827 8.03448 14.8827C7.69899 14.8827 7.59577 14.9257 7.3463 15.1752C7.09684 15.4246 7.05383 15.5279 7.05383 15.8547C7.05383 16.3365 6.98501 16.259 10.1506 19.2354C11.5011 20.4999 13.256 22.1601 14.056 22.9171C15.6302 24.4225 15.9485 24.6461 16.3872 24.5687C16.7399 24.4999 16.7743 24.4569 20.0947 20.6891C21.5485 19.0289 23.2689 17.0762 23.914 16.3451C29.4624 10.0655 30.6495 8.69775 30.77 8.48269C30.942 8.14721 30.8474 7.6999 30.5377 7.38162C30.3399 7.19237 30.2194 7.14076 29.9183 7.14076C29.7119 7.14936 29.471 7.19237 29.3678 7.25259Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-48c8e6e2"]]),Aa=v(t.defineComponent({__name:"IconClose",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[t.createElementVNode("path",{d:"M7.53508 7.18138C7.03684 7.5158 6.86132 8.14496 7.1161 8.66643C7.18971 8.8138 8.02201 9.69236 9.44881 11.1207C10.6718 12.345 11.8211 13.49 12.0023 13.6714L12.3251 14.0058L9.80551 16.5224C7.92576 18.4043 7.25199 19.1184 7.14441 19.3225C6.83867 19.9346 7.0425 20.5865 7.637 20.8926C7.89745 21.0286 8.41268 21.0343 8.6618 20.9096C8.76372 20.8585 10.0037 19.6626 11.4191 18.2455L14.001 15.6666L16.5432 18.2229C18.1964 19.8723 19.1703 20.8132 19.3232 20.8869C19.5779 21.0116 20.0309 21.0399 20.2913 20.9379C20.5178 20.8529 20.8632 20.5015 20.9368 20.2747C21.0274 19.9913 21.0161 19.5719 20.9028 19.3508C20.8519 19.2431 19.6516 17.9961 18.2361 16.5791L15.6656 14.0001L18.2191 11.4495C19.7138 9.95309 20.8179 8.80813 20.8858 8.6721C21.0104 8.42837 21.0387 7.98058 20.9425 7.73119C20.8519 7.50446 20.5971 7.23239 20.3593 7.11336C20.0988 6.97733 19.6516 6.96599 19.3628 7.08502C19.2212 7.14737 18.3097 8.01459 16.5771 9.74904L14.001 12.328L11.4191 9.75471C9.6583 7.99192 8.77504 7.14737 8.63349 7.08502C8.51459 7.03968 8.28246 7 8.1126 7C7.86347 7 7.76156 7.03401 7.53508 7.18138Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-cbcad2a0"]]),K1=v(t.defineComponent({__name:"IconEdit",props:{size:{type:String,default:""},margin:{type:String,default:"0 15px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.createElementVNode("path",{d:"M21.993 4.16087C21.6831 4.26049 21.2404 4.48185 20.9969 4.64787C20.1778 5.22342 4.60489 20.9402 4.39459 21.4051C4.11789 22.0138 3 25.8434 3 26.1865C3 26.5961 3.30991 27.1938 3.65302 27.4373C4.2507 27.8689 4.58275 27.8468 6.88493 27.1716C8.06923 26.8174 9.23138 26.4411 9.47488 26.3194C10.0062 26.0537 25.4795 10.6468 26.0772 9.79458C26.8519 8.67669 26.9626 7.32637 26.3871 6.10887C25.6234 4.48185 23.6754 3.61853 21.993 4.16087ZM24.0406 6.25276C24.7379 6.70655 25.0035 7.69162 24.6272 8.44426C24.4501 8.78737 9.331 24.0393 8.73332 24.471C8.48982 24.6481 5.2247 25.6995 5.13616 25.6331C5.11402 25.611 5.42393 24.5042 5.82239 23.1871L6.12123 22.1909L14.1125 14.1886C22.5243 5.76576 22.4911 5.79896 23.3101 5.94285C23.4983 5.97605 23.8192 6.11994 24.0406 6.25276Z",fill:"currentColor"}),t.createElementVNode("path",{d:"M15.098 25.9216C14.5446 26.1872 14.4118 27.1169 14.8656 27.5265C15.0759 27.7146 15.4743 27.7257 21.1302 27.7589C25.325 27.781 27.273 27.7478 27.4722 27.6703C28.0367 27.4268 28.1806 26.6521 27.7489 26.154L27.4833 25.8441L21.4069 25.822C17.2674 25.8109 15.264 25.833 15.098 25.9216Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-55ea5a5c"]]),e0=v(t.defineComponent({__name:"IconEmail",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[t.createElementVNode("path",{d:"M20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V5.913C2.02243 5.39779 2.24301 4.91116 2.61568 4.5547C2.98835 4.19824 3.4843 3.99951 4 4H20C20.5304 4 21.0391 4.21071 21.4142 4.58579C21.7893 4.96086 22 5.46957 22 6V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20ZM4 7.868V18H20V7.868L12 13.2L4 7.868ZM4.8 6L12 10.8L19.2 6H4.8Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-99358e0a"]]),t0=v(t.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[t.createElementVNode("path",{d:"M8.91736 3.08529L6.83471 5.17059H8.0843H9.33058V7.25588V9.34117H7.24793H5.16529L5.15868 8.09993L5.14876 6.85868L3.07273 8.93404L1 11.0127L3.08264 13.098L5.16529 15.1833V13.9321V12.6843H7.24793H9.33058V14.7696V16.8548H7.89256C7.10248 16.8548 6.45455 16.8648 6.45785 16.878C6.45785 16.8946 6.60992 17.0402 6.79504 17.2057C7.16529 17.5367 8.90744 19.1189 9.38017 19.5525C10.7058 20.7639 10.9967 21.0188 11.0331 20.999C11.0562 20.9857 12.0876 20.0523 13.3273 18.9236L15.5785 16.8714L14.124 16.8615L12.6694 16.8548V14.7696V12.6843H14.7521H16.8347V13.9255C16.8347 14.6074 16.8446 15.1668 16.8612 15.1668C16.8975 15.1668 21 11.0491 21 11.0127C21 10.9763 16.8975 6.85868 16.8612 6.85868C16.8446 6.85868 16.8347 7.41807 16.8347 8.09993V9.34117H14.7521H12.6694V7.25588V5.17059H13.9091C14.5901 5.17059 15.1488 5.16066 15.1488 5.14411C15.1488 5.12094 11.043 1 11.0165 1C11.0066 1 10.0612 1.93673 8.91736 3.08529ZM12.081 3.24086C12.6595 3.82011 13.1322 4.30337 13.1322 4.31661C13.1322 4.33316 12.8413 4.34309 12.4876 4.34309H11.843V7.25588V10.1687H14.7686H17.6942V9.53646C17.6909 9.18891 17.6975 8.89763 17.7041 8.89101C17.7074 8.88439 18.1934 9.36103 18.7785 9.9469L19.843 11.0127L18.7686 12.0885L17.6942 13.1642V12.9325C17.6909 12.8034 17.6876 12.5155 17.6843 12.2871L17.6777 11.8733L14.762 11.8634L11.843 11.8568V14.7696V17.6823L12.6331 17.689L13.4264 17.6989L12.2165 18.7978L11.0066 19.9L10.7223 19.6419C10.5669 19.5028 10.4314 19.3804 10.4215 19.3704C10.405 19.3539 9.92893 18.917 9.28099 18.3311C9.09917 18.1656 8.86777 17.9538 8.7686 17.8578L8.58678 17.6823H9.37355H10.157V14.7696V11.8568H7.24793H4.33884L4.33223 12.5022L4.32231 13.1477L3.25455 12.0785L2.19008 11.0127L3.25455 9.94359L4.32231 8.87446L4.33223 9.52322L4.33884 10.1687H7.24793H10.157V7.25588V4.34309L9.5124 4.33647L8.86446 4.32654L9.93223 3.25741C10.5174 2.67154 11.0066 2.1916 11.0165 2.1916C11.0264 2.1916 11.5058 2.66492 12.081 3.24086Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-05547f14"]]),n0=v(t.defineComponent({__name:"IconPhone",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[t.createElementVNode("path",{d:"M19.4998 21.75H19.3723C4.63482 20.9025 2.54232 8.4675 2.24982 4.6725C2.22625 4.37744 2.26114 4.08062 2.35248 3.79906C2.44382 3.5175 2.58981 3.25673 2.78211 3.03169C2.9744 2.80665 3.20921 2.62177 3.47308 2.48763C3.73695 2.35349 4.02469 2.27274 4.31982 2.25H8.45232C8.75274 2.24971 9.04632 2.33963 9.29504 2.50812C9.54377 2.67661 9.73617 2.9159 9.84732 3.195L10.9873 6C11.0971 6.27266 11.1243 6.57156 11.0657 6.85957C11.007 7.14758 10.865 7.412 10.6573 7.62L9.05982 9.2325C9.30936 10.6506 9.98846 11.9578 11.0052 12.9772C12.022 13.9967 13.3274 14.6792 14.7448 14.9325L16.3723 13.32C16.5834 13.1146 16.8504 12.9759 17.1398 12.9213C17.4292 12.8666 17.7283 12.8983 17.9998 13.0125L20.8273 14.145C21.1022 14.2597 21.3367 14.4536 21.501 14.702C21.6653 14.9504 21.7519 15.2422 21.7498 15.54V19.5C21.7498 20.0967 21.5128 20.669 21.0908 21.091C20.6689 21.5129 20.0966 21.75 19.4998 21.75ZM4.49982 3.75C4.30091 3.75 4.11014 3.82902 3.96949 3.96967C3.82884 4.11032 3.74982 4.30109 3.74982 4.5V4.56C4.09482 9 6.30732 19.5 19.4548 20.25C19.5534 20.2561 19.6521 20.2427 19.7454 20.2105C19.8388 20.1783 19.9248 20.1281 19.9987 20.0626C20.0726 19.9971 20.1328 19.9176 20.1759 19.8288C20.219 19.74 20.2441 19.6436 20.2498 19.545V15.54L17.4223 14.4075L15.2698 16.545L14.9098 16.5C8.38482 15.6825 7.49982 9.1575 7.49982 9.09L7.45482 8.73L9.58482 6.5775L8.45982 3.75H4.49982Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-131f6ba1"]]),i0=v(t.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[t.createElementVNode("path",{d:"M3.08417 4.43062C2.86268 4.4769 2.70731 4.56285 2.52549 4.74467C2.29408 4.97607 2.20152 5.2174 2.22136 5.55459C2.25111 6.0207 1.96681 5.70996 6.78995 10.5397C9.18995 12.9463 11.2263 14.9662 11.309 15.029C11.5238 15.1843 11.7123 15.2471 11.99 15.2505C12.4693 15.2538 12.109 15.581 17.1106 10.5728C22.0891 5.58764 21.7288 5.98103 21.7255 5.505C21.7255 5.37607 21.7023 5.21078 21.6726 5.13145C21.5106 4.68186 21.0511 4.38434 20.5817 4.4174C20.1519 4.44715 20.4263 4.19591 16.0164 8.60252L11.9833 12.629L8.06598 8.71161C5.91061 6.55624 4.0726 4.73475 3.98003 4.66202C3.71227 4.45376 3.38499 4.36781 3.08417 4.43062Z",fill:"currentColor"}),t.createElementVNode("path",{d:"M9.69602 16.8994C9.70593 16.9292 9.72577 17.0184 9.73569 17.1044C9.76213 17.2664 9.7985 17.2994 9.83486 17.1903C9.84478 17.154 9.89106 17.1143 9.93734 17.1044C10.0464 17.078 10.0365 17.0548 9.87453 16.9589C9.6861 16.8465 9.67288 16.8432 9.69602 16.8994Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-4d8b581f"]]),o0=v(t.defineComponent({__name:"ArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{d:"M656.733 149.806C659.446 147.019 662.69 144.804 666.274 143.292C669.857 141.779 673.707 141 677.597 141C681.486 141 685.337 141.779 688.92 143.292C692.503 144.804 695.748 147.019 698.461 149.806C704.024 155.518 707.138 163.176 707.138 171.15C707.138 179.123 704.024 186.782 698.461 192.494L386.589 512.366L698.461 832.302C701.269 835.176 703.483 838.575 704.976 842.305C706.47 846.035 707.215 850.022 707.167 854.04C707.119 858.057 706.281 862.026 704.699 865.72C703.118 869.413 700.824 872.759 697.949 875.566C695.211 878.242 691.972 880.351 688.417 881.774C684.863 883.197 681.063 883.904 677.235 883.857C673.407 883.809 669.625 883.007 666.107 881.497C662.589 879.986 659.404 877.797 656.733 875.054L325.085 534.702C319.26 528.726 316 520.711 316 512.366C316 504.021 319.26 496.006 325.085 490.03L656.733 149.806Z"})])],-1))],64))}}),[["__scopeId","data-v-ec3439ce"]]),r0=v(t.defineComponent({__name:"ArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{d:"M366.436 875.054C363.723 877.84 360.479 880.055 356.895 881.568C353.312 883.08 349.462 883.859 345.572 883.859C341.683 883.859 337.832 883.08 334.249 881.568C330.666 880.055 327.421 877.84 324.708 875.054C319.145 869.342 316.031 861.683 316.031 853.71C316.031 845.736 319.145 838.077 324.708 832.366L636.58 512.494L324.708 192.558C321.9 189.684 319.686 186.284 318.193 182.555C316.699 178.825 315.954 174.837 316.002 170.82C316.049 166.802 316.888 162.833 318.47 159.14C320.051 155.446 322.345 152.1 325.22 149.294C327.958 146.618 331.197 144.508 334.752 143.086C338.306 141.663 342.106 140.955 345.934 141.003C349.762 141.05 353.544 141.852 357.062 143.363C360.58 144.873 363.765 147.063 366.436 149.806L698.084 490.158C703.909 496.134 707.169 504.148 707.169 512.494C707.169 520.839 703.909 528.854 698.084 534.83L366.436 875.054Z"})])],-1))],64))}}),[["__scopeId","data-v-cd0d3c21"]]),s0=v(t.defineComponent({__name:"DoubleArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{d:"M529.408 149.376C532.121 146.589 535.365 144.374 538.949 142.862C542.532 141.35 546.382 140.57 550.272 140.57C554.161 140.57 558.011 141.35 561.595 142.862C565.178 144.374 568.422 146.589 571.136 149.376C576.699 155.088 579.813 162.746 579.813 170.72C579.813 178.694 576.699 186.352 571.136 192.064L259.264 511.936L571.136 831.872C573.943 834.746 576.157 838.145 577.651 841.875C579.145 845.605 579.889 849.593 579.842 853.61C579.794 857.628 578.956 861.597 577.374 865.29C575.792 868.984 573.499 872.329 570.624 875.136C567.886 877.812 564.647 879.922 561.092 881.344C557.538 882.767 553.738 883.475 549.91 883.427C546.081 883.38 542.3 882.578 538.782 881.067C535.264 879.556 532.079 877.367 529.408 874.624L197.76 534.272C191.935 528.296 188.675 520.281 188.675 511.936C188.675 503.591 191.935 495.576 197.76 489.6L529.408 149.376ZM785.408 149.376C788.121 146.589 791.365 144.374 794.949 142.862C798.532 141.35 802.382 140.57 806.272 140.57C810.161 140.57 814.011 141.35 817.595 142.862C821.178 144.374 824.422 146.589 827.136 149.376C832.699 155.088 835.813 162.746 835.813 170.72C835.813 178.694 832.699 186.352 827.136 192.064L515.264 511.936L827.136 831.872C829.943 834.746 832.157 838.145 833.651 841.875C835.145 845.605 835.889 849.593 835.842 853.61C835.794 857.628 834.956 861.597 833.374 865.29C831.792 868.984 829.499 872.329 826.624 875.136C823.886 877.812 820.647 879.922 817.092 881.344C813.538 882.767 809.738 883.475 805.91 883.427C802.081 883.38 798.3 882.578 794.782 881.067C791.264 879.556 788.079 877.367 785.408 874.624L453.76 534.272C447.935 528.296 444.675 520.281 444.675 511.936C444.675 503.591 447.935 495.576 453.76 489.6L785.408 149.376Z"})])],-1))],64))}}),[["__scopeId","data-v-98099ad2"]]),a0=v(t.defineComponent({__name:"DoubleArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{d:"M495.111 874.624C492.397 877.411 489.153 879.626 485.57 881.138C481.987 882.65 478.136 883.43 474.247 883.43C470.357 883.43 466.507 882.65 462.924 881.138C459.34 879.626 456.096 877.411 453.383 874.624C447.819 868.912 444.706 861.254 444.706 853.28C444.706 845.306 447.819 837.648 453.383 831.936L765.255 512.064L453.383 192.128C450.575 189.254 448.361 185.855 446.867 182.125C445.374 178.395 444.629 174.407 444.677 170.39C444.724 166.372 445.563 162.403 447.145 158.71C448.726 155.016 451.02 151.671 453.895 148.864C456.633 146.188 459.872 144.078 463.426 142.656C466.981 141.233 470.781 140.525 474.609 140.573C478.437 140.62 482.219 141.422 485.737 142.933C489.254 144.444 492.44 146.633 495.111 149.376L826.759 489.728C832.584 495.704 835.844 503.719 835.844 512.064C835.844 520.409 832.584 528.424 826.759 534.4L495.111 874.624ZM239.111 874.624C236.397 877.411 233.153 879.626 229.57 881.138C225.987 882.65 222.136 883.43 218.247 883.43C214.357 883.43 210.507 882.65 206.924 881.138C203.34 879.626 200.096 877.411 197.383 874.624C191.819 868.912 188.706 861.254 188.706 853.28C188.706 845.306 191.819 837.648 197.383 831.936L509.255 512.064L197.383 192.128C194.575 189.254 192.361 185.855 190.867 182.125C189.374 178.395 188.629 174.407 188.677 170.39C188.724 166.372 189.563 162.403 191.145 158.71C192.726 155.016 195.02 151.671 197.895 148.864C200.633 146.188 203.872 144.078 207.426 142.656C210.981 141.233 214.781 140.525 218.609 140.573C222.437 140.62 226.219 141.422 229.737 142.933C233.254 144.444 236.44 146.633 239.111 149.376L570.759 489.728C576.584 495.704 579.844 503.719 579.844 512.064C579.844 520.409 576.584 528.424 570.759 534.4L239.111 874.624Z"})])],-1))],64))}}),[["__scopeId","data-v-053c9917"]]),l0=v(t.defineComponent({__name:"EllipsisSvg",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),o[3]||(o[3]=t.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-1798f31d><symbol id="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" data-v-1798f31d><path d="M65 135C73.2843 135 80 128.284 80 120C80 111.716 73.2843 105 65 105C56.7157 105 50 111.716 50 120C50 128.284 56.7157 135 65 135Z" data-v-1798f31d></path><path d="M120 135C128.284 135 135 128.284 135 120C135 111.716 128.284 105 120 105C111.716 105 105 111.716 105 120C105 128.284 111.716 135 120 135Z" data-v-1798f31d></path><path d="M175 135C183.284 135 190 128.284 190 120C190 111.716 183.284 105 175 105C166.716 105 160 111.716 160 120C160 128.284 166.716 135 175 135Z" data-v-1798f31d></path></symbol></svg>',1))],64))}}),[["__scopeId","data-v-1798f31d"]]);function c0(n){n.component("IconDownload",Y1),n.component("IconFilter",X1),n.component("ArrowLeft",o0),n.component("ArrowRight",r0),n.component("DoubleArrowLeft",s0),n.component("DoubleArrowRight",a0),n.component("EllipsisSvg",l0),n.component("IconArrowLeft",Z1),n.component("IconCheckDefault",J1),n.component("IconClose",Aa),n.component("IconEdit",K1),n.component("IconEmail",e0),n.component("IconMove",t0),n.component("IconPhone",n0),n.component("IconSearch",Pa),n.component("IconSelectArrow",i0)}const d0=t.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const e=t.ref(n.initActiveIdx),i=o=>{e.value=o};return t.watch(()=>n.initActiveIdx,()=>{i(n.initActiveIdx)}),{changeActiveId:i,activeIdx:e}}});function u0(n,e,i,o,r,s){return t.openBlock(),t.createElementBlock("div",null,[t.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const f0=v(d0,[["render",u0]]),h0=t.defineComponent({name:"CollapseItem",props:{tabId:{type:String,required:!1,default:""},activeId:{type:String,default:""},isCollaps:{type:Boolean,default:!0},title:{type:String,default:""},showToolsOnHover:{type:Boolean,default:!0},background:{type:String,required:!1,default:"#ffffff"},backgroundAttention:{type:String,required:!1,default:"#ffffff"},changeColor:{type:Boolean,default:!1},margin:{type:String,default:"10px 8px 2px 2px"},padding:{type:String,default:"0 10px"},selectable:{type:Boolean,default:!1}},emits:["changeActiveId"],setup(n,{emit:e}){const i=t.ref(n.activeId==="0"),o=()=>{i.value=!i.value,e("changeActiveId",n.tabId)};return t.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!0)}),t.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!1)}),{collapsed:i,handleItemClick:o}}}),m0=["for"],p0={class:"inside-icon"};function g0(n,e,i,o,r,s){return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:"tab",style:t.normalizeStyle({margin:n.margin,height:n.isCollaps&&n.collapsed?"60px":"","box-shadow":n.selectable&&n.activeId===n.tabId?"0px 0px 1px 2px #1979cf":""})},[n.isCollaps&&n.collapsed?(t.openBlock(),t.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:e[0]||(e[0]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...e[3]||(e[3]=[t.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])])):n.isCollaps&&!n.collapsed?(t.openBlock(),t.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:e[1]||(e[1]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...e[4]||(e[4]=[t.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)])])):t.createCommentVNode("",!0),t.createElementVNode("label",{for:n.tabId,onClick:e[2]||(e[2]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[t.createElementVNode("div",{style:t.normalizeStyle({cursor:n.isCollaps?"pointer":"default",background:n.changeColor?n.background:n.backgroundAttention,padding:n.padding,borderRadius:"5px"}),class:"tab-name"},[t.createElementVNode("div",p0,[t.renderSlot(n.$slots,"icon",{},void 0,!0)]),t.createElementVNode("div",{class:"title-in",style:t.normalizeStyle({marginRight:n.isCollaps?"50px":"0",width:n.isCollaps?"calc(100% - 50px)":"100%"})},[t.renderSlot(n.$slots,"inside-title",{},()=>[t.createTextVNode(t.toDisplayString(n.title),1)],!0)],4),t.createElementVNode("div",{class:t.normalizeClass(["tools-bar",{"hidden-part":n.showToolsOnHover}])},[t.renderSlot(n.$slots,"tools",{},void 0,!0)],2)],4)],8,m0),t.createElementVNode("div",{style:t.normalizeStyle({maxHeight:n.isCollaps?"":"1000000vh",background:n.changeColor?n.background:n.backgroundAttention}),class:t.normalizeClass(n.collapsed?"tab-content-down":"tab-content-up")},[t.renderSlot(n.$slots,"default",{},void 0,!0)],6)],4),e[5]||(e[5]=t.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-c2e31ebb><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-c2e31ebb></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-c2e31ebb></path></symbol></svg>',1))],64)}const y0=v(h0,[["render",g0],["__scopeId","data-v-c2e31ebb"]]),w0={class:"tab"},b0={class:"rotate"},S0=v(t.defineComponent({__name:"VerticalCollapseContainer",setup(n){const e=t.ref(!1),i=async()=>{e.value=!e.value};return(o,r)=>{const s=t.resolveComponent("ArrowRight"),a=t.resolveComponent("ArrowLeft");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",w0,[t.renderSlot(o.$slots,"main",{},void 0,!0),t.createElementVNode("div",{style:t.normalizeStyle({width:t.unref(e)?"50%":"20px",transition:"0.3s"}),class:"left"},[t.createElementVNode("div",{style:t.normalizeStyle({width:t.unref(e)?"100%":"0",transition:"0.3s"}),class:"left-content"},[t.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),t.createElementVNode("div",{class:"arrow-bar",onClick:i},[t.createElementVNode("div",b0,[t.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),t.unref(e)?(t.openBlock(),t.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(t.openBlock(),t.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),t.createElementVNode("div",{style:t.normalizeStyle({width:t.unref(e)?"50%":"100%",transition:"0.3s"}),class:"right"},[t.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),t.createVNode(a),t.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),C0={class:"add-block_body"},k0=v(t.defineComponent({__name:"PAdd",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(n){return(e,i)=>{const o=t.resolveComponent("PSticky");return t.openBlock(),t.createElementBlock("div",{class:"add-block",style:t.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[t.createVNode(o,{top:n.top,"z-index":n.zIndex},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),t.createElementVNode("div",C0,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),x0=v(t.defineComponent({__name:"PContainer",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"add-block",style:t.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),E0={class:"add-block_body"},B0=v(t.defineComponent({__name:"PContainerStickyHead",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(n){return(e,i)=>{const o=t.resolveComponent("PSticky"),r=t.resolveComponent("PContainer");return t.openBlock(),t.createBlock(r,{background:n.background,margin:n.margin,padding:n.padding},{default:t.withCtx(()=>[t.createVNode(o,{top:n.top,"z-index":n.zIndex},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),t.createElementVNode("div",E0,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),$0=["src"],N0={key:0,class:"header-row"},M0={class:"title-wrapper"},I0={key:0,class:"title-icon"},V0={class:"title-text"},T0={class:"text-subtitle1 text-weight-medium"},R0={key:0,class:"caption-row"},P0={class:"text-caption text-grey-6"},v0=["innerHTML"],A0={key:1,class:"card-footer"},za=v(t.defineComponent({__name:"PCard",props:{height:{type:String,default:"auto"},maxHeight:{type:String,default:"none"},img:{type:String,default:""},title:{type:String,default:""},content:{type:String,default:""},caption:{type:String,default:""},icon:{type:String,default:""},isMain:{type:Boolean,default:!1},noPointer:{type:Boolean,default:!1},noHover:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const i=t.ref(null),o=n,r=e,s=t.computed(()=>o.img?o.isMain?"365px":"200px":"0"),a=d=>{o.noPointer||r("click",d)};return(d,c)=>(t.openBlock(),t.createBlock(t.unref(V.QCard),{class:t.normalizeClass(["card",{"no-hover":n.noHover,"cursor-pointer":!n.noPointer}]),flat:"",bordered:"",style:t.normalizeStyle({height:n.height}),onClick:a},{default:t.withCtx(()=>[n.img?(t.openBlock(),t.createElementBlock("div",{key:0,class:"image-container",style:t.normalizeStyle({height:s.value})},[t.createElementVNode("img",{class:"image-img",src:n.img,alt:"image",style:t.normalizeStyle({height:s.value})},null,12,$0)],4)):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QCardSection),{class:"card-content",style:t.normalizeStyle({maxHeight:n.maxHeight})},{default:t.withCtx(()=>[n.title||d.$slots.title||d.$slots.icon?(t.openBlock(),t.createElementBlock("div",N0,[t.createElementVNode("div",M0,[n.icon||d.$slots.icon?(t.openBlock(),t.createElementBlock("div",I0,[t.renderSlot(d.$slots,"icon",{},()=>[t.createVNode(t.unref(V.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",V0,[t.renderSlot(d.$slots,"title",{},()=>[t.createElementVNode("span",T0,t.toDisplayString(n.title),1)],!0)])]),d.$slots.caption||n.caption?(t.openBlock(),t.createElementBlock("div",R0,[t.renderSlot(d.$slots,"caption",{},()=>[t.createElementVNode("span",P0,t.toDisplayString(n.caption),1)],!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),n.title||d.$slots.title?(t.openBlock(),t.createBlock(t.unref(V.QSeparator),{key:1,class:"header-separator"})):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"contentRef",ref:i,class:"content-wrapper"},[t.renderSlot(d.$slots,"default",{},()=>[n.content?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(n.isMain?"main-content":"preview-content"),innerHTML:n.content},null,10,v0)):t.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),d.$slots.footer?(t.openBlock(),t.createElementBlock("div",A0,[t.renderSlot(d.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),z0={key:0,class:"list-title"},D0={class:"draggable-item"},F0={class:"drag-handle"},O0={class:"item-content"},_0={key:0,class:"item-actions"},L0={class:"item-content"},H0={key:0,class:"item-actions"},U0={key:4,class:"add-button-container"},q0=t.defineComponent({__name:"PCrudList",props:{sortable:{type:Boolean,default:!0},showAdd:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},title:{type:String,required:!0,default:""},store:{type:R.H.BaseStore,default:void 0},addFunc:{type:Function,required:!0},addToList:{type:Boolean,default:!0},removeFromList:{type:Boolean,default:!0},margin:{type:String,required:!0,default:"0"},background:{type:String,required:!0,default:"var(--background-color)"}},emits:["add","remove","update","sort"],setup(n,{emit:e}){t.useCssVars(c=>({v73008f9f:n.background}));const i=n,o=e,r=async()=>{const c=await i.addFunc();c.order!=="undefined"&&(c.order=i.list.length),i.addToList&&i.store&&i.store.AppendToAll(c),i.store&&await i.store.Create(c),await d(),o("add",c)},s=async c=>{i.removeFromList&&R.H.Classes.RemoveFromClassById(c,i.list),i.store&&await i.store.Remove(c),await d(),o("remove",c)},a=async c=>{i.store&&await i.store.Update(c),o("update",c)},d=async()=>{!i.sortable||i.list.length===0||typeof i.list[0].order>"u"||(R.H.Sorter.Sort(i.list),i.store&&await i.store.UpdateMany(i.list),o("sort"))};return(c,u)=>(t.openBlock(),t.createElementBlock("div",t.mergeProps(c.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(t.openBlock(),t.createElementBlock("div",z0,t.toDisplayString(n.title),1)):t.renderSlot(c.$slots,"title",{},void 0,!0,1),n.sortable?(t.openBlock(),t.createBlock(t.unref(ho),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:d},{item:t.withCtx(({element:f,index:h})=>[t.createElementVNode("div",D0,[t.createElementVNode("div",F0,[t.createVNode(t.unref(V.QIcon),{name:"drag_indicator",class:"drag-icon"})]),t.createElementVNode("div",O0,[t.renderSlot(c.$slots,"default",{item:f,update:a,index:h},()=>[t.createVNode(Gt,{modelValue:f.name,"onUpdate:modelValue":m=>f.name=m,outlined:"",dense:"",class:"content-input",onBlur:m=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(t.openBlock(),t.createElementBlock("div",_0,[t.createVNode(Ke,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:m=>s(f.id)},null,8,["onClick"])])):t.createCommentVNode("",!0)])]),_:3},8,["list"])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:3},t.renderList(n.list,(f,h)=>(t.openBlock(),t.createElementBlock("div",{key:f.id,class:"static-item",style:t.normalizeStyle({background:n.background})},[t.createElementVNode("div",L0,[t.renderSlot(c.$slots,"default",{item:f,update:a,index:h},()=>[t.createVNode(Gt,{modelValue:f.name,"onUpdate:modelValue":m=>f.name=m,outlined:"",dense:"",class:"content-input",onBlur:m=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(t.openBlock(),t.createElementBlock("div",H0,[t.createVNode(Ke,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:m=>s(f.id)},null,8,["onClick"])])):t.createCommentVNode("",!0)],4))),128)),n.showAdd?(t.openBlock(),t.createElementBlock("div",U0,[t.createVNode(Ke,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):t.createCommentVNode("",!0)],16))}}),Da=v(q0,[["__scopeId","data-v-27edbd1f"]]),j0={class:"del-block_title"},W0={class:"del-block_body"},G0=v(t.defineComponent({__name:"PDel",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"10px 10px 10px 50px"},padding:{type:String,required:!1,default:"10px"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"del-block",style:t.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[t.createElementVNode("div",j0,[t.renderSlot(e.$slots,"title",{},void 0,!0)]),t.createElementVNode("div",W0,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),Q0={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},Y0={class:"edit-dialog-header"},X0={class:"edit-dialog-title"},Z0={class:"edit-dialog-content"},J0={key:0,class:"edit-dialog-actions"},Fa=v(t.defineComponent({__name:"PEditDialog",props:t.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},Q0),emits:["update:modelValue","confirm","close"],setup(n,{expose:e,emit:i}){const o=n,r=i,s=t.ref(!1);t.watch(()=>o.modelValue,h=>{s.value=h},{immediate:!0});const a=async()=>{r("confirm"),d()},d=()=>{r("close"),s.value=!1,r("update:modelValue",!1)},c=()=>{s.value&&d()};e({opened:s,toggle:()=>{s.value=!s.value,r("update:modelValue",s.value)}});const f=async()=>{await t.nextTick();const h=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');h&&"focus"in h&&h.focus()};return(h,m)=>{const b=t.resolveDirective("close-popup");return t.openBlock(),t.createBlock(Zi,{modelValue:t.unref(s),"onUpdate:modelValue":[m[0]||(m[0]=C=>t.isRef(s)?s.value=C:null),d],position:"top",onKeydown:[t.withKeys(a,["enter"]),t.withKeys(c,["escape"])],onShow:f},{default:t.withCtx(()=>[t.createElementVNode("div",{class:"edit-dialog",style:t.normalizeStyle({width:o.width})},[t.createElementVNode("div",Y0,[t.createElementVNode("div",X0,t.toDisplayString(o.title),1),t.withDirectives(t.createVNode(Ke,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[b]])]),t.createElementVNode("div",Z0,[t.renderSlot(h.$slots,"default",{},void 0,!0)]),o.showConfirm?(t.openBlock(),t.createElementBlock("div",J0,[t.withDirectives(t.createVNode(Ke,{flat:"",label:o.cancelLabel,size:"sm"},null,8,["label"]),[[b]]),t.createVNode(Ke,{flat:"",label:o.confirmLabel,color:"primary",disable:o.disabled,size:"sm",onClick:a},null,8,["label","disable"])])):t.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"])}}}),[["__scopeId","data-v-beb7df93"]]),Oa=v(t.defineComponent({__name:"PModal",props:{showCloseDialog:{type:Boolean,required:!1,default:!1},closable:{type:Boolean,required:!1,default:!1},show:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:String,default:"760px"},maxHeight:{type:String,default:"70vh"},margin:{type:String,default:"auto"},top:{type:String,default:"20vh"},padding:{type:String,default:"var(--modal-window-padding)"},showClose:{type:Boolean,default:!1}},emits:["save","close"],setup(n,{emit:e}){const i=n,o=e,r=a=>{a.key==="Escape"&&s()};t.onMounted(()=>{document.body.addEventListener("keydown",r)}),t.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{i.closable&&o("close")};return(a,d)=>{const c=t.resolveComponent("IconClose");return t.openBlock(),t.createElementBlock(t.Fragment,null,[n.show?(t.openBlock(),t.createElementBlock("div",{key:0,class:"blur",onClick:s})):t.createCommentVNode("",!0),n.show?(t.openBlock(),t.createElementBlock("div",{key:1,class:"modal-w",style:t.normalizeStyle({maxWidth:n.width,width:n.width,margin:n.margin,padding:n.padding,top:n.top,maxHeight:n.maxHeight})},[n.closable?(t.openBlock(),t.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[t.createVNode(c,{size:"20px"})])):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"default",{},void 0,!0)],4)):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function K0(n){n.component("CollapseContainer",f0),n.component("CollapseItem",y0),n.component("VerticalCollapseContainer",S0),n.component("PAdd",k0),n.component("PCard",za),n.component("PCrudList",Da),n.component("PEditDialog",Fa),n.component("PModal",Oa),n.component("PContainer",x0),n.component("PContainerStickyHead",B0),n.component("PDel",G0)}const ey={class:"btn-group"},_a=v(t.defineComponent({__name:"PAuthForm",props:{width:{type:String,default:"auto"},margin:{type:String,default:"auto"},padding:{type:String,default:"0"},background:{type:String,default:"inherit"}},emits:["submit"],setup(n,{emit:e}){const i=e,o=t.computed(()=>Ae.Form.GetButtons()),r=t.useTemplateRef("fields"),s=async d=>{if(!d.isSubmit){Ae.Form.SetChunk(d.GetChunk()),a();return}const c=Ae.Form.Validate();if(c.length>0){jt.Notify.Error(c.join("<br/>"));return}i("submit")},a=()=>{if(!r.value)return;const d=r.value[0];d&&d.$refs.input.focus()};return t.onMounted(async()=>{await a()}),t.onBeforeUnmount(()=>{Ae.Form.Reset()}),(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"auth-card",style:t.normalizeStyle({maxWidth:n.width,margin:n.margin,padding:n.padding,background:n.background})},[t.createVNode(ir,{string:t.unref(Ae).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(Ae).Form.GetFields(),u=>(t.openBlock(),t.createBlock(Gt,{id:u.id,key:u.id,ref_for:!0,ref_key:"fields",ref:r,modelValue:u.value,"onUpdate:modelValue":f=>u.value=f,autocomplete:"nope",type:u.IsPassword?"password":"text",placeholder:u.label,margin:"10px 0 0 0"},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder"]))),128)),t.createElementVNode("div",ey,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o),(u,f)=>(t.openBlock(),t.createBlock(Ke,{id:u.id,key:u.GetChunk(),disabled:t.unref(Ae).Form.IsBlock,type:f===0?t.unref(me).Success:t.unref(me).Primary,skin:"base",text:u.text,margin:"10px 0 0 0",width:"100%",onClick:h=>s(u)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),ty=t.defineComponent({__name:"PAuthModal",props:{width:{type:String,default:"320px"},margin:{type:String,default:"0"},padding:{type:String,default:"2vw"}},emits:["submit"],setup(n){const e=()=>{Ae.Form.Reset(),Ae.Modal.Close()};return(i,o)=>(t.openBlock(),t.createBlock(Oa,{show:t.unref(Ae).Modal.Visible,closable:t.unref(Ae).Modal.Closable,width:n.width,padding:n.padding,onClose:e},{default:t.withCtx(()=>[t.createVNode(_a,{margin:n.margin,padding:"0",onSubmit:o[0]||(o[0]=r=>i.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),ny={class:"field"},iy=v(t.defineComponent({__name:"PNameEdit",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(!1),s=t.ref(),a=t.ref(i.withName.name),d=t.ref(!1),c=()=>{d.value=!1},u=async()=>{a.value.trim(),i.withName.setName&&i.withName.setName(a.value),r.value=!r.value,o("submit")};return(f,h)=>{const m=t.resolveComponent("PString"),b=t.resolveComponent("PInput"),C=t.resolveComponent("InfoItem"),B=t.resolveComponent("PButton"),$=t.resolveComponent("el-form");return t.openBlock(),t.createBlock($,{ref_key:"form",ref:s,style:{width:"100%"}},{default:t.withCtx(()=>[t.createVNode(C,{title:"Название","show-save-dialog":d.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:c},{"open-inside-content":t.withCtx(()=>[t.createVNode(C,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:t.withCtx(()=>[t.createElementVNode("div",ny,[t.createVNode(b,{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=x=>a.value=x),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])])]),_:1}),t.createVNode(B,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:t.withCtx(()=>[a.value.length?(t.openBlock(),t.createBlock(m,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(t.openBlock(),t.createBlock(m,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-4f7966cb"]]),oy=["onClick"],ry=v(t.defineComponent({__name:"PTabs",props:{menus:{type:Object,required:!0},tabHeight:{type:String,required:!1,default:"40px"},height:{type:String,required:!1,default:""},minMenuItemWidth:{type:String,required:!1,default:"150px"},outTopMargin:{type:String,required:!1,default:"40px"},background:{type:String,required:!1,default:"#ffffff"},margin:{type:String,required:!1,default:"var(--tabs-margin, 0 10px 10px 10px)"},borderRadius:{type:String,required:!1,default:"var(--tabs-border-radius, 10px)"}},emits:["select"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(window.innerWidth),s=t.ref(),a=t.ref(Number(i.tabHeight.replace(/[^+\d]/g,""))),d=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(i.tabHeight.replace(/[^+\d]/g,""))};t.onMounted(()=>window.addEventListener("resize",d)),t.onUnmounted(()=>window.removeEventListener("resize",d));const c=t.computed(()=>`calc(100% - ${a.value}px + 1px)`);t.onBeforeMount(()=>{i.menus.Select()});const u=f=>{i.menus.Select(f),o("select")};return(f,h)=>(t.openBlock(),t.createElementBlock("div",{class:"mainblock",style:t.normalizeStyle({height:`calc(100% - ${n.outTopMargin} - ${n.tabHeight}`,margin:n.margin,borderRadius:n.borderRadius})},[t.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:t.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${n.minMenuItemWidth}, 1fr))`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.menus.items,(m,b)=>(t.openBlock(),t.createElementBlock("div",{key:b},[t.createElementVNode("div",{class:t.normalizeClass({"selected-tab":b===n.menus.idx,tab:b!==n.menus.idx}),style:t.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:C=>u(b)},t.toDisplayString(m.name),15,oy)]))),128))],4),t.createElementVNode("div",{class:"body-container",style:t.normalizeStyle({background:n.background,height:t.unref(c)})},[t.renderSlot(f.$slots,"default",{},()=>[n.menus.idx>-1?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.menus.GetComponent()),{key:0})):t.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-caa5b5d8"]]),sy=["id"],ay=["for"],ly={class:"left-field"},cy=["href","download"],dy={key:1,class:"text-field__input"},uy={class:"right-field"},fy=t.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Ge},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"Label",required:!1},margin:{type:String,required:!1,default:"10px 0 0 0"},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},placeholder:{type:String,required:!1,default:""}},emits:["upload","remove"],setup(n,{emit:e}){const i=n,o=e,r=De.GUID(),s=De.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!c(f.name)){Ct.Error(`Загруженный файл должен быть в одном из форматов: ${i.formats.join(", ")}`);return}const h=new Ge;h.setFile(f),h.url=URL.createObjectURL(f),o("upload",h)},d=()=>{o("remove")};t.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const c=u=>{let f=As.Get(u);return!!i.formats.includes(f.toLowerCase())};return(u,f)=>{const h=t.resolveComponent("PString"),m=t.resolveComponent("PFlex"),b=t.resolveComponent("PButton");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("input",{id:t.unref(r),type:"file",hidden:"",onChange:a},null,40,sy),t.createElementVNode("div",{class:"text-field",style:t.normalizeStyle({margin:n.margin,padding:n.padding})},[n.label?(t.openBlock(),t.createElementBlock("label",{key:0,class:"text-field__label",for:n.label},t.toDisplayString(n.label),9,ay)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"field",style:t.normalizeStyle({borderColor:n.borderColor})},[t.createElementVNode("div",ly,[t.createVNode(m,null,{default:t.withCtx(()=>[t.renderSlot(u.$slots,"default",{},void 0,!0),t.createVNode(h,{string:n.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),n.fileInfo&&n.fileInfo.originalName?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-field__input",style:t.normalizeStyle({color:n.color})},[t.createElementVNode("a",{href:n.fileInfo.getFileUrl(),target:"_blank",download:n.fileInfo.originalName},[t.createElementVNode("div",null,t.toDisplayString(n.fileInfo.originalName),1)],8,cy),t.createVNode(b,{skin:"text",type:"del",onClick:d},{default:t.withCtx(()=>[t.createVNode(Aa,{size:"20px",margin:"0 5px"})]),_:1})],4)):(t.openBlock(),t.createElementBlock("div",dy,[t.createVNode(h,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),t.createElementVNode("div",uy,[t.createVNode(b,{id:t.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:n.fileInfo&&n.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),hy=v(fy,[["__scopeId","data-v-8b73ee22"]]);function La(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),i.push.apply(i,o)}return i}function ae(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?La(Object(i),!0).forEach(function(o){dt(n,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):La(Object(i)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(i,o))})}return n}function dt(n,e,i){return e in n?Object.defineProperty(n,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[e]=i,n}function my(n,e){if(n==null)return{};var i,o,r=function(a,d){if(a==null)return{};var c,u,f={},h=Object.keys(a);for(u=0;u<h.length;u++)c=h[u],d.indexOf(c)>=0||(f[c]=a[c]);return f}(n,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o<s.length;o++)i=s[o],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(n,i)&&(r[i]=n[i])}return r}function fn(n){return function(e){if(Array.isArray(e))return rr(e)}(n)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(n)||function(e,i){if(e){if(typeof e=="string")return rr(e,i);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return rr(e,i)}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
26
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function rr(n,e){(e==null||e>n.length)&&(e=n.length);for(var i=0,o=new Array(e);i<e;i++)o[i]=n[i];return o}var Ha,py,Ki,Ne=(Ha=function(n){/*!
24
+ `)},k=p=>{const g=u(p);return[c(p),`${p.startTime}–${p.endTime}`,g?`${i.value.participants}: ${g}`:""].filter(Boolean).join(`
25
+ `)},$=(p,g)=>{var b;return{conflict:Er(p.item,g),dragging:((b=pt.value)==null?void 0:b.perfom.id)===g.id,[Un(p)]:!0}},M=t.ref(null),A=(p,g)=>{const b=p.getBoundingClientRect(),I=Math.min(Math.max((g-b.top)/b.height,0),1);return be.value.start+li(I*be.value.total,dn)},Y=(p,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||P.value||(M.value={gi:p,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",Ee),window.addEventListener("pointerup",F),window.addEventListener("pointercancel",te),window.addEventListener("keydown",he))},Ee=p=>{const g=M.value;if(g){if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<ka)return;g.moved=!0;const b=si(g.gi.item.startTime,g.gi.item.endTime);B.value={kind:g.gi.kind,id:g.gi.item.id,name:g.gi.item.name||(g.gi.kind==="session"?i.value.session:i.value.slot),duration:isFinite(b)&&b>0?b:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}Be(p.clientX,p.clientY),ne(p.clientX,p.clientY)}},Be=(p,g)=>{var $e,Ve;const b=document.elementFromPoint(p,g),I=b==null?void 0:b.closest(".hall-col"),H=I==null?void 0:I.getAttribute("data-schedule-id");if(!I||!H){x.value=void 0,N.value=null;return}const X=hi(H);if(!X)return;x.value=X.id;const ue=A(I,g);N.value={scheduleId:X.id,minutes:ue,time:it(ue),hallName:wt(X),...(($e=B.value)==null?void 0:$e.kind)==="slot"?{session:Tr(X.sessions,ue,ue+(((Ve=B.value)==null?void 0:Ve.duration)||30),de)}:{}},C.value={x:p,y:g}},ne=(p,g)=>{const b=Z.value;if(!b)return;const I=b.getBoundingClientRect();g<I.top+48?b.scrollTop-=14:g>I.bottom-48&&(b.scrollTop+=14),p<I.left+48?b.scrollLeft-=14:p>I.right-48&&(b.scrollLeft+=14)},F=p=>{_(p)},_=async p=>{const g=M.value;if(L(),M.value=null,!g||!g.moved)return;D.value=Date.now();const b=document.elementFromPoint(p.clientX,p.clientY),I=b==null?void 0:b.closest(".hall-col"),H=I==null?void 0:I.getAttribute("data-schedule-id"),X=H?hi(H):void 0;if(I&&X){const ue=A(I,p.clientY);await yl(X,ue)}U()},L=()=>{window.removeEventListener("pointermove",Ee),window.removeEventListener("pointerup",F),window.removeEventListener("pointercancel",te),window.removeEventListener("keydown",he)},U=()=>{M.value=null,B.value=null,x.value=void 0,N.value=null,C.value=null,document.body.style.userSelect="",document.body.style.cursor="",D.value=Date.now()},te=()=>{L(),U()},he=p=>{p.key==="Escape"&&te()};t.onBeforeUnmount(()=>{L(),Vr(),document.body.style.userSelect="",document.body.style.cursor=""});const ye=p=>{if(!p)return null;for(const g of e.days||[])for(const b of g.schedules||[]){const I=(b.sessions||[]).find(X=>X.id===p);if(I)return{kind:"session",item:I,schedule:b};const H=r(b).find(X=>X.id===p);if(H)return{kind:"slot",item:H,schedule:b}}return null},at=()=>{var p;return ye((p=B.value)==null?void 0:p.id)},fo=(p,g)=>{g.preventDefault(),g.stopPropagation();const b=p.item,I=de(b.startTime),H=de(b.endTime);if(!isFinite(I)||!isFinite(H))return;const X=g.clientY;P.value=!0;const ue=T=>{const Q=(T.clientY-X)/fe.value*60,J=li(H+Q,dn);b.endTime=it(Math.max(J,I+dn))},$e=async()=>{window.removeEventListener("pointermove",ue),window.removeEventListener("pointerup",Ve),P.value=!1,D.value=Date.now();const T=ye(b.id);T&&(await St(b,T.kind),await e.persist.refresh())},Ve=()=>{$e()};window.addEventListener("pointermove",ue),window.addEventListener("pointerup",Ve)},pt=t.ref(null),Mr=(p,g,b)=>{if(b.target.closest(".nested-edit, .nested-resize")||b.button!==0||P.value)return;const I=b.target.closest(".session-perfoms"),H=de(p.startTime),X=de(p.endTime),ue=si(g.startTime,g.endTime);!I||!isFinite(H)||!isFinite(X)||X<=H||(pt.value={perfom:g,session:p,startX:b.clientX,startY:b.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:H,sessionDur:X-H,durMin:isFinite(ue)&&ue>0?ue:30,container:I},window.addEventListener("pointermove",ml),window.addEventListener("pointerup",pl),window.addEventListener("pointercancel",Ir),window.addEventListener("keydown",gl))},ml=p=>{const g=pt.value;if(!g)return;if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<ka)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const b=g.container.getBoundingClientRect(),I=Math.min(Math.max((p.clientY-b.top)/b.height,0),1);let H=g.sessionStart+li(I*g.sessionDur,dn);const X=g.sessionStart+g.sessionDur-g.durMin;H=Math.min(Math.max(H,g.sessionStart),Math.max(X,g.sessionStart)),g.perfom.startTime=it(H),g.perfom.endTime=it(H+g.durMin),C.value={x:p.clientX,y:p.clientY}},pl=p=>{dw(p)},dw=async p=>{var ue;const g=pt.value;if(Vr(),pt.value=null,C.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;D.value=Date.now();const b=document.elementFromPoint(p.clientX,p.clientY),I=b==null?void 0:b.closest(".hall-col"),H=I==null?void 0:I.getAttribute("data-schedule-id"),X=H?hi(H):void 0;if(I&&X){B.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||i.value.slot,duration:g.durMin};const $e=A(I,p.clientY),Ve=it($e),T=si(g.perfom.startTime,g.perfom.endTime),Q=cn(Ve,T>0?T:30),J=((ue=Sl(g.perfom))==null?void 0:ue.id)===X.id&&g.perfom.startTime===Ve&&g.perfom.endTime===Q;await yl(X,$e),J&&(await e.persist.updateSlot(g.perfom),await e.persist.refresh()),B.value=null;return}g.perfom.startTime=zn(g.perfom.startTime),g.perfom.endTime=zn(g.perfom.endTime),g.perfom.startTime&&(await e.persist.updateSlot(g.perfom),await e.persist.refresh())},Ir=()=>{const p=pt.value;Vr(),p&&(p.perfom.startTime=p.savedStart,p.perfom.endTime=p.savedEnd),pt.value=null,C.value=null,document.body.style.userSelect="",document.body.style.cursor=""},Vr=()=>{window.removeEventListener("pointermove",ml),window.removeEventListener("pointerup",pl),window.removeEventListener("pointercancel",Ir),window.removeEventListener("keydown",gl)},gl=p=>{p.key==="Escape"&&Ir()},uw=(p,g,b)=>{b.preventDefault(),b.stopPropagation();const I=de(p.startTime),H=de(p.endTime),X=de(g.startTime),ue=b.target.closest(".nested-perfom"),$e=ue==null?void 0:ue.closest(".session-perfoms");if(!ue||!$e||!isFinite(I)||!isFinite(H)||H<=I||!isFinite(X))return;const Ve=$e.getBoundingClientRect(),T=H-I;P.value=!0;const Q=gn=>{const yw=Math.min(Math.max((gn.clientY-Ve.top)/Ve.height,0),1),ww=Math.min(Math.max(X+dn,I+li(yw*T,dn)),H);g.endTime=it(ww)},J=async()=>{window.removeEventListener("pointermove",Q),window.removeEventListener("pointerup",q),P.value=!1,D.value=Date.now(),await e.persist.updateSlot(g),await e.persist.refresh()},q=()=>{J()};window.addEventListener("pointermove",Q),window.addEventListener("pointerup",q)},yl=async(p,g)=>{var Q;x.value=void 0,N.value=null,C.value=null;const b=at();if(!b)return;const I=it(g),H=si(b.item.startTime,b.item.endTime),X=cn(I,H>0?H:30);if(((Q=b.schedule)==null?void 0:Q.id)===p.id&&b.item.startTime===I&&b.item.endTime===X)return;const ue=b.item.startTime;if(b.item.startTime=I,b.item.endTime=X,b.kind==="slot"){const J=Tr(p.sessions,de(I),de(X),de);J?b.item.sessionId=J.id:delete b.item.sessionId}if(b.kind==="session"){const J=de(I)-de(ue);for(const q of We(b.item))q.startTime&&(q.startTime=cn(q.startTime,J),q.endTime&&(q.endTime=cn(q.endTime,J)),q.scheduleId=p.id,await St(q,"slot"))}const $e=b.schedule,Ve=b.kind==="session"?p.sessions:r(p),T=b.item;if($e&&$e.id!==p.id){T.scheduleId=p.id;const J=b.kind==="session"?$e.sessions:r($e);R.H.Classes.RemoveFromClassById(T.id,J,[]),Ve.push(T)}await St(T,b.kind),await e.persist.refresh()},fw=async(p,g)=>{if(g.target.closest(".timeline-block"))return;const b=A(g.currentTarget,g.clientY),I=o.value.createSlot(p);I.startTime=it(b),I.endTime=it(b+30);const H=Tr(p.sessions,b,b+30,de);H!=null&&H.id&&(I.sessionId=H.id),await e.persist.createSlot(I),await e.persist.refresh();const X=ye(I.id);X&&mi(X)},wl=async(p,g,b)=>{if(p.added){if(p.added.element.scheduleId=g.id,b==="slot"&&p.added.element.sessionId&&((g.sessions||[]).some(H=>H.id===p.added.element.sessionId)||delete p.added.element.sessionId),await St(p.added.element,b),b==="session")for(const I of s(p.added.element))I.scheduleId=g.id,await e.persist.updateSlot(I);await e.persist.refresh()}},hi=p=>{for(const g of e.days||[]){const b=(g.schedules||[]).find(I=>I.id===p);if(b)return b}},Tr=(p,g,b,I)=>ba(p,g,b,I),bl=p=>((p==null?void 0:p.sessions)||[]).map(g=>({id:g.id,label:d(g)})),Sl=p=>{for(const g of e.days||[])for(const b of g.schedules||[])if(r(b).some(I=>I.id===p.id)||p.sessionId&&(b.sessions||[]).some(I=>I.id===p.sessionId))return b},Cl=t.computed(()=>{const p=E.value;if(p)return p.kind==="session"?hi(p.item.scheduleId)||mw(p.item):Sl(p.item)}),hw=t.computed(()=>{const p=E.value;return!p||p.kind!=="slot"?[]:bl(Cl.value)}),mw=(p,g)=>{for(const b of e.days||[])for(const I of b.schedules||[])if((I.sessions||[]).some(H=>H.id===p.id))return I},kl=async(p,g)=>{g?p.sessionId=g:delete p.sessionId,await e.persist.updateSlot(p),await e.persist.refresh()},xl=async p=>{const g=o.value.createSession(p);await e.persist.createSession(g),await e.persist.refresh()},El=async p=>{const g=o.value.createSlot(p),b=[...r(p)].sort(nr).slice(-1)[0];g.startTime=zn(b==null?void 0:b.endTime)||"9:00",g.endTime=cn(g.startTime,30),await e.persist.createSlot(g),await e.persist.refresh()},Rr=async(p,g)=>{if(g==="slot")await e.persist.removeSlot(p);else{for(const b of s(p))delete b.sessionId,await e.persist.updateSlot(b);await e.persist.removeSession(p)}await e.persist.refresh()},St=async(p,g)=>{const b=zn(p.startTime),I=zn(p.endTime);if(!b){e.persist.notify("warning",i.value.correctStartTime);return}p.startTime=b,p.endTime=I||cn(b,30),g==="slot"?await e.persist.updateSlot(p):await e.persist.updateSession(p)},mi=p=>{P.value||Date.now()-D.value<400||(E.value={kind:p.kind,item:p.item},w.value=!0)},pw=async()=>{const p=E.value;p&&(await St(p.item,p.kind),w.value=!1,E.value=null,await e.persist.refresh())},gw=async()=>{const p=E.value;p&&(await Rr(p.item,p.kind),w.value=!1,E.value=null)};return e.persist.loadOptions&&e.persist.loadOptions(),(p,g)=>{var $e,Ve;const b=t.resolveComponent("PButton"),I=t.resolveComponent("PInput"),H=t.resolveComponent("PTooltip"),X=t.resolveComponent("PSelect"),ue=t.resolveComponent("PDialog");return t.openBlock(),t.createElementBlock("div",rm,[($e=n.days)!=null&&$e.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",am,[t.createVNode(t.unref(V.QTabs),{modelValue:h.value,"onUpdate:modelValue":g[0]||(g[0]=T=>h.value=T),dense:"",class:"day-tabs","active-color":"primary"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Pe.value,T=>(t.openBlock(),t.createBlock(t.unref(V.QTab),{key:T.id,name:T.id,label:fn(T)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"]),t.createVNode(t.unref(V.QSpace)),ke.value?(t.openBlock(),t.createBlock(I,{key:0,"model-value":Ye(ke.value.date),label:i.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=T=>Nt(ke.value,T))},null,8,["model-value","label"])):t.createCommentVNode("",!0),t.createVNode(b,{size:"sm",color:"negative",outline:"",icon:"delete",label:i.value.deleteDay,disable:!ke.value,onClick:g[2]||(g[2]=T=>Mt(ke.value))},null,8,["label","disable"]),t.createVNode(b,{size:"sm",color:"primary",outline:"",icon:"event",label:i.value.addDay,onClick:Ot},null,8,["label"]),t.createVNode(b,{size:"sm",color:"primary",outline:"",icon:"add",label:i.value.addHall,onClick:nt},null,8,["label"]),f.value==="grid"?(t.openBlock(),t.createElementBlock("div",lm,[t.createVNode(t.unref(V.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),t.createVNode(t.unref(V.QBtnToggle),{modelValue:fe.value,"onUpdate:modelValue":g[3]||(g[3]=T=>fe.value=T),"toggle-color":"primary",options:K,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QBtnToggle),{modelValue:f.value,"onUpdate:modelValue":g[4]||(g[4]=T=>f.value=T),"toggle-color":"primary",options:[{label:i.value.grid,value:"grid",icon:"calendar_view_week"},{label:i.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),f.value==="grid"?(t.openBlock(),t.createElementBlock("div",cm,[mt(ke.value).length?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:Z,class:"grid-scroll"},[t.createElementVNode("div",{class:"grid-wrap",style:t.normalizeStyle({"--halls":mt(ke.value).length,"--hours":Math.max(be.value.total/60,1),"--half-hours":Math.max(be.value.total/60*2,2)})},[t.createElementVNode("div",um,[g[15]||(g[15]=t.createElementVNode("div",{class:"time-gutter"},null,-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(mt(ke.value),T=>(t.openBlock(),t.createElementBlock("div",{key:T.id,class:t.normalizeClass(["hall-head",{"drag-over":x.value===T.id}])},[t.createElementVNode("div",fm,[t.createVNode(t.unref(V.QIcon),{name:"meeting_room",size:"15px"}),t.createElementVNode("span",hm,t.toDisplayString(wt(T)),1),t.createVNode(b,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:Q=>El(T)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),t.createVNode(b,{size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:Q=>xl(T)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.addSession),1)]),_:1})]),_:1},8,["onClick"]),t.createVNode(b,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>ge(T)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])],2))),128))]),t.createElementVNode("div",{class:"grid-body",style:t.normalizeStyle({height:Qe.value})},[t.createElementVNode("div",mm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ze.value,T=>(t.openBlock(),t.createElementBlock("div",{key:T.min,class:"hour-label",style:t.normalizeStyle({top:(T.min-be.value.start)/be.value.total*100+"%"})},t.toDisplayString(T.label),5))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ee.value,T=>(t.openBlock(),t.createElementBlock("div",{key:T.min,class:"half-label",style:t.normalizeStyle({top:(T.min-be.value.start)/be.value.total*100+"%"})},t.toDisplayString(T.label),5))),128))]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(mt(ke.value),T=>(t.openBlock(),t.createElementBlock("div",{key:T.id,class:t.normalizeClass(["hall-col",{"drag-over":x.value===T.id}]),"data-schedule-id":T.id,onDblclick:Q=>fw(T,Q)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Me(T),Q=>{var J;return t.openBlock(),t.createElementBlock("div",{key:Q.item.id,class:t.normalizeClass(["timeline-block",[Q.kind,{conflict:uo(T,Q),dragging:((J=B.value)==null?void 0:J.id)===Q.item.id},Un(Q)]]),style:t.normalizeStyle(Ie(Q)),title:fi(Q),onPointerdown:q=>Y(Q,q),onClick:q=>mi(Q)},[t.createVNode(t.unref(V.QIcon),{name:"drag_indicator",class:"drag-handle"}),t.createElementVNode("div",ym,[t.createElementVNode("div",wm,t.toDisplayString(Q.item.startTime)+"–"+t.toDisplayString(Q.item.endTime),1),t.createElementVNode("div",bm,t.toDisplayString($r(Q)),1),Q.kind==="slot"&&u(Q.item)?(t.openBlock(),t.createElementBlock("div",Sm,t.toDisplayString(u(Q.item)),1)):t.createCommentVNode("",!0)]),Q.kind==="session"&&We(Q.item).length?(t.openBlock(),t.createElementBlock("div",Cm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(We(Q.item),q=>(t.openBlock(),t.createElementBlock("div",{key:q.id,class:t.normalizeClass(["nested-perfom",$(Q,q)]),style:t.normalizeStyle(Br(Q.item,q)),title:k(q),onPointerdown:t.withModifiers(gn=>Mr(Q.item,q,gn),["stop"]),onClick:t.withModifiers(gn=>mi({kind:"slot",item:q}),["stop"])},[t.createElementVNode("div",xm,t.toDisplayString(q.startTime)+"–"+t.toDisplayString(q.endTime),1),t.createElementVNode("div",Em,t.toDisplayString(Nr(q,Un(Q))),1),u(q)?(t.openBlock(),t.createElementBlock("div",Bm,t.toDisplayString(u(q)),1)):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),t.createElementVNode("div",{class:"nested-resize",title:i.value.changeDurationTitle,onPointerdown:t.withModifiers(gn=>uw(Q.item,q,gn),["stop","prevent"])},null,40,$m)],46,km))),128))])):t.createCommentVNode("",!0),t.createElementVNode("div",Nm,[uo(T,Q)?(t.openBlock(),t.createBlock(t.unref(V.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.conflictTitle),1)]),_:1})]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:t.withModifiers(q=>mi(Q),["stop"])},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),t.createElementVNode("div",{class:"block-resize",title:i.value.changeDurationTitle,onPointerdown:t.withModifiers(q=>fo(Q,q),["stop","prevent"])},null,40,Mm)],46,gm)}),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(hn(T),Q=>{var J;return t.openBlock(),t.createElementBlock("div",{key:"spine-"+Q.item.id,class:t.normalizeClass(["session-spine",{dragging:((J=B.value)==null?void 0:J.id)===Q.item.id}]),style:t.normalizeStyle(Ie(Q)),title:d(Q.item)},[t.createVNode(t.unref(V.QIcon),{name:"groups",size:"11px"}),t.createElementVNode("span",Vm,t.toDisplayString(d(Q.item)),1)],14,Im)}),128)),N.value&&N.value.scheduleId===T.id&&B.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["drop-zone",{conflict:Vt.value}]),style:t.normalizeStyle(mn.value)},null,6)):t.createCommentVNode("",!0),N.value&&N.value.scheduleId===T.id&&B.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["drop-preview",[B.value.kind,{conflict:Vt.value}]]),style:t.normalizeStyle(rt.value)},[t.createElementVNode("div",Tm,[t.createTextVNode(t.toDisplayString(N.value.time)+"–"+t.toDisplayString(st.value)+" ",1),N.value.session?(t.openBlock(),t.createElementBlock("span",Rm,t.toDisplayString(i.value.intoSession),1)):t.createCommentVNode("",!0),bt.value?(t.openBlock(),t.createElementBlock("span",Pm," ⚠ "+t.toDisplayString(i.value.conflictCount)+": "+t.toDisplayString(bt.value),1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",vm,t.toDisplayString(B.value.name),1)],6)):t.createCommentVNode("",!0)],42,pm))),128))],4),t.createElementVNode("div",Am,t.toDisplayString(i.value.gridHint),1)],4)],512)):(t.openBlock(),t.createElementBlock("div",dm,[t.createTextVNode(t.toDisplayString(i.value.noHalls)+" ",1),t.createVNode(b,{flat:"",color:"primary",size:"sm",label:i.value.addHall,onClick:nt},null,8,["label"])])),C.value&&N.value?(t.openBlock(),t.createElementBlock("div",{key:2,class:"drag-time-chip",style:t.normalizeStyle({left:C.value.x+"px",top:C.value.y+"px"})},[t.createVNode(t.unref(V.QIcon),{name:"schedule",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(N.value.time)+" · "+t.toDisplayString(N.value.hallName)+" ",1),N.value.session?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[g[16]||(g[16]=t.createTextVNode(" · ",-1)),t.createVNode(t.unref(V.QIcon),{name:"groups",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(i.value.intoSession)+" «"+t.toDisplayString(d(N.value.session))+"» ",1)],64)):t.createCommentVNode("",!0),bt.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[g[17]||(g[17]=t.createTextVNode(" · ",-1)),t.createVNode(t.unref(V.QIcon),{name:"warning",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(bt.value),1)],64)):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0),(Ve=pt.value)!=null&&Ve.moved&&C.value?(t.openBlock(),t.createElementBlock("div",{key:3,class:"drag-time-chip",style:t.normalizeStyle({left:C.value.x+"px",top:C.value.y+"px"})},[t.createVNode(t.unref(V.QIcon),{name:"schedule",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(pt.value.perfom.startTime)+"–"+t.toDisplayString(pt.value.perfom.endTime)+" · "+t.toDisplayString(i.value.intoSession),1)],4)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",zm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(mt(ke.value),T=>(t.openBlock(),t.createBlock(t.unref(V.QCard),{key:T.id,class:"hall-card q-mb-md"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCardSection),{class:"hall-card-head"},{default:t.withCtx(()=>[t.createElementVNode("div",Dm,[t.createVNode(t.unref(V.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),t.createElementVNode("span",Fm,t.toDisplayString(wt(T)),1),t.createVNode(t.unref(V.QSpace)),t.createVNode(b,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.session,onClick:Q=>xl(T)},null,8,["label","onClick"]),t.createVNode(b,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.slot,onClick:Q=>El(T)},null,8,["label","onClick"]),t.createVNode(b,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>ge(T)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])]),_:2},1024),t.createVNode(t.unref(V.QCardSection),{class:"q-pt-none"},{default:t.withCtx(()=>{var Q;return[(Q=T.sessions)!=null&&Q.length?(t.openBlock(),t.createElementBlock("div",Om,[t.createElementVNode("div",_m,[t.createVNode(t.unref(V.QIcon),{name:"groups",size:"15px"}),t.createTextVNode(" "+t.toDisplayString(i.value.sessionsTitle),1)]),t.createVNode(t.unref(mo),{list:T.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:J=>wl(J,T,"session")},{item:t.withCtx(({element:J})=>[t.createElementVNode("div",Lm,[t.createVNode(t.unref(V.QIcon),{name:"drag_indicator",class:"drag-handle"}),t.createVNode(I,{"model-value":J.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":q=>J.name=q,onBlur:q=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.startTime=q,onBlur:q=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.endTime=q,onBlur:q=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.renderSlot(p.$slots,"session-row-extra",{element:J,schedule:T},void 0,!0),t.createVNode(b,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:q=>Rr(J,"session")},null,8,["onClick"])]),We(J).length?(t.openBlock(),t.createElementBlock("div",Hm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(We(J),q=>(t.openBlock(),t.createElementBlock("div",{key:q.id,class:"list-row nested-row"},[t.createVNode(t.unref(V.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),t.createElementVNode("div",Um,t.toDisplayString(c(q)),1),t.createElementVNode("div",qm,t.toDisplayString(q.startTime)+"–"+t.toDisplayString(q.endTime),1),t.createVNode(t.unref(V.QSpace)),t.createVNode(b,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:gn=>mi({kind:"slot",item:q})},null,8,["onClick"])]))),128))])):t.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):t.createCommentVNode("",!0),t.createElementVNode("div",jm,[t.createElementVNode("div",Wm,[t.createVNode(t.unref(V.QIcon),{name:"mic",size:"15px"}),t.createTextVNode(" "+t.toDisplayString(i.value.slotsTitle),1)]),t.createVNode(t.unref(mo),{list:_t(T),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:J=>wl(J,T,"slot")},{item:t.withCtx(({element:J})=>[t.createElementVNode("div",Gm,[t.createVNode(t.unref(V.QIcon),{name:"drag_indicator",class:"drag-handle"}),t.createVNode(I,{"model-value":J.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":q=>J.name=q,onBlur:q=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.startTime=q,onBlur:q=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.endTime=q,onBlur:q=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(X,{"model-value":J.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:bl(T),"option-value":"id","option-label":"label","onUpdate:modelValue":q=>kl(J,q)},null,8,["model-value","label","options","onUpdate:modelValue"]),t.renderSlot(p.$slots,"slot-row-extra",{element:J,schedule:T},void 0,!0),t.createVNode(b,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:q=>Rr(J,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!_t(T).length&&!Hn(T)?(t.openBlock(),t.createElementBlock("div",Qm,t.toDisplayString(i.value.noSlotsInDay),1)):t.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),t.createElementVNode("div",Ym,t.toDisplayString(i.value.listHint),1)]))],64)):(t.openBlock(),t.createElementBlock("div",sm,[t.createVNode(t.unref(V.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),t.createElementVNode("div",null,t.toDisplayString(i.value.noDays),1),t.createVNode(b,{color:"primary",outline:"",label:i.value.addDay,icon:"event",class:"q-mt-sm",onClick:Ot},null,8,["label"])])),t.createVNode(ue,{modelValue:m.value,"onUpdate:modelValue":g[7]||(g[7]=T=>m.value=T)},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCard),{style:{width:"700px","max-width":"80vw"}},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCardSection),null,{default:t.withCtx(()=>[t.createElementVNode("div",Xm,t.toDisplayString(i.value.addHall),1)]),_:1}),t.createVNode(t.unref(V.QCardSection),null,{default:t.withCtx(()=>[t.createElementVNode("div",Zm,[t.createVNode(I,{modelValue:S.value,"onUpdate:modelValue":g[5]||(g[5]=T=>S.value=T),label:i.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:t.withKeys(It,["enter"])},null,8,["modelValue","label"]),t.createVNode(b,{color:"primary",label:i.value.create,icon:"add",dense:"",onClick:It},null,8,["label"])]),t.renderSlot(p.$slots,"places-list",{day:ke.value,add:Le},()=>[we.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Jm,t.toDisplayString(i.value.noHalls),1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(we.value,T=>(t.openBlock(),t.createElementBlock("div",{key:T.id,class:"place-row row items-center q-gutter-sm"},[t.createVNode(t.unref(V.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),t.createElementVNode("span",Km,t.toDisplayString(a(T)),1),t.createVNode(b,{size:"sm",color:"primary",outline:"",label:i.value.addHall,icon:"add",dense:"",onClick:Q=>Le(T)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),t.createVNode(t.unref(V.QCardActions),{align:"right"},{default:t.withCtx(()=>[t.createVNode(b,{label:i.value.close,color:"primary",onClick:g[6]||(g[6]=T=>m.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),t.createVNode(ue,{modelValue:w.value,"onUpdate:modelValue":g[14]||(g[14]=T=>w.value=T)},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCard),{style:{width:"640px","max-width":"90vw"}},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCardSection),null,{default:t.withCtx(()=>{var T;return[t.createElementVNode("div",ep,t.toDisplayString(((T=E.value)==null?void 0:T.kind)==="session"?i.value.session:i.value.slot),1)]}),_:1}),E.value?(t.openBlock(),t.createBlock(t.unref(V.QCardSection),{key:0,class:"q-pt-none"},{default:t.withCtx(()=>[t.createVNode(I,{modelValue:E.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=T=>E.value.item.name=T),label:i.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),t.createElementVNode("div",tp,[t.createElementVNode("div",np,[t.createVNode(I,{modelValue:E.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=T=>E.value.item.startTime=T),label:i.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),t.createElementVNode("div",ip,[t.createVNode(I,{modelValue:E.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=T=>E.value.item.endTime=T),label:i.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),E.value.kind==="slot"?(t.openBlock(),t.createBlock(X,{key:0,"model-value":E.value.item.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:hw.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=T=>kl(E.value.item,T))},null,8,["model-value","label","options"])):t.createCommentVNode("",!0),t.renderSlot(p.$slots,"edit-form",{kind:E.value.kind,item:E.value.item,schedule:Cl.value},void 0,!0),E.value.kind==="slot"?(t.openBlock(),t.createBlock(I,{key:1,modelValue:E.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=T=>E.value.item.description=T),label:i.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):t.createCommentVNode("",!0)]),_:3})):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QCardActions),{align:"right"},{default:t.withCtx(()=>[E.value?(t.openBlock(),t.createBlock(b,{key:0,flat:"",color:"negative",label:i.value.delete,onClick:gw},null,8,["label"])):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QSpace)),t.createVNode(b,{flat:"",label:i.value.cancel,color:"primary",onClick:g[13]||(g[13]=T=>w.value=!1)},null,8,["label"]),t.createVNode(b,{label:i.value.save,color:"primary",onClick:pw},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"])])}}}),[["__scopeId","data-v-cfbff9e3"]]),op={class:"schedule-timeline"},rp={key:0,class:"timeline-container"},sp={class:"day-header"},ap={class:"day-title"},lp={class:"timeline"},cp={key:0,class:"schedule-place"},dp={class:"events-column"},up={key:0,class:"event-item session-item"},fp={class:"event-content"},hp={class:"event-time"},mp={class:"event-main"},pp={class:"event-name"},gp={key:0,class:"speakers-list"},yp=["onClick"],wp={class:"speaker-details"},bp={class:"speaker-name"},Sp={class:"bio-text"},Cp=["onClick"],kp={key:0,class:"perfom-divider"},xp={class:"event-content"},Ep={class:"event-time"},Bp={class:"event-main"},$p={class:"event-name"},Np={class:"event-badges"},Mp={key:0,class:"speakers-list"},Ip=["onClick"],Vp={class:"speaker-details"},Tp={class:"speaker-name"},Rp={class:"bio-text"},Pp={key:1,class:"no-program"},Ea=v(t.defineComponent({__name:"ScheduleTimeline",props:{days:{},dayTitle:{type:Function,default:void 0},placeName:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotParticipants:{type:Function,default:void 0},sessionParticipants:{type:Function,default:void 0},participantName:{type:Function,default:void 0},participantBio:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},noProgramText:{default:"Программа пока не опубликована"},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0},slotClickable:{type:Boolean,default:!1}},emits:["open-participant","slot-click"],setup(n,{emit:e}){const i=n,o=e,r=t.computed(()=>({noProgram:i.noProgramText||"Программа пока не опубликована"})),s=C=>{if(i.dayTitle)return i.dayTitle(C);const P=new Date(C.date);return isNaN(P.getTime())||P.getFullYear()<2e3?"":P.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=C=>{var P;return i.placeName?i.placeName(C):((P=C.place)==null?void 0:P.name)||C.placeName||""},d=C=>i.slotName?i.slotName(C):(C==null?void 0:C.name)||"",c=C=>i.sessionName?i.sessionName(C):(C==null?void 0:C.name)||"",u=C=>i.slotParticipants?i.slotParticipants(C):(C==null?void 0:C.participants)||[],f=C=>i.sessionParticipants?i.sessionParticipants(C):(C==null?void 0:C.participants)||[],h=C=>{var P,D;return i.participantName?i.participantName(C):(C==null?void 0:C.name)||(C==null?void 0:C.fullName)||((D=(P=C==null?void 0:C.human)==null?void 0:P.getFullName)==null?void 0:D.call(P))||""},m=C=>i.participantBio?i.participantBio(C):(C==null?void 0:C.bio)||(C==null?void 0:C.regalias)||"",S=C=>i.slotListOf?i.slotListOf(C):(C==null?void 0:C.slots)||[],w=C=>i.nestedSlotListOf?i.nestedSlotListOf(C):(C==null?void 0:C.slots)||[],E=C=>C.schedules.filter(P=>{var D;return S(P).length>0||(((D=P.sessions)==null?void 0:D.length)||0)>0}),B=C=>{const P=[],D=new Set((C.sessions||[]).map(K=>K.id));for(const K of C.sessions||[]){P.push({kind:"session",item:K,nested:!1,index:0});for(const fe of w(K))P.push({kind:"slot",item:fe,nested:!0,index:0})}let Z=0;for(const K of S(C).filter(fe=>!fe.sessionId||!D.has(fe.sessionId)))P.push({kind:"slot",item:K,nested:!1,index:Z++});return P},x=t.computed(()=>{var C;return(C=i.days)==null?void 0:C.some(P=>{var D;return(D=P.schedules)==null?void 0:D.some(Z=>{var K;return S(Z).length>0||(((K=Z.sessions)==null?void 0:K.length)||0)>0})})}),N=(C,P)=>`${C} - ${P}`;return(C,P)=>(t.openBlock(),t.createElementBlock("div",op,[x.value?(t.openBlock(),t.createElementBlock("div",rp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.days,D=>(t.openBlock(),t.createElementBlock("div",{key:D.id,class:"day-section"},[t.createElementVNode("div",sp,[t.createElementVNode("div",ap,[t.createVNode(t.unref(V.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),t.createTextVNode(" "+t.toDisplayString(s(D)),1)])]),t.createElementVNode("div",lp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(E(D),Z=>(t.openBlock(),t.createElementBlock("div",{key:Z.id,class:"time-slot"},[a(Z)?(t.openBlock(),t.createElementBlock("div",cp,[t.createVNode(t.unref(V.QIcon),{name:"meeting_room",size:"14px"}),t.createTextVNode(" "+t.toDisplayString(a(Z)),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",dp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B(Z),K=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:K.item.id},[K.kind==="session"?(t.openBlock(),t.createElementBlock("div",up,[t.createElementVNode("div",fp,[t.createElementVNode("div",hp,t.toDisplayString(N(K.item.startTime,K.item.endTime)),1),t.createElementVNode("div",mp,[t.createElementVNode("div",pp,t.toDisplayString(c(K.item)),1),f(K.item).length?(t.openBlock(),t.createElementBlock("div",gp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f(K.item),fe=>(t.openBlock(),t.createElementBlock("div",{key:fe.id,class:"speaker-item",onClick:ht=>o("open-participant",fe)},[t.createElementVNode("div",wp,[t.createElementVNode("div",bp,[t.createVNode(t.unref(V.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),t.createTextVNode(" "+t.toDisplayString(h(fe)),1)]),t.createElementVNode("div",Sp,t.toDisplayString(m(fe)),1)])],8,yp))),128))])):t.createCommentVNode("",!0)])])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["event-item",[{"event-active":K.item.active,"nested-item":K.nested},{clickable:i.slotClickable}]]),onClick:fe=>i.slotClickable&&o("slot-click",K.item)},[!K.nested&&K.index>0?(t.openBlock(),t.createElementBlock("div",kp)):t.createCommentVNode("",!0),t.createElementVNode("div",xp,[t.createElementVNode("div",Ep,t.toDisplayString(N(K.item.startTime,K.item.endTime)),1),t.createElementVNode("div",Bp,[t.createElementVNode("div",$p,t.toDisplayString(d(K.item)),1),t.createElementVNode("div",Np,[t.renderSlot(C.$slots,"badges",{item:K.item},void 0,!0)]),u(K.item).length?(t.openBlock(),t.createElementBlock("div",Mp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u(K.item),fe=>(t.openBlock(),t.createElementBlock("div",{key:fe.id,class:"speaker-item",onClick:ht=>o("open-participant",fe)},[t.createElementVNode("div",Vp,[t.createElementVNode("div",Tp,[t.createVNode(t.unref(V.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),t.createTextVNode(" "+t.toDisplayString(h(fe)),1)]),t.createElementVNode("div",Rp,t.toDisplayString(m(fe)),1)])],8,Ip))),128))])):t.createCommentVNode("",!0)])])],10,Cp))],64))),128))])]))),128))])]))),128))])):(t.openBlock(),t.createElementBlock("div",Pp,[t.createVNode(t.unref(V.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),t.createElementVNode("p",null,t.toDisplayString(r.value.noProgram),1)])),t.renderSlot(C.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),vp=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:xa,ScheduleTimeline:Ea},Symbol.toStringTag,{value:"Module"})),Ap=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:cn,blockSizeClass:Sa,blockStyle:pa,byStart:nr,diffM:si,findEnclosingSession:ba,fromMin:it,gridBounds:ma,hasConflict:ya,intersects:ai,nestedConflict:wa,nestedSlotStyle:ga,normTime:zn,snapMinutes:li,toMin:de},Symbol.toStringTag,{value:"Module"}));let zp=class extends ce{constructor(){super(Yi,"schedule-days")}};const Dp=new zp;let Fp=class extends ce{constructor(){super(An,"schedule-places")}};const Op=new Fp;let _p=class extends ce{constructor(){super(vn,"schedule-sessions")}};const Lp=new _p;let Hp=class extends ce{constructor(){super(vt,"schedule-slots")}};const Up=new Hp;let qp=class extends ce{constructor(){super(ri,"schedule-timetables")}};const jp=new qp,Wp=Object.freeze(Object.defineProperty({__proto__:null,C:om,Components:vp,H:Ap,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Dp,SchedulePlacesStore:Op,ScheduleSessionsStore:Lp,ScheduleSlotsStore:Up,SchedulesStore:jp},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:Ca,defaultScheduleLabels:ir},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Gp=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:ii},Symbol.toStringTag,{value:"Module"}));let Qp=class extends ce{constructor(){super(ii,"color-themes")}};const Yp=new Qp,Xp=Object.freeze(Object.defineProperty({__proto__:null,Buildings:Ef,Chats:Rf,Docs:qf,Extracts:Yf,Forms:Sh,Menus:Mh,Pages:Jh,Schedule:Wp,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:Gp,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Yp},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Ba=t.defineComponent({inheritAttrs:!1,__name:"PBadge",props:{label:{type:[String,Number],default:void 0},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},floating:{type:Boolean,default:!1},multiLine:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1}},setup(n){const e=t.useAttrs(),i=t.computed(()=>{const o={};for(const r of Object.keys(e))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(o[r]=e[r]);return o});return(o,r)=>(t.openBlock(),t.createBlock(t.unref(V.QBadge),t.mergeProps(t.unref(i),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,rounded:n.rounded,floating:n.floating,"multi-line":n.multiLine,transparent:n.transparent}),{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),_:3},16,["label","color","text-color","outline","rounded","floating","multi-line","transparent"]))}}),Ke=t.defineComponent({inheritAttrs:!1,__name:"PButton",props:{text:{type:String,default:"",required:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},skin:{type:String,default:"base",required:!1},size:{type:String,default:Ut.M,required:!1},type:{type:String,default:me.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const e=n,i=t.useAttrs(),o=t.computed(()=>{const x={};for(const N of Object.keys(i))["disable","color","size","flat","outline","unelevated","type"].includes(N)||(x[N]=i[N]);return x}),r=["submit","button","reset"],s=t.computed(()=>r.includes(e.type)),a=t.computed(()=>s.value?e.type:void 0),d=t.computed(()=>s.value?me.Primary:e.type),c=t.computed(()=>{const x={};return e.margin&&(x.margin=e.margin),e.padding&&(x.padding=e.padding),e.width&&(x.maxWidth=e.width,x.minWidth=e.width),e.height&&(x.minHeight=e.height,x.maxHeight=e.height),e.fontSize&&(x.fontSize=e.fontSize),x}),u={[me.Primary]:"primary",[me.Success]:"positive",[me.Warning]:"warning",[me.Error]:"negative",[me.Info]:"info"},f=t.computed(()=>i.color!==void 0?i.color:u[d.value]??"primary"),h={[Ut.XS]:"xs",[Ut.S]:"sm",[Ut.M]:"md",[Ut.L]:"lg",[Ut.XL]:"xl"},m=t.computed(()=>i.size!==void 0?i.size:["xs","sm","md","lg","xl"].includes(e.size)?e.size:h[e.size]??"md"),S=t.computed(()=>i.flat!==void 0?i.flat:["text","pag","text_ano"].includes(e.skin)),w=t.computed(()=>i.outline!==void 0?i.outline:e.skin==="invert"),E=t.computed(()=>i.unelevated!==void 0?i.unelevated:e.skin==="base"),B=t.computed(()=>i.disable??e.disabled);return(x,N)=>(t.openBlock(),t.createBlock(t.unref(V.QBtn),t.mergeProps(t.unref(o),{style:t.unref(c),color:t.unref(f),size:t.unref(m),flat:t.unref(S),outline:t.unref(w),unelevated:t.unref(E),disable:t.unref(B),type:t.unref(a),"no-wrap":""}),{default:t.withCtx(()=>[t.renderSlot(x.$slots,"default"),t.createTextVNode(" "+t.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),$a=t.defineComponent({inheritAttrs:!1,__name:"PCheckBox",props:t.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},value:{type:[String,Boolean],default:void 0},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=t.useAttrs(),s=t.computed(()=>{const d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{o("change",i.value)};return(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"p-checkbox",style:t.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[t.createVNode(t.unref(V.QCheckbox),t.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},t.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),Na=t.defineComponent({inheritAttrs:!1,__name:"PChip",props:{label:{type:String,default:""},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},square:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["remove","update:model-value","update:selected"],setup(n,{emit:e}){const i=e,o=t.useAttrs(),r=t.computed(()=>{const s={};for(const a of Object.keys(o))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=o[a]);return s});return(s,a)=>(t.openBlock(),t.createBlock(t.unref(V.QChip),t.mergeProps(t.unref(r),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,square:n.square,dense:n.dense,removable:n.removable,onRemove:a[0]||(a[0]=d=>i("remove"))}),t.createSlots({default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:2},[s.$slots.avatar?{name:"avatar",fn:t.withCtx(()=>[t.renderSlot(s.$slots,"avatar")]),key:"0"}:void 0,s.$slots.remove?{name:"remove",fn:t.withCtx(()=>[t.renderSlot(s.$slots,"remove")]),key:"1"}:void 0]),1040,["label","color","text-color","outline","square","dense","removable"]))}}),Wt=v(t.defineComponent({inheritAttrs:!1,__name:"PInput",props:t.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},width:{type:String,required:!1,default:""},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["blur","input","focus","clear"],["update:modelValue"]),setup(n,{expose:e,emit:i}){const o=i,r=t.useModel(n,"modelValue"),s=t.useAttrs(),a=t.computed(()=>typeof s.id=="string"?s.id:void 0),d=t.computed(()=>{const w={};for(const E of Object.keys(s))E!=="id"&&E!=="disable"&&(w[E]=s[E]);return w}),c=n,u=t.computed(()=>s.disable??c.disabled),f=t.ref(null);function h(){var w;(w=f.value)==null||w.focus()}e({focus:h});const m=()=>{o("input",r.value)},S=t.computed(()=>{const w={};return c.margin&&(w.margin=c.margin),c.padding&&(w.padding=c.padding),c.width&&(w.width=c.width),c.borderColor&&(w["--p-border-color"]=c.borderColor),w});return(w,E)=>(t.openBlock(),t.createBlock(t.unref(V.QInput),t.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":E[0]||(E[0]=B=>r.value=B)},t.unref(d),{for:t.unref(a),label:n.label||void 0,mask:n.mask,disable:t.unref(u),rules:n.rules,"input-style":{color:n.color||void 0},style:t.unref(S),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":m,onBlur:E[1]||(E[1]=B=>w.$emit("blur",r.value)),onFocus:E[2]||(E[2]=B=>w.$emit("focus",r.value)),onClear:E[3]||(E[3]=B=>w.$emit("clear"))}),t.createSlots({before:t.withCtx(()=>[t.renderSlot(w.$slots,"before",{},()=>[t.renderSlot(w.$slots,"default",{},void 0,!0)],!0)]),append:t.withCtx(()=>[t.renderSlot(w.$slots,"append",{},()=>[t.renderSlot(w.$slots,"right",{},void 0,!0)],!0)]),_:2},[w.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(w.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,w.$slots.after?{name:"after",fn:t.withCtx(()=>[t.renderSlot(w.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,w.$slots.label?{name:"label",fn:t.withCtx(()=>[t.renderSlot(w.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,w.$slots.error?{name:"error",fn:t.withCtx(()=>[t.renderSlot(w.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,w.$slots.hint?{name:"hint",fn:t.withCtx(()=>[t.renderSlot(w.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,w.$slots.counter?{name:"counter",fn:t.withCtx(()=>[t.renderSlot(w.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,w.$slots.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(w.$slots,"loading",{},void 0,!0)]),key:"6"}:void 0]),1040,["modelValue","for","label","mask","disable","rules","input-style","style"]))}}),[["__scopeId","data-v-c4acf8be"]]),Zp={class:"row items-center justify-end"},Xi="DD.MM.YYYY",Zi=t.defineComponent({__name:"PDateInput",props:t.mergeModels({label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},dense:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},modelType:{type:String,default:void 0,required:!1}},{modelValue:{default:null},modelModifiers:{}}),emits:t.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:e}){const i=n,o=e,r=t.useModel(n,"modelValue"),s=Xi.replace(/[DMY]/g,"#"),a=t.ref(null),d=w=>{if(i.modelType){a.value=i.modelType;return}w instanceof Date?a.value="date":(typeof w=="string"&&w||a.value===null)&&(a.value="string")},c=w=>{if(!w)return"";if(w instanceof Date)return Number.isNaN(w.getTime())?"":V.date.formatDate(w,Xi);const E=String(w).match(/^(\d{4})-(\d{2})-(\d{2})/);if(E)return`${E[3]}.${E[2]}.${E[1]}`;const B=new Date(w);return Number.isNaN(B.getTime())?"":V.date.formatDate(B,Xi)},u=w=>{const E=w.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!E)return null;const B=+E[1],x=+E[2],N=+E[3];if(B<1||B>31||x<1||x>12||N<1900||N>2100)return null;const C=new Date(N,x-1,B);return C.getFullYear()!==N||C.getMonth()!==x-1||C.getDate()!==B?null:C},f=t.ref(c(r.value));d(r.value),t.watch(r,w=>{d(w);const E=c(w);E!==f.value&&(f.value=E)});const h=w=>{const E=typeof w=="number"?String(w):w;if(!E){const x=a.value==="date"?null:"";r.value=x,o("input",x);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(E))return;const B=u(E);if(B)if(a.value==="date")r.value=B,o("input",B);else{const x=B.getFullYear(),N=String(B.getMonth()+1).padStart(2,"0"),C=String(B.getDate()).padStart(2,"0"),P=`${x}-${N}-${C}`;r.value=P,o("input",P)}},m=()=>{o("blur",r.value)},S={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(w,E)=>{const B=t.resolveDirective("close-popup");return t.openBlock(),t.createBlock(Wt,{modelValue:t.unref(f),"onUpdate:modelValue":[E[1]||(E[1]=x=>t.isRef(f)?f.value=x:null),h],class:"fit",label:n.label,placeholder:n.placeholder,mask:t.unref(s),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,inputmode:"numeric",onBlur:m},{prepend:t.withCtx(()=>[t.createVNode(t.unref(V.QIcon),{name:"event",class:"cursor-pointer"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QDate),{modelValue:t.unref(f),"onUpdate:modelValue":E[0]||(E[0]=x=>t.isRef(f)?f.value=x:null),mask:Xi,"today-btn":"",locale:S},{default:t.withCtx(()=>[t.createElementVNode("div",Zp,[t.withDirectives(t.createVNode(Ke,{label:"Готово",color:"primary",flat:""},null,512),[[B]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:t.withCtx(()=>[t.renderSlot(w.$slots,"before")]),append:t.withCtx(()=>[t.renderSlot(w.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width"])}}}),Jp=t.defineComponent({inheritAttrs:!1,__name:"PDatePicker",props:t.mergeModels({text:{type:String,default:"",required:!1},label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:t.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:e}){const i=e,o=t.useModel(n,"modelValue"),r=d=>{const c=d.getFullYear(),u=String(d.getMonth()+1).padStart(2,"0"),f=String(d.getDate()).padStart(2,"0");return`${c}-${u}-${f}`},s=d=>{i("input",d instanceof Date?r(d):d??null)},a=()=>{i("blur")};return(d,c)=>(t.openBlock(),t.createBlock(Zi,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder||void 0,margin:n.margin,padding:n.padding,onBlur:a,onInput:s},{before:t.withCtx(()=>[t.renderSlot(d.$slots,"default")]),append:t.withCtx(()=>[t.renderSlot(d.$slots,"right")]),_:3},8,["modelValue","label","placeholder","margin","padding"]))}}),Ji=t.defineComponent({inheritAttrs:!1,__name:"PDialog",props:t.mergeModels({persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),i=t.useAttrs(),o=t.computed(()=>{const r={};for(const s of Object.keys(i))["persistent","maximized","transition-show","transition-hide"].includes(s)||(r[s]=i[s]);return r});return(r,s)=>(t.openBlock(),t.createBlock(t.unref(V.QDialog),t.mergeProps({modelValue:e.value,"onUpdate:modelValue":s[0]||(s[0]=a=>e.value=a)},t.unref(o),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide}),t.createSlots({default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:2},[r.$slots.title?{name:"title",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"title")]),key:"0"}:void 0,r.$slots.header?{name:"header",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"header")]),key:"1"}:void 0,r.$slots.body?{name:"body",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"body")]),key:"2"}:void 0,r.$slots.footer?{name:"footer",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),Kp=v(t.defineComponent({inheritAttrs:!1,__name:"PFlex",props:{margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},minWidth:{type:String,default:"",required:!1},maxWidth:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},justifyContent:{type:String,default:"",required:!1},background:{type:String,default:"",required:!1},alignItems:{type:String,default:"",required:!1}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"flex-line flex",style:t.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,height:n.height,justifyContent:n.justifyContent,background:n.background,alignItems:n.alignItems})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-71357bc9"]]),eg=["innerHTML"],tg={key:1},or=v(t.defineComponent({__name:"PString",props:{string:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},fontSize:{type:String,required:!1,default:""},fontWeight:{type:String,required:!1,default:""},background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},justifyContent:{type:String,required:!1,default:"center"},isHtml:{type:Boolean,required:!1,default:!1}},emits:["click"],setup(n){const e=n,i={color:e.color||void 0,fontSize:e.fontSize||void 0,fontWeight:e.fontWeight||void 0,background:e.background||void 0,padding:e.padding||void 0,width:e.width||void 0,maxWidth:e.width||void 0,minWidth:e.minWidth||void 0,margin:e.margin||void 0,justifyContent:e.justifyContent||void 0};return(o,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["string",n.customClass]),style:i,onClick:r[0]||(r[0]=s=>o.$emit("click"))},[t.createVNode(t.unref(V.QItemLabel),null,{default:t.withCtx(()=>[n.isHtml?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:n.string},null,8,eg)):(t.openBlock(),t.createElementBlock("span",tg,t.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),ci=v(t.defineComponent({inheritAttrs:!1,__name:"PTooltip",props:{tooltipText:{type:String,default:void 0,required:!1},timeout:{type:Number,default:0,required:!1},typeStyle:{type:String,default:"primary",required:!1},height:{type:String,default:"16px",required:!1},relPosition:{type:String,default:"right",required:!1},level:{type:String,default:"top",required:!1}},setup(n){const e=n,i=t.useAttrs(),o=t.computed(()=>{const c={};for(const u of Object.keys(i))u!=="delay"&&(c[u]=i[u]);return c}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=t.computed(()=>{const c=e.relPosition==="left"?"right":"left";return`${e.level==="top"?"top":"bottom"} ${c}`}),a=t.computed(()=>{const c=e.relPosition==="left"?"right":"left";return`${e.level==="top"?"bottom":"top"} ${c}`}),d=t.computed(()=>({background:r[e.typeStyle],whiteSpace:"pre",height:e.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(c,u)=>n.tooltipText?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0},t.unref(o),{class:"tooltip-wrapper"}),[t.renderSlot(c.$slots,"default",{},void 0,!0),t.createVNode(t.unref(V.QTooltip),{delay:n.timeout,anchor:t.unref(s),self:t.unref(a),class:"tooltip-box",style:t.normalizeStyle(t.unref(d))},{default:t.withCtx(()=>[t.createVNode(or,{string:n.tooltipText,padding:"0 3px",height:n.height},null,8,["string","height"])]),_:1},8,["delay","anchor","self","style"])],16)):(t.openBlock(),t.createBlock(t.unref(V.QTooltip),t.mergeProps({key:1},t.unref(o),{delay:n.timeout,class:"tooltip-box"}),{default:t.withCtx(()=>[t.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),ng={class:"p-hint-popup"},rr=v(t.defineComponent({__name:"PHint",props:{text:{}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[n.text?(t.openBlock(),t.createBlock(t.unref(V.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:o[0]||(o[0]=t.withModifiers(r=>e.value=!0,["stop"]))},{default:t.withCtx(()=>[t.createVNode(ci,{anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"320px"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.text),1)]),_:1})]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QMenu),{modelValue:t.unref(e),"onUpdate:modelValue":o[1]||(o[1]=r=>t.isRef(e)?e.value=r:null),anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"340px"},{default:t.withCtx(()=>[t.createElementVNode("div",ng,t.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),ig=t.defineComponent({__name:"PInputDate",props:t.mergeModels({placeholder:{type:String,default:"Укажите дату"},width:{type:String,required:!1,default:"auto"},margin:{type:String,required:!1,default:""},label:{type:String,default:"",required:!1}},{modelValue:{default:new Date},modelModifiers:{}}),emits:t.mergeModels(["update:modelValue","change","beforeChange","input"],["update:modelValue"]),setup(n,{emit:e}){const i=e,o=t.useModel(n,"modelValue");let r=null;const s=d=>{i("input",d),r=d instanceof Date?d:null},a=()=>{r instanceof Date&&(i("beforeChange",r),i("change",r),r=null)};return(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"style-container",style:t.normalizeStyle({width:n.width,position:"relative"})},[t.createVNode(Zi,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder,margin:n.margin,onBlur:a,onInput:s},null,8,["modelValue","label","placeholder","margin"])],4))}}),og=v(t.defineComponent({__name:"IconMinus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[t.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),rg=v(t.defineComponent({__name:"IconPlus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[t.createElementVNode("path",{d:"M11.3263 19.8672V13.8881H5.33984V11.8951H11.3263V5.91602H13.3217V11.8951H19.3081V13.8881H13.3217V19.8672H11.3263Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-1f1f064c"]]),sg=t.defineComponent({inheritAttrs:!1,__name:"PInputNumber",props:t.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},disabled:{type:Boolean,required:!1,default:!1},max:{type:Number,default:Number.MAX_VALUE,required:!1},min:{type:Number,default:Number.NEGATIVE_INFINITY,required:!1},step:{type:Number,default:1,required:!1}},{modelValue:{default:0},modelModifiers:{}}),emits:t.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:e}){const i=e,o=t.useAttrs(),r=t.computed(()=>typeof o.id=="string"?o.id:void 0),s=t.computed(()=>{const D={};for(const Z of Object.keys(o))Z!=="id"&&(D[Z]=o[Z]);return D}),a=n,d=()=>{const D=a.step.toString();return D.includes(".")?D.split(".")[1].length:0},c=d(),u=t.useModel(n,"modelValue"),h=(D=>Math.min(Math.max(D,a.min),a.max))(u.value);h!==u.value&&(u.value=h);const m=t.ref(h.toFixed(d())),S=t.computed(()=>{const D={};return a.margin&&(D.margin=a.margin),a.padding&&(D.padding=a.padding),D}),w=D=>{const Z=Math.pow(10,c);return Math.round(D*Z)/Z},E=(D,...Z)=>{u.value=w(D),m.value=w(D).toFixed(d()),Z.forEach(K=>i(K,u.value))},B=(D,...Z)=>{a.disabled||D>a.max||D<a.min||E(D,...Z)},x=()=>B(+m.value+a.step,"change"),N=()=>B(+m.value-a.step,"change"),C=D=>B(Number(D),"input"),P=()=>B(+m.value,"change","blur");return(D,Z)=>(t.openBlock(),t.createBlock(t.unref(V.QInput),t.mergeProps(t.unref(s),{for:t.unref(r),"model-value":t.unref(m),label:n.label||void 0,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:t.unref(S),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":C,onBlur:P}),{before:t.withCtx(()=>[t.createVNode(t.unref(V.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:N},{default:t.withCtx(()=>[t.createVNode(og)]),_:1})]),append:t.withCtx(()=>[t.createVNode(t.unref(V.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:x},{default:t.withCtx(()=>[t.createVNode(rg)]),_:1})]),_:1},16,["for","model-value","label","disable","input-style","style"]))}}),ag=v(sg,[["__scopeId","data-v-6f4093e8"]]),lg=v(t.defineComponent({__name:"PLeftSlider",props:{open:{type:Boolean,default:!1},shadow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},shift:{type:Boolean,default:!0},height:{type:String,required:!1,default:"100%"},widthClosed:{type:String,required:!1,default:"30px"},widthOpened:{type:String,required:!1,default:"300px"},titleOpen:{type:String,required:!1,default:"Скрыть меню"},titleClose:{type:String,required:!1,default:"Показать меню"},background:{type:String,required:!1,default:"inherit"}},emits:["open"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.open);t.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>{const c=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock(t.Fragment,null,[n.shift?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle({minWidth:n.widthClosed,maxWidth:n.widthClosed,height:n.height})},null,4)),t.createElementVNode("div",{class:"LS-body",style:t.normalizeStyle({marginLeft:t.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute",background:n.background,height:n.height})},[t.createElementVNode("div",{class:"LS-content",style:t.normalizeStyle({width:`calc(100% - ${n.widthClosed})`,height:n.height,background:"#ffffff"})},[t.renderSlot(a.$slots,"default",{},void 0,!0)],4),t.createVNode(t.unref(V.QBtn),{class:"click-line",flat:"","no-caps":"",style:t.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:d[0]||(d[0]=u=>s(!t.unref(r)))},{default:t.withCtx(()=>[t.unref(r)?(t.openBlock(),t.createBlock(c,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):t.createCommentVNode("",!0),t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),cg=t.defineComponent({__name:"PList",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"300px"}},setup(n){return(e,i)=>(t.openBlock(),t.createBlock(t.unref(V.QList),{tag:"ul",style:t.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["style"]))}}),dg=t.defineComponent({__name:"PListItem",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},showDivider:{type:Boolean,required:!1,default:!1},background:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createBlock(t.unref(V.QItem),{tag:"li",style:t.normalizeStyle({margin:n.margin,padding:n.padding,borderBottom:n.showDivider?"1px solid":"none",background:n.background})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["style"]))}}),ug={class:"tags-selector"},fg={key:0,class:"empty-state"},Ma=v(t.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:e}){const i=n,o=t.ref(""),r=i.store.Options,s=t.computed(()=>r.filter(c=>R.H.Strings.SearchIn(c.label,o.value))),a=e;t.onBeforeMount(async()=>{await i.store.GetOptions()});const d=async c=>{await i.store.Get(c.value),a("select",i.store.Item)};return(c,u)=>{const f=t.resolveDirective("ripple");return t.openBlock(),t.createElementBlock("div",ug,[t.createVNode(Wt,{modelValue:t.unref(o),"onUpdate:modelValue":u[0]||(u[0]=h=>t.isRef(o)?o.value=h:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),t.createVNode(t.unref(V.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QList),{dense:""},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),h=>t.withDirectives((t.openBlock(),t.createBlock(t.unref(V.QItem),{key:h.value,clickable:"",class:"tag-item",onClick:m=>d(h)},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QItemSection),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[f]])),128)),t.unref(s).length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",fg,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),Ki=t.defineComponent({inheritAttrs:!1,__name:"PSelect",props:t.mergeModels({label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},value:{type:String,default:"",required:!1},readonly:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},clearable:{type:Boolean,required:!1,default:!0},width:{type:String,required:!1,default:""},borderColor:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},inPadding:{type:String,required:!1,default:""},options:{type:Array,required:!1,default:()=>[]}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=t.useAttrs(),s=t.computed(()=>typeof r.id=="string"?r.id:void 0),a=t.computed(()=>{const m={};for(const S of Object.keys(r))S!=="id"&&S!=="disable"&&(m[S]=r[S]);return m}),d=n,c=t.computed(()=>r.disable??d.disabled),u=m=>{o("change",m)},f=()=>{o("clear",void 0)},h=t.computed(()=>{const m={};return d.margin&&(m.margin=d.margin),d.padding&&(m.padding=d.padding),d.width&&(m.width=d.width),d.inPadding&&(m.padding=d.inPadding),m});return(m,S)=>(t.openBlock(),t.createBlock(t.unref(V.QSelect),t.mergeProps({modelValue:i.value,"onUpdate:modelValue":S[0]||(S[0]=w=>i.value=w)},t.unref(a),{for:t.unref(s),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,disable:t.unref(c),readonly:n.readonly,"input-style":{color:n.color||void 0},style:t.unref(h),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u,onClear:f}),t.createSlots({before:t.withCtx(()=>[t.renderSlot(m.$slots,"before",{},()=>[t.renderSlot(m.$slots,"left")])]),append:t.withCtx(()=>[t.renderSlot(m.$slots,"append",{},()=>[t.renderSlot(m.$slots,"right")])]),_:2},[m.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"prepend")]),key:"0"}:void 0,m.$slots.after?{name:"after",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"after")]),key:"1"}:void 0,m.$slots.default?{name:"default",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"default")]),key:"2"}:void 0,m.$slots.label?{name:"label",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"label")]),key:"3"}:void 0,m.$slots.error?{name:"error",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"error")]),key:"4"}:void 0,m.$slots.hint?{name:"hint",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"hint")]),key:"5"}:void 0,m.$slots.counter?{name:"counter",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"counter")]),key:"6"}:void 0,m.$slots.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"loading")]),key:"7"}:void 0,m.$slots.selected?{name:"selected",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"selected")]),key:"8"}:void 0,m.$slots.option?{name:"option",fn:t.withCtx(w=>[t.renderSlot(m.$slots,"option",t.normalizeProps(t.guardReactiveProps(w)))]),key:"9"}:void 0,m.$slots["no-option"]?{name:"no-option",fn:t.withCtx(w=>[t.renderSlot(m.$slots,"no-option",t.normalizeProps(t.guardReactiveProps(w)))]),key:"10"}:void 0,m.$slots["before-options"]?{name:"before-options",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"before-options")]),key:"11"}:void 0,m.$slots["after-options"]?{name:"after-options",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"after-options")]),key:"12"}:void 0,m.$slots["selected-item"]?{name:"selected-item",fn:t.withCtx(w=>[t.renderSlot(m.$slots,"selected-item",t.normalizeProps(t.guardReactiveProps(w)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","disable","readonly","input-style","style"]))}}),Ia=t.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var d;const e=n,i=((d=e.storeOpts)==null?void 0:d.Options)??[],o=t.ref(i);async function r(c,u,f,h){var E,B;const S="set"+(((E=u[0])==null?void 0:E.toUpperCase())+u.slice(1)),w=c[S];typeof w=="function"?w(f):(c[u]=f,c[u+"Id"]=f==null?void 0:f.id),await((B=h==null?void 0:h.Update)==null?void 0:B.call(h,c))}const s=(c,u)=>{if(c===""){u(()=>{o.value=i});return}u(()=>{o.value=i.filter(f=>R.H.Strings.SearchInFields(c,[f.label]))})},a=async c=>{c?(await e.storeOpts.Get(c.value),await r(e.item,e.prop,e.storeOpts.Item,e.store)):await r(e.item,e.prop,void 0,e.store)};return t.onBeforeMount(async()=>{i.length>0||await e.storeOpts.GetOptions(e.optLabel,e.optValue)}),(c,u)=>(t.openBlock(),t.createBlock(Ki,{"use-input":"",options:t.unref(o),"model-value":n.item[n.prop+"Id"],label:n.label,disable:n.disabled,"map-options":"",clearable:"",dense:"",outlined:"","hide-bottom-space":"","onUpdate:modelValue":a,onFilter:s},{append:t.withCtx(()=>[t.createVNode(rr,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),hg=t.defineComponent({__name:"PRadio",props:t.mergeModels({label:{type:String,default:""},name:{type:String,default:"group"},fontSize:{type:String,default:""},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:"auto"},value:{type:[String,Boolean],default:void 0}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=n,s=()=>{o("change",r.value)};return(a,d)=>(t.openBlock(),t.createElementBlock("div",{class:"p-radio",style:t.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[t.createVNode(t.unref(V.QRadio),{modelValue:i.value,"onUpdate:modelValue":[d[0]||(d[0]=c=>i.value=c),s],val:n.value,name:n.name,label:n.label||void 0,size:n.size,style:t.normalizeStyle({fontSize:n.fontSize})},null,8,["modelValue","val","name","label","size","style"])],4))}}),mg=v(t.defineComponent({__name:"PRightSlider",props:{open:{type:Boolean,default:!1},shadow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},shift:{type:Boolean,default:!0},height:{type:String,required:!1,default:"100%"},widthClosed:{type:String,required:!1,default:"30px"},widthOpened:{type:String,required:!1,default:"300px"},titleOpen:{type:String,required:!1,default:"Скрыть"},titleClose:{type:String,required:!1,default:"Показать"},background:{type:String,required:!1,default:"inherit"}},emits:["open"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.open);t.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>{const c=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock("div",{class:"wrapper",style:t.normalizeStyle({maxHeight:n.height,height:n.height})},[t.createElementVNode("div",{class:"content",style:t.normalizeStyle({paddingRight:n.shift?"0":`${n.widthClosed}`})},[t.renderSlot(a.$slots,"content",{},void 0,!0)],4),t.createElementVNode("div",{class:"RS-body",style:t.normalizeStyle({marginRight:t.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"-5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute"})},[t.createVNode(t.unref(V.QBtn),{class:"click-line",flat:"","no-caps":"",style:t.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:d[0]||(d[0]=u=>s(!t.unref(r)))},{default:t.withCtx(()=>[t.unref(r)?(t.openBlock(),t.createBlock(c,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):t.createCommentVNode("",!0),t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"]),t.createElementVNode("div",{class:"RS-content",style:t.normalizeStyle({width:`calc(${n.widthOpened} - ${n.widthClosed} - 2px)`,background:n.background,height:n.height})},[t.renderSlot(a.$slots,"default",{},void 0,!0)],4)],4)],4)}}}),[["__scopeId","data-v-8ab50ea6"]]),pg=v(t.defineComponent({__name:"PSticky",props:{shadow:{type:Boolean,default:!1},zIndex:{type:Number,default:0},background:{type:String,default:"inherit"},padding:{type:String,default:"0"},top:{type:String,default:"0"},divider:{type:Boolean,default:!1},dividerColor:{type:String,default:"rgba(0, 0, 0, 0.12)"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"sticky-block",style:t.normalizeStyle({zIndex:1+n.zIndex,top:n.top,background:n.background,padding:n.padding,boxShadow:n.shadow?"0 0 5px 2px rgba(0,0,0,0.3)":"none",borderBottom:n.divider?"1px solid":"none",borderColor:n.dividerColor})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4748d546"]]),gg=t.defineComponent({__name:"PTable",props:{margin:{type:String,required:!1,default:"0 0 20px 0"},width:{type:String,required:!1,default:"100%"},fontSize:{type:String,required:!1,default:"var(--font-size-default)"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("table",t.mergeProps(e.$attrs,{style:{width:n.width,margin:n.margin},class:"p-table"}),[t.createElementVNode("thead",null,[t.renderSlot(e.$slots,"thead")]),t.createElementVNode("tbody",null,[t.renderSlot(e.$slots,"tbody")])],16))}}),Va=v(t.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const e=n,i=t.computed(()=>e.row[e.prop]),o=async()=>{e.row[e.prop]=!e.row[e.prop],await e.store.Update(e.row)};return(r,s)=>(t.openBlock(),t.createBlock(t.unref(V.QTd),{key:n.prop},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["toggle-cell",{clickable:!e.readonly}]),onClick:s[0]||(s[0]=a=>e.readonly?void 0:o())},[t.createVNode(t.unref(V.QIcon),{name:t.unref(i)?"check_circle":"radio_button_unchecked",color:t.unref(i)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),t.createVNode(ci,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),yg=v(t.defineComponent({inheritAttrs:!1,__name:"PTextarea",props:t.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:"0"},padding:{type:String,default:"0",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},resize:{type:String,default:"vertical",required:!1}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const e=t.useModel(n,"modelValue"),i=t.useAttrs(),o=t.computed(()=>typeof i.id=="string"?i.id:void 0),r=t.computed(()=>{const c={};for(const u of Object.keys(i))u!=="id"&&(c[u]=i[u]);return c}),s=n,a=t.computed(()=>({color:s.color||void 0,resize:s.resize})),d=t.computed(()=>{const c={};return s.margin&&(c.margin=s.margin),s.padding&&(c.padding=s.padding),s.borderColor&&(c["--p-border-color"]=s.borderColor),c});return(c,u)=>(t.openBlock(),t.createBlock(t.unref(V.QInput),t.mergeProps({modelValue:e.value,"onUpdate:modelValue":u[0]||(u[0]=f=>e.value=f)},t.unref(r),{for:t.unref(o),label:n.label||void 0,mask:n.mask,type:"textarea","input-style":t.unref(a),style:t.unref(d),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>c.$emit("input",e.value)),onBlur:u[2]||(u[2]=f=>c.$emit("blur",e.value)),onFocus:u[3]||(u[3]=f=>c.$emit("focus",e.value))}),{before:t.withCtx(()=>[t.renderSlot(c.$slots,"default",{},void 0,!0)]),append:t.withCtx(()=>[t.renderSlot(c.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","input-style","style"]))}}),[["__scopeId","data-v-8e01fef2"]]),Ta=t.defineComponent({inheritAttrs:!1,__name:"PToggle",props:t.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},size:{type:String,default:"md"},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=t.useAttrs(),s=t.computed(()=>{const d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{o("change",i.value)};return(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"p-toggle",style:t.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[t.createVNode(t.unref(V.QToggle),t.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},t.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),wg={class:"top-slider-content"},bg={class:"center"},Sg=v(t.defineComponent({__name:"PTopSlider",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},open:{type:Boolean,default:!1}},emits:["open"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.open);t.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=t.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[1]=t.withModifiers(()=>{},["stop"]))]})),t.createElementVNode("div",{class:"top-slider",style:t.normalizeStyle({marginTop:t.unref(r)?"0":`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`,height:n.sliderOnHeight}),onClick:d[3]||(d[3]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",wg,[t.createElementVNode("div",bg,[t.renderSlot(a.$slots,"default",{},void 0,!0)])]),t.createVNode(t.unref(V.QBtn),{class:"click-line",flat:"","no-caps":"",style:t.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:d[2]||(d[2]=c=>s(!t.unref(r)))},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"title",{},void 0,!0)]),_:3},8,["style"])],4)],64))}}),[["__scopeId","data-v-88b1978e"]]);function Cg(n){n.component("PButton",Ke),n.component("PBadge",Ba),n.component("PCheckBox",$a),n.component("PChip",Na),n.component("PDateInput",Zi),n.component("PDatePicker",Jp),n.component("PDialog",Ji),n.component("PFlex",Kp),n.component("PHint",rr),n.component("PInput",Wt),n.component("PInputDate",ig),n.component("PInputNumber",ag),n.component("PLeftSlider",lg),n.component("PList",cg),n.component("PListItem",dg),n.component("POptionsListSingle",Ma),n.component("POpts",Ia),n.component("PRadio",hg),n.component("PRightSlider",mg),n.component("PSelect",Ki),n.component("PSticky",pg),n.component("PString",or),n.component("PTextarea",yg),n.component("PTopSlider",Sg),n.component("PTable",gg),n.component("PTableToggle",Va),n.component("PToggle",Ta),n.component("PTooltip",ci)}const kg={key:0,class:"mainblock"},xg={class:"mainblock-right"},Eg={class:"body"},Bg=v(t.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(n){const e=n,i=t.ref(!1),o=t.ref(!0),r=t.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return t.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),i.value=!0}),(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(a.$slots,"main",{},void 0,!0),t.unref(i)?(t.openBlock(),t.createElementBlock("div",kg,[t.createElementVNode("div",{class:"mainblock-left",style:t.normalizeStyle({minWidth:t.unref(r)?"100%":n.menuWidth,maxWidth:t.unref(r)?"100%":n.menuWidth,marginLeft:t.unref(r)?"-110%":"0",position:t.unref(r)?"fixed":"relative",top:t.unref(r)?"140px":""})},[t.createElementVNode("div",{class:"left-menu",style:t.normalizeStyle({minWidth:t.unref(r)?"auto":n.menuWidth,boxShadow:t.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!t.unref(o)&&t.unref(r)?"110%":"0",borderTopLeftRadius:t.unref(r)?"0":"",borderBottomLeftRadius:t.unref(r)?"0":""}),onClick:d[0]||(d[0]=c=>s())},[t.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),t.createElementVNode("div",xg,[a.$slots.title?(t.openBlock(),t.createElementBlock("div",{key:0,class:"title",style:t.normalizeStyle({display:a.$slots.title?"flex":"none"})},[t.createElementVNode("div",{class:"icon",style:t.normalizeStyle({display:t.unref(r)?"flex":"none"}),onClick:d[1]||(d[1]=c=>s())},[t.renderSlot(a.$slots,"icon",{},void 0,!0)],4),t.renderSlot(a.$slots,"title",{},void 0,!0)],4)):t.createCommentVNode("",!0),t.createElementVNode("div",Eg,[t.renderSlot(a.$slots,"body",{},void 0,!0)])])])):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),$g={class:"mainblock-right"},Ng={class:"body"},Mg=v(t.defineComponent({__name:"AdaptiveContainerHorizontal",props:{menuWidth:{type:String,required:!1,default:"0px"},leftWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"},titleSticky:{type:Boolean,required:!1,default:!1}},setup(n){const e=n,i=t.ref(!1),o=t.ref(!0),r=t.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return t.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),i.value=!0}),(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(a.$slots,"main",{},void 0,!0),t.unref(i)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mainblock",style:t.normalizeStyle({display:t.unref(r)?"block":"flex"})},[t.createElementVNode("div",{class:"mainblock-left",style:t.normalizeStyle({minWidth:t.unref(r)?"100%":n.menuWidth,display:n.leftWidth!=="0px"?"flex":"none",top:t.unref(r)?"58px":"80px"})},[t.createElementVNode("div",{class:"left-menu",style:t.normalizeStyle({minWidth:t.unref(r)?"100%":n.menuWidth,boxShadow:t.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!t.unref(o)&&t.unref(r),"0"),overflowX:t.unref(r)?"scroll":"hidden",display:t.unref(r)?"flex":"block",background:t.unref(r)?"#ffffff":"",overflowY:t.unref(r)?"hidden":"auto"}),onClick:d[0]||(d[0]=c=>s())},[t.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),t.createElementVNode("div",$g,[t.createElementVNode("div",{class:"title",style:t.normalizeStyle({position:n.titleSticky?"sticky":"relative",top:n.titleSticky?t.unref(r)?"108px":"58px":"0",zIndex:n.titleSticky?"10":""})},[t.createElementVNode("div",{class:"icon",style:t.normalizeStyle({display:t.unref(r)?"flex":"none"}),onClick:d[1]||(d[1]=c=>s())},[t.renderSlot(a.$slots,"icon",{},void 0,!0)],4),t.renderSlot(a.$slots,"title",{},void 0,!0)],4),t.createElementVNode("div",Ng,[t.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),Ra=v(t.defineComponent({__name:"GridContainer",props:{maxWidth:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"100%"},background:{type:String,required:!1,default:"inherit"},gridGap:{type:String,required:!1,default:"10px"},gridTemplateColumns:{type:String,required:!1,default:"repeat(auto-fit, minmax(250px, 1fr))"},gridTemplateRows:{type:String,required:!1,default:"repeat(0 0px)"},margin:{type:String,required:!1,default:"10px 0 0 0"},customClass:{type:String,required:!1,default:""}},setup(n){return t.useCssVars(e=>({d143e9f0:n.maxWidth,b9d56180:n.width,v52bd0ff4:n.background,v1795aeac:n.gridGap,v0cfa7c52:n.gridTemplateColumns,v0c6d2a1f:n.gridTemplateRows,a3ccd918:n.margin})),(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid-block",n.customClass])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]),Ig={class:"container"},Vg={class:"slide-box"},Tg={class:"image"},Rg={class:"image-box"},Pg=["id","src","alt"],vg={class:"link-number"},Ag=["id","onClick"],zg=v(t.defineComponent({__name:"CarouselImages",props:{events:{type:Array,required:!0},quantity:{type:Number,default:1,required:!1},animationTime:{type:Number,default:500},height:{type:String,default:"360px"},maxHeight:{type:String,default:"360px"},startActiveGroupIndex:{type:Number,default:0}},emits:["openModalWindow"],setup(n){t.useCssVars(S=>({v582c9d05:i}));const e=n,i=`${e.animationTime}ms`,o=t.ref(e.startActiveGroupIndex),r=t.ref(xt.None),s=t.ref(Ds(e.events,e.quantity)),a=t.computed(()=>s.value[o.value]);t.onMounted(()=>{});const d=()=>o.value=o.value+1<s.value.length?o.value+1:0,c=()=>o.value=o.value-1<0?s.value.length-1:o.value-1,u=S=>{r.value=S,setTimeout(()=>r.value=xt.None,e.animationTime)},f=S=>{S!=o.value&&(u(S<o.value?xt.Prev:xt.Next),setTimeout(()=>o.value=S,e.animationTime/2))},h=()=>{u(xt.Next),setTimeout(d,e.animationTime/2)},m=()=>{u(xt.Prev),setTimeout(c,e.animationTime/2)};return(S,w)=>(t.openBlock(),t.createElementBlock("div",{class:"field",style:t.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[t.createElementVNode("div",Ig,[(t.openBlock(),t.createElementBlock("svg",{class:"icon-arrow",onClick:w[0]||(w[0]=t.withModifiers(E=>m(),["stop"]))},[...w[3]||(w[3]=[t.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),t.createElementVNode("div",Vg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a),(E,B)=>(t.openBlock(),t.createElementBlock("div",{key:B,class:t.normalizeClass({animationnext:t.unref(r)===t.unref(xt).Next,animationprev:t.unref(r)===t.unref(xt).Prev})},[t.createElementVNode("div",Tg,[t.createElementVNode("div",Rg,[t.createElementVNode("img",{id:E.fileInfo.getImageUrl(),style:t.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:E.fileInfo.getImageUrl(),alt:E.fileInfo.originalName,onClick:w[1]||(w[1]=x=>S.showImageInFullScreen())},null,12,Pg)])])],2))),128))]),(t.openBlock(),t.createElementBlock("svg",{class:"icon-arrow",onClick:w[2]||(w[2]=t.withModifiers(E=>h(),["stop"]))},[...w[4]||(w[4]=[t.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),t.createElementVNode("div",vg,[t.createVNode(Ra,{"grid-template-columns":"repeat(auto-fit, minmax(26px, 1fr))","grid-gap":"5px",margin:"0"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),(E,B)=>(t.openBlock(),t.createElementBlock("div",{id:B.toString(),key:B,class:"number",style:t.normalizeStyle({background:B.toString()===t.unref(o).toString()?"#9D9D9D":""}),onClick:t.withModifiers(x=>f(B),["stop"])},t.toDisplayString(B+1),13,Ag))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),Dg=t.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.x),s=t.ref(i.y),a=t.computed(()=>r.value+"px"),d=t.computed(()=>s.value+"px"),c=()=>{o("close")};return(u,f)=>{const h=t.resolveDirective("click-outside");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:"context-window",style:t.normalizeStyle({left:t.unref(a),top:t.unref(d)})},[t.renderSlot(u.$slots,"default")],4)),[[h,c]])}}}),Fg={class:"date-range"},Og=v(t.defineComponent({__name:"DateInputRange",props:{start:{type:Date,default:void 0},end:{type:Date,default:void 0}},emits:["update:start","update:end","setStart","setEnd"],setup(n,{emit:e}){const i=n,o=e;t.watch(()=>[i.start,i.end],()=>{i.start||(r.value=void 0),i.end||(s.value=void 0)});const r=t.ref(i.start),s=t.ref(i.end),a=c=>{r.value=c,!(!i.end||c>i.end)&&(o("update:start",c),o("setStart",c))},d=c=>{s.value=c,!(!i.start||c<i.start)&&(o("update:end",c),o("setEnd",c))};return(c,u)=>{const f=t.resolveComponent("PInputDate");return t.openBlock(),t.createElementBlock("div",Fg,[t.createVNode(f,{"model-value":t.unref(r),"onUpdate:modelValue":u[0]||(u[0]=h=>t.isRef(r)?r.value=h:null),onChange:a},null,8,["model-value"]),u[2]||(u[2]=t.createTextVNode(" - ",-1)),t.createVNode(f,{"model-value":t.unref(s),"onUpdate:modelValue":u[1]||(u[1]=h=>t.isRef(s)?s.value=h:null),onChange:d},null,8,["model-value"])])}}}),[["__scopeId","data-v-b93b6d46"]]),_g=t.defineComponent({name:"DateInputRangeV2"}),Lg={class:"date-range"};function Hg(n,e,i,o,r,s){return t.openBlock(),t.createElementBlock("div",Lg,[t.renderSlot(n.$slots,"default",{},void 0,!0)])}const Ug=v(_g,[["render",Hg],["__scopeId","data-v-d28c6f33"]]),qg={class:"drop-item"},jg={key:0,class:"drop-item-list"},Wg=v(t.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const e=n,i=t.ref(e.rolledUp),o=async()=>{i.value=!i.value};return(r,s)=>{const a=t.resolveComponent("PString"),d=t.resolveComponent("IconArrowDrop");return t.openBlock(),t.createElementBlock("div",qg,[t.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=c=>o())},[t.createVNode(a,{"font-size":"13px","font-weight":"600",string:n.name,"justify-content":"left",width:"auto",margin:"0 5px 0 0",padding:"6px 0",color:"inherit"},null,8,["string"]),t.createElementVNode("div",{style:t.normalizeStyle({transform:t.unref(i)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[t.createVNode(d,{size:"10px",margin:"0"})],4)]),t.unref(i)?(t.openBlock(),t.createElementBlock("div",jg,[t.renderSlot(r.$slots,"default",{},void 0,!0)])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),Gg=v(t.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new xo,required:!0}},emits:["load"],setup(n,{emit:e}){const i=n,o=t.ref(!1),r=e,s=()=>{i.model.setBoolean(o.value),o.value?R.F.FTSP.Get().setF(i.model):R.F.FTSP.Get().removeF(i.model),r("load")};return(a,d)=>{const c=t.resolveComponent("PCheckBox");return t.openBlock(),t.createBlock(c,{modelValue:t.unref(o),"onUpdate:modelValue":d[0]||(d[0]=u=>t.isRef(o)?o.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),[["__scopeId","data-v-72984c94"]]),Qg=v(t.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:e}){const i=e,o=t.ref(void 0),r=async a=>{Pt.Get().replaceF(a,o.value),o.value=a,Pt.Get().p.drop()},s=async a=>{await r(a),i("load")};return(a,d)=>{const c=t.resolveComponent("PString"),u=t.resolveComponent("PButton"),f=t.resolveComponent("GridContainer"),h=t.resolveComponent("InfoItem");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(c,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),t.createVNode(h,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:t.withCtx(()=>[...d[0]||(d[0]=[])]),default:t.withCtx(()=>[t.createVNode(f,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.models,(m,S)=>(t.openBlock(),t.createBlock(u,{key:S,color:"blue",height:"auto",text:m.label,"is-toggle":m.valueEq(t.unref(o)),"toggle-mode":!0,inverse:n.inverse,onClick:w=>s(m.valueEq(t.unref(o))?void 0:m)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-586481ea"]]),Yg=["value","label"],Xg=v(t.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:e}){const i=e,o=Pt.Get(),r=t.ref(void 0),s=async d=>{o.replaceF(d,r.value),r.value=d},a=async d=>{d?await s(r.value):await s(void 0),i("load")};return(d,c)=>{const u=t.resolveComponent("PSelect");return t.openBlock(),t.createBlock(u,{modelValue:t.unref(r),"onUpdate:modelValue":c[0]||(c[0]=f=>t.isRef(r)?r.value=f:null),clearable:t.unref(r),placeholder:n.defaultLabel,onChange:a},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.models,(f,h)=>(t.openBlock(),t.createElementBlock("option",{key:h,value:f,label:f.label},null,8,Yg))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-ae66df57"]]),Zg=v(t.defineComponent({__name:"FTSPPanel",setup(n){return t.onBeforeMount(async()=>{}),(e,i)=>(t.openBlock(),t.createElementBlock("div"))}}),[["__scopeId","data-v-e280d85b"]]),Jg=v(t.defineComponent({__name:"GeneralItem",props:{background:{type:String,required:!1,default:"#ffffff"},height:{type:String,required:!1,default:"40px"},width:{type:String,required:!1,default:"auto"},ready:{type:String,required:!1,default:"0%"},padding:{type:String,required:!1,default:"10px"},borderColor:{type:String,required:!1,default:"#343D5C"},margin:{type:String,required:!1,default:"5px"},scale:{type:Boolean,required:!1,default:!0},fontSize:{type:String,required:!1,default:"14px"},withIcon:{type:Boolean,required:!1,default:!1}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock("div",{class:"general-block-item",style:t.normalizeStyle({background:n.background,height:n.height,width:n.width,borderColor:n.borderColor,padding:n.padding,margin:n.margin,transform:n.scale&&t.unref(e)?"scale(1.03, 1.03)":""}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[t.createElementVNode("div",{class:"green",style:t.normalizeStyle({width:`${n.ready}`})},null,4),t.createElementVNode("div",{class:"general-block-item-title",style:t.normalizeStyle({fontSize:n.fontSize})},[t.renderSlot(i.$slots,"general-item",{},void 0,!0)],4),t.createElementVNode("div",{class:"tools-icon",style:t.normalizeStyle({display:n.withIcon?"flex":"none"})},[...o[2]||(o[2]=[t.createElementVNode("svg",{class:"icon-del"},[t.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[t.createElementVNode("path",{d:"M2.91797 8.75C2.6888 8.75 2.49255 8.66833 2.32922 8.505C2.16589 8.34167 2.08436 8.14556 2.08464 7.91667V2.5H1.66797V1.66667H3.7513V1.25H6.2513V1.66667H8.33464V2.5H7.91797V7.91667C7.91797 8.14583 7.8363 8.34208 7.67297 8.50542C7.50964 8.66875 7.31352 8.75028 7.08464 8.75H2.91797ZM7.08464 2.5H2.91797V7.91667H7.08464V2.5ZM3.7513 7.08333H4.58464V3.33333H3.7513V7.08333ZM5.41797 7.08333H6.2513V3.33333H5.41797V7.08333Z"})])],-1))],36))}}),[["__scopeId","data-v-1056443d"]]),Kg={key:0,class:"blur"},e1={style:{display:"flex","justify-content":"center"}},t1=v(t.defineComponent({__name:"InfoItem",props:{background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},openWidth:{type:String,required:!1,default:"auto"},openHeight:{type:String,required:!1,default:"auto"},maxWidth:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},height:{type:String,required:!1,default:""},withOpenWindow:{type:Boolean,required:!1,default:!0},colorSelected:{type:String,required:!1,default:"#1979CF"},borderColor:{type:String,required:!1,default:"#E3E3E3"},withHover:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},close:{type:Boolean,required:!1,default:!0},baseBoxMargin:{type:String,required:!1,default:""},closeWindowOverflow:{type:String,required:!1,default:""},showSaveDialog:{type:Boolean,required:!1,default:!1}},emits:["click","keyup-enter","after-close"],setup(n,{emit:e}){const i=n,o=e,r=i.customClass!==""?i.customClass:"inside-class",s=t.ref(!1),a=t.ref(!1),d=t.ref(!1),c=t.ref(i.close);t.watch(()=>i.close,()=>{a.value=!1});const u=P=>{P.stopPropagation(),P.key==="Escape"&&(i.showSaveDialog?d.value=!0:a.value=!1)};t.watch(a,async()=>{var P,D;await t.nextTick(),a.value?((D=(P=document.getElementById("info-item-opened-content"))==null?void 0:P.querySelector("input"))==null||D.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&o("after-close")});const f=()=>{o("click"),a.value=!!i.withOpenWindow,c.value!==i.close&&(a.value=!1,c.value=!c.value)},h=t.computed(()=>i.customClass===""?{width:i.width,minHeight:"40px",height:"auto",maxWidth:i.maxWidth,minWidth:i.minWidth,margin:i.baseBoxMargin}:void 0),m=t.computed(()=>a.value&&i.withOpenWindow),S=t.computed(()=>({background:i.background?i.background:void 0,zIndex:m.value?"2":"0",padding:m.value?"0":i.padding,margin:i.margin,width:m.value?i.openWidth:i.width,height:m.value?i.openHeight:i.height,minHeight:"40px",maxWidth:i.maxWidth,minWidth:i.minWidth,borderColor:s.value||a.value?i.colorSelected:i.borderColor,color:s.value?i.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${i.colorSelected}`:"none",alignItems:m.value?"end":"center",cursor:(i.withHover,"pointer")})),w=t.computed(()=>({height:m.value?"0":"",overflow:i.closeWindowOverflow,width:i.width})),E=t.computed(()=>({height:m.value?"auto":"0"})),B=t.computed(()=>({color:s.value?i.colorSelected:"#343E5C",fill:s.value?i.colorSelected:"#343E5C",background:i.background})),x=()=>{i.showSaveDialog?d.value=!0:a.value=!1},N=async()=>{await o("keyup-enter"),i.close&&(a.value=!1),d.value=!1},C=()=>{a.value=!1,d.value=!1};return(P,D)=>{const Z=t.resolveComponent("PString"),K=t.resolveComponent("PButton"),fe=t.resolveComponent("PModal"),ht=t.resolveDirective("click-outside");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(a)?(t.openBlock(),t.createElementBlock("div",Kg)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"base-box",style:t.normalizeStyle(t.unref(h)),onClick:D[2]||(D[2]=t.withModifiers(Qe=>f(),["prevent","stop"]))},[t.createElementVNode("div",{class:t.normalizeClass(["body",t.unref(r)]),style:t.normalizeStyle(t.unref(S)),onMouseenter:D[0]||(D[0]=Qe=>n.withHover?s.value=!0:s.value=!1),onMouseleave:D[1]||(D[1]=Qe=>s.value=!1)},[t.unref(a)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["close-window",n.customClass]),style:t.normalizeStyle(t.unref(w))},[t.renderSlot(P.$slots,"default",{},void 0,!0)],6)),t.unref(a)?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:t.normalizeStyle(t.unref(E))},[t.renderSlot(P.$slots,"open-inside-content",{},void 0,!0)],4)),[[ht,x,void 0,{prevent:!0}]]):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"top-title",style:t.normalizeStyle(t.unref(B))},[t.renderSlot(P.$slots,"title",{},()=>[t.createVNode(Z,{string:n.title,"font-size":"10px",padding:"0 0 0 3px",style:t.normalizeStyle({color:t.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),t.createVNode(fe,{show:t.unref(d),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:t.withCtx(()=>[t.createElementVNode("div",e1,[t.createVNode(K,{text:"Не сохранять",onClick:C}),t.createVNode(K,{text:"Сохранять",onClick:N})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-e8e8f1a1"]]),n1=v(t.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},title:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(n,{emit:e}){const i=t.ref(!1),o=e,r=s=>{i.value=!i.value,o("select",s)};return(s,a)=>{const d=t.resolveComponent("PString"),c=t.resolveComponent("PButton"),u=t.resolveComponent("InfoItem");return t.openBlock(),t.createBlock(u,{close:t.unref(i),title:n.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.list,f=>(t.openBlock(),t.createBlock(c,{key:f,type:"admin",color:"blue",text:f,onClick:h=>r(f)},null,8,["text","onClick"]))),128)),t.createVNode(c,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:t.withCtx(()=>[t.createVNode(d,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),i1={class:"mainblock"},o1={class:"mainline"},r1=v(t.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",i1,[t.createElementVNode("div",o1,[t.createElementVNode("div",{class:"mainblock-left",style:t.normalizeStyle({minWidth:n.leftWidth,maxWidth:n.leftWidth,background:n.background,display:n.leftWidth!=="0px"?"block":"none"})},[t.renderSlot(e.$slots,"left",{},void 0,!0)],4),t.createElementVNode("div",{class:"mainblock-right",style:t.normalizeStyle({background:n.background})},[t.renderSlot(e.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),Pa=v(t.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[t.createElementVNode("path",{d:"M11 19C12.775 18.9996 14.4988 18.4054 15.897 17.312L20.293 21.708L21.707 20.294L17.311 15.898C18.405 14.4997 18.9996 12.7754 19 11C19 6.589 15.411 3 11 3C6.589 3 3 6.589 3 11C3 15.411 6.589 19 11 19ZM11 5C14.309 5 17 7.691 17 11C17 14.309 14.309 17 11 17C7.691 17 5 14.309 5 11C5 7.691 7.691 5 11 5Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-64e76eb7"]]),s1={class:"search-list"},a1=["onClick"],va=v(t.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]},width:{type:[Number,String],default:""},maxHeightResultList:{type:String,default:"200px"},zIndexResultList:{type:String,default:"10"},boxShadowResultList:{type:String,default:"var(--box-shadow)"}},emits:["select","input"],setup(n,{emit:e}){const i=e,o=n,r=t.ref(o.modelValue),s=t.ref([]);async function a(){i("input",r.value),await d()}async function d(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function c(u){r.value="",i("select",u)}return(u,f)=>(t.openBlock(),t.createElementBlock("div",{class:"container",style:t.normalizeStyle({width:n.width})},[t.createVNode(Wt,{modelValue:t.unref(r),"onUpdate:modelValue":f[0]||(f[0]=h=>t.isRef(r)?r.value=h:null),placeholder:"Найти",onInput:a},{right:t.withCtx(()=>[t.createVNode(Pa,{size:"24px"})]),_:1},8,["modelValue"]),t.unref(r)&&t.unref(r).length>=2?(t.openBlock(),t.createElementBlock("div",{key:0,class:"result",style:t.normalizeStyle({maxHeight:n.maxHeightResultList,zIndex:n.zIndexResultList,boxShadow:n.boxShadowResultList})},[t.createElementVNode("ul",s1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),h=>(t.openBlock(),t.createElementBlock("li",{key:h.value,onClick:m=>c(h)},t.toDisplayString(h.label),9,a1))),128))])],4)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),l1=v(t.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),i=async()=>{};return(o,r)=>{const s=t.resolveComponent("PInput");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(s,{modelValue:e.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>e.value.number=a),onBlur:i},null,8,["modelValue"]),t.createVNode(s,{modelValue:e.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>e.value.description=a),onBlur:i},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-51bf3f08"]]),c1={};function d1(n,e){return t.openBlock(),t.createElementBlock(t.Fragment,null,[e[0]||(e[0]=t.createElementVNode("div",{class:"blur"},null,-1)),e[1]||(e[1]=t.createElementVNode("div",{class:"loader-container"},[t.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const u1=v(c1,[["render",d1],["__scopeId","data-v-0f1f2f84"]]),f1={style:{display:"flex","justify-content":"center",width:"100%"}},h1={class:"pag-number"},m1={class:"pag-ul"},p1={key:2},g1=v(t.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},setup(n){const e=n,i=h=>h?"active":"neutral",o=h=>h?"not-active":"neutral",r=t.ref(Fs),s=t.ref(!1),a=t.ref(!1);r.value.count=e.store.Count.value,t.watch(e.store.Count,()=>{r.value.count=e.store.Count.value});const d=async h=>{if(h!==r.value.curPage&&(h<1&&(h=1),h>r.value.pagesCount()&&(h=r.value.pagesCount()),!e.showConfirm))return await c(h)},c=async(h,m)=>{r.value.setCurPage(h),Pt.Get().p.offset=(h-1)*r.value.limit,await e.store.FTSP(),f()},u=t.computed(()=>{const h=r.value.pagesCount();return h<8?Rt.GenerateNumsRange(2,h-1).filter(m=>m<h&&m>1):Rt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(m=>m<h&&m>1)}),f=()=>{const h=document.querySelector(".el-table__body-wrapper"),m=document.querySelector("#list");h?h.scrollTo({top:0}):m&&m.scrollTo({top:0})};return t.onBeforeUnmount(()=>{Pt.Get().p.drop()}),(h,m)=>{const S=t.resolveComponent("ArrowLeft"),w=t.resolveComponent("PButton"),E=t.resolveComponent("DoubleArrowLeft"),B=t.resolveComponent("EllipsisSvg"),x=t.resolveComponent("DoubleArrowRight"),N=t.resolveComponent("ArrowRight");return t.openBlock(),t.createElementBlock("div",f1,[t.createElementVNode("div",{class:"pag-container",style:t.normalizeStyle({justifyContent:n.justifyContent})},[t.createElementVNode("div",h1,[t.createVNode(w,{skin:"pag",type:o(t.unref(r).curPage===1),onClick:m[0]||(m[0]=C=>d(t.unref(r).curPage-1))},{default:t.withCtx(()=>[t.createVNode(S)]),_:1},8,["type"]),t.createElementVNode("ul",m1,[t.createElementVNode("li",null,[t.createVNode(w,{skin:"pag",type:i(t.unref(r).curPage===1),text:"1",onClick:m[1]||(m[1]=C=>d(1))},null,8,["type"])]),t.unref(r).pagesCount()>8&&t.unref(r).curPage>4?(t.openBlock(),t.createElementBlock("li",{key:0,onMouseenter:m[3]||(m[3]=C=>s.value=!0),onMouseleave:m[4]||(m[4]=C=>s.value=!1)},[t.createVNode(w,{skin:"pag",type:"neutral",onClick:m[2]||(m[2]=C=>d(t.unref(r).curPage-5))},{default:t.withCtx(()=>[t.unref(s)?(t.openBlock(),t.createBlock(E,{key:0})):(t.openBlock(),t.createBlock(B,{key:1}))]),_:1})],32)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(u),C=>(t.openBlock(),t.createElementBlock("li",{key:C},[t.createVNode(w,{skin:"pag",type:i(C===t.unref(r).curPage),text:C,onClick:P=>d(C)},null,8,["type","text","onClick"])]))),128)),t.unref(r).pagesCount()>=8&&t.unref(r).curPage<t.unref(r).pagesCount()-3?(t.openBlock(),t.createElementBlock("li",{key:1,onMouseenter:m[6]||(m[6]=C=>a.value=!0),onMouseleave:m[7]||(m[7]=C=>a.value=!1)},[t.createVNode(w,{skin:"pag",type:"neutral",onClick:m[5]||(m[5]=C=>d(t.unref(r).curPage+5))},{default:t.withCtx(()=>[t.unref(a)?(t.openBlock(),t.createBlock(x,{key:0})):(t.openBlock(),t.createBlock(B,{key:1}))]),_:1})],32)):t.createCommentVNode("",!0),t.unref(r).pagesCount()>1?(t.openBlock(),t.createElementBlock("li",p1,[t.createVNode(w,{skin:"pag",type:i(t.unref(r).pagesCount()===t.unref(r).curPage),text:t.unref(r).pagesCount(),onClick:m[8]||(m[8]=C=>d(t.unref(r).pagesCount()))},null,8,["type","text"])])):t.createCommentVNode("",!0)]),t.createVNode(w,{skin:"pag",type:o(t.unref(r).curPage===t.unref(r).pagesCount()),onClick:m[9]||(m[9]=C=>d(t.unref(r).curPage+1))},{default:t.withCtx(()=>[t.createVNode(N)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),y1=v(t.defineComponent({__name:"RemoteSearch",props:{keyValue:{type:String,default:""},modelValue:{type:String,default:""},storeModule:{type:String,default:""},placeholder:{type:String,default:"Начните вводить запрос"},showSuggestions:{type:Boolean,default:!0},width:{type:[Number,String],default:"var(--input-width-default, 100%)"},focus:{type:Boolean,default:!1},maxHeightResultList:{type:String,default:"200px"},zIndexResultList:{type:String,default:"10"},boxShadowResultList:{type:String,default:"rgba(0, 0, 0, 0.35) 0px 5px 5px"}},emits:["select","load","input"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.modelValue),s=t.ref();let a=Go.SearchModel();t.watch(()=>i.focus,()=>{i.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const d=async f=>{if(f.length<2)return;s.value.activated=!0,a=Go.SearchModel(),a.searchObjects=[],a.query=f,a.key=i.keyValue;const h=a.searchGroups.find(m=>m.key===i.keyValue);return h&&(a.searchGroup=h),await Gs.Search.Search(a),a.searchObjects},c=async f=>{o("select",f),r.value=""},u=f=>{o("input",f),f.length===0&&o("input","")};return(f,h)=>(t.openBlock(),t.createBlock(va,{ref_key:"searchForm",ref:s,modelValue:t.unref(r),"onUpdate:modelValue":h[0]||(h[0]=m=>t.isRef(r)?r.value=m:null),"max-height-result-list":n.maxHeightResultList,"z-index-result-list":n.zIndexResultList,"box-shadow-result-list":n.boxShadowResultList,width:n.width,"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:n.placeholder,"search-func":d,"trigger-on-focus":n.showSuggestions,suggestions:t.unref(a).searchObjects,onSelect:c,onInput:u},null,8,["modelValue","max-height-result-list","z-index-result-list","box-shadow-result-list","width","placeholder","trigger-on-focus","suggestions"]))}}),[["__scopeId","data-v-af0b4b1a"]]),w1={class:"mainblock-body"},b1={class:"mainblock-footer"},S1=v(t.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"mainblock",style:t.normalizeStyle({background:n.background,padding:n.padding})},[t.createElementVNode("div",{class:"mainblock-header",style:t.normalizeStyle({background:n.background})},[t.renderSlot(e.$slots,"header",{},void 0,!0)],4),t.createElementVNode("div",w1,[t.renderSlot(e.$slots,"body",{},void 0,!0)]),t.createElementVNode("div",b1,[t.renderSlot(e.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),C1={class:"right-slider-content"},k1={class:"right-slider-content-header"},x1={class:"right-slider-content-box"},E1={class:"right-slider-button"},B1=v(t.defineComponent({__name:"RightSliderContainer",props:{sliderOffWidth:{type:String,required:!1,default:"30px"},sliderOnWidth:{type:String,required:!1,default:"260px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1},titleOpen:{type:String,required:!1,default:"Скрыть список исследований"},titleClose:{type:String,required:!1,default:"Показать список исследований"}},emits:["toggle"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(!1);t.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,d)=>{const c=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock("div",{class:"right-slider",style:t.normalizeStyle({marginRight:t.unref(r)?`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`:"0",width:n.sliderOnWidth})},[t.createElementVNode("div",{class:"click-line",onClick:d[0]||(d[0]=u=>s(!t.unref(r)))},[t.unref(r)?(t.openBlock(),t.createBlock(c,{key:0,string:n.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):t.createCommentVNode("",!0),t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),t.createElementVNode("div",C1,[t.createElementVNode("div",k1,[t.renderSlot(a.$slots,"header",{},void 0,!0)]),t.createElementVNode("div",x1,[t.renderSlot(a.$slots,"default",{},void 0,!0)])]),t.createElementVNode("div",E1,[t.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),$1={class:"mainblock"},N1={class:"body-block"},M1={class:"tab-block"},I1=v(t.defineComponent({__name:"RightTabsContainer",props:{sliderOffWidth:{type:String,required:!1,default:"101px"},sliderOnWidth:{type:String,required:!1,default:"332px"},background:{type:String,required:!1,default:"inherit"},isToggle:{type:Boolean,required:!1,default:!1},mobileWidth:{type:String,required:!1,default:"768px"}},emits:["toggle"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(!1),s=t.ref(window.matchMedia("(max-width: 768px)").matches),a=c=>{o("toggle",c)},d=t.ref(!1);return t.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(i.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(c,u)=>(t.openBlock(),t.createElementBlock("div",$1,[t.createElementVNode("div",{class:"slider-block",style:t.normalizeStyle({marginRight:t.unref(s)?n.isToggle?"49px":`calc(49px - ${n.sliderOnWidth})`:n.isToggle?n.sliderOffWidth:`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`,width:n.sliderOnWidth,minHeight:n.sliderOffWidth,height:n.isToggle?"auto":"100px"})},[t.createElementVNode("div",{class:"slider-icon",style:t.normalizeStyle({border:n.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:n.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=f=>a(!n.isToggle)),onMouseenter:u[1]||(u[1]=f=>d.value=!0),onMouseleave:u[2]||(u[2]=f=>d.value=!1)},[t.createElementVNode("div",{class:"icon-block",style:t.normalizeStyle({transform:t.unref(d)?n.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":n.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:n.isToggle?"#379FFF":"#00B5A4"})},[t.renderSlot(c.$slots,"icon",{},void 0,!0)],4)],36),t.createElementVNode("div",{class:"slider-info",style:t.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[t.renderSlot(c.$slots,"slider-body",{},void 0,!0)],4)],4),t.createElementVNode("div",N1,[t.renderSlot(c.$slots,"body",{},void 0,!0)]),t.createElementVNode("div",M1,[t.renderSlot(c.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),V1=["label","value"],T1=v(t.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:e}){const i={[qe.String]:"Текстовый ответ",[qe.Text]:"Развёрнутый текстовый ответ",[qe.Number]:"Числовой ответ",[qe.Date]:"Ответ в виде даты",[qe.Radio]:"Выбор одного из вариантов",[qe.Set]:"Выбор нескольких вариантов",[qe.File]:"Ответ в виде файла",[qe.MatrixRadio]:"Матрица с одним выбором",[qe.MatrixSet]:"Матрица с несколькими выборами"},o=e,r=s=>{o("select",s)};return(s,a)=>{const d=t.resolveComponent("PString"),c=t.resolveComponent("PSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(d,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),t.createVNode(c,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(i,(u,f)=>t.createElementVNode("option",{key:u,label:u,value:f},null,8,V1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),R1=["label","value"],P1=v(t.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:e}){const i=t.ref(!1),o=e,r=t.ref();t.onBeforeMount(()=>{i.value=!0,r.value=on.GetDefault()});const s=async d=>{r.value=d??on.GetDefault(),o("load")},a=async d=>{await s(d)};return(d,c)=>{var f;const u=t.resolveComponent("PSelect");return t.unref(i)?(t.openBlock(),t.createBlock(u,{key:0,modelValue:t.unref(r),"onUpdate:modelValue":c[0]||(c[0]=h=>t.isRef(r)?r.value=h:null),"popper-append-to-body":!1,clearable:!((f=t.unref(r))!=null&&f.default),"value-key":"label",onChange:a,onClear:c[1]||(c[1]=h=>a())},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(on).Get(),(h,m)=>(t.openBlock(),t.createElementBlock("option",{key:m,label:h.label,value:h},null,8,R1))),128))]),_:1},8,["modelValue","clearable"])):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-982338b4"]]),v1=["label","value"],A1=v(t.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:e}){const i=e,o=t.ref();t.onBeforeMount(()=>{o.value=on.GetDefault()});const r=async a=>{a||(o.value=on.GetDefault()),Pt.Get().setSortModel(o.value),Pt.Get().p.drop(),i("load")},s=async a=>{await r(a)};return(a,d)=>{var u;const c=t.resolveComponent("PSelect");return t.openBlock(),t.createBlock(c,{modelValue:t.unref(o),"onUpdate:modelValue":d[0]||(d[0]=f=>t.isRef(o)?o.value=f:null),"popper-append-to-body":!1,clearable:!((u=t.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(on).Get(),(f,h)=>(t.openBlock(),t.createElementBlock("option",{key:h,label:f.label,value:f},null,8,v1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-80f413ec"]]),z1={class:"switch-container"},D1={class:"line"},F1={class:"line"},O1=v(t.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(n,{emit:e}){const i=n,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>i.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>i.secondModel.valueEq(u.value)?void 0:o,d=h=>{var S;return{color:(S=u.value)!=null&&S.valueEq(h)?"#006bb4":"#B0A4C0"}},c=e,u=t.ref(void 0),f=async h=>{var m;(m=u.value)!=null&&m.valueEq(h)||(u.value=h,c("load"))};return(h,m)=>{const S=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock("div",z1,[t.createElementVNode("div",D1,[t.createVNode(S,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:t.normalizeStyle(d(n.firstModel)),onClick:m[0]||(m[0]=w=>f(n.firstModel))},null,8,["string","style"]),t.createVNode(S,{string:"Все","font-size":"12px",padding:"0",style:t.normalizeStyle(d()),onClick:m[1]||(m[1]=w=>f())},null,8,["style"]),t.createVNode(S,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:t.normalizeStyle(d(n.secondModel)),onClick:m[2]||(m[2]=w=>f(n.secondModel))},null,8,["string","style"])]),t.createElementVNode("div",F1,[t.createElementVNode("div",{class:t.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(t.unref(u))}]),style:t.normalizeStyle(r()),onClick:m[3]||(m[3]=w=>f(n.firstModel))},null,6),t.createElementVNode("div",{class:t.normalizeClass(["switch-knob2",{active:!t.unref(u)}]),style:t.normalizeStyle(s()),onClick:m[4]||(m[4]=w=>f())},null,6),t.createElementVNode("div",{class:t.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(t.unref(u))}]),style:t.normalizeStyle(a()),onClick:m[5]||(m[5]=w=>f(n.secondModel))},null,6),m[6]||(m[6]=t.createElementVNode("div",{class:"switch-axis"},null,-1)),m[7]||(m[7]=t.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),m[8]||(m[8]=t.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),m[9]||(m[9]=t.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),_1={},L1={class:"flex"};function H1(n,e){return t.openBlock(),t.createElementBlock("div",L1,[t.renderSlot(n.$slots,"default",{},void 0,!0)])}const U1=v(_1,[["render",H1],["__scopeId","data-v-5023d414"]]),q1=v(t.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:e}){const i=t.ref(!1),o=e,r=async()=>{o("submit"),i.value=!i.value};return(s,a)=>{const d=t.resolveComponent("PString"),c=t.resolveComponent("PButton"),u=t.resolveComponent("GridContainer"),f=t.resolveComponent("InfoItem");return t.openBlock(),t.createBlock(f,{title:n.title,icon:"edit-title","with-hover":!0,close:t.unref(i),width:"100%",onKeyupEnter:r},{"open-inside-content":t.withCtx(()=>[t.createVNode(u,{"custom-class":"grid"},{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default",{},void 0,!0),t.createVNode(c,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:t.withCtx(()=>[n.content.length>0?(t.openBlock(),t.createBlock(d,{key:0,string:n.content},null,8,["string"])):(t.openBlock(),t.createBlock(d,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-0794596f"]]),j1={class:"top-slider-content"},W1={class:"center"},G1=v(t.defineComponent({__name:"TopSliderContainer",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1}},emits:["toggle"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(!0);t.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=t.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[1]=t.withModifiers(()=>{},["stop"]))]})),t.createElementVNode("div",{class:"top-slider",style:t.normalizeStyle({marginTop:t.unref(r)?`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`:"0",height:n.sliderOnHeight}),onClick:d[3]||(d[3]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",j1,[t.createElementVNode("div",W1,[t.renderSlot(a.$slots,"default",{},void 0,!0)])]),t.createElementVNode("div",{class:"click-line",style:t.normalizeStyle({height:n.sliderOffHeight}),onClick:d[2]||(d[2]=c=>s(!t.unref(r)))},[t.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function Q1(n){n.component("PageNotFound",vs),n.component("AdaptiveContainer",Bg),n.component("AdaptiveContainerHorizontal",Mg),n.component("CarouselImages",zg),n.component("ContextWindow",Dg),n.component("DateInputRangeV2",Ug),n.component("DateInputRange",Og),n.component("DropList",Wg),n.component("FilterCheckbox",Gg),n.component("FiltersButtonsSelect",Qg),n.component("FilterSelect",Xg),n.component("FTSPPanel",Zg),n.component("GeneralItem",Jg),n.component("GridContainer",Ra),n.component("InfoItem",t1),n.component("InfoItemSelectButtons",n1),n.component("LeftRightContainer",r1),n.component("PAutocomplete",va),n.component("PhoneForm",l1),n.component("PLoader",u1),n.component("PPagination",g1),n.component("RemoteSearch",y1),n.component("ResearcheContainer",S1),n.component("RightSliderContainer",B1),n.component("RightTabsContainer",I1),n.component("SelectValueType",T1),n.component("SortList",P1),n.component("SortSelect",A1),n.component("Switch3Pos",O1),n.component("ThemeWrapper",U1),n.component("ToggleInfoItem",q1),n.component("TopSliderContainer",G1)}const Y1=v(t.defineComponent({__name:"IconDownload",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.createElementVNode("path",{d:"M15.6443 5.06141C15.0797 5.29331 15.0998 5.06141 15.0998 12.1393C15.0998 15.7388 15.0696 18.6728 15.0293 18.6728C14.9889 18.6728 14.1521 17.8763 13.1842 16.9083C11.6819 15.4061 11.3592 15.1338 11.0467 15.0733C10.724 15.0229 10.6333 15.0632 10.3611 15.3254C10.1292 15.5573 10.0586 15.7186 10.0586 16.0211C10.0586 16.3941 10.1594 16.5151 12.8615 19.2071C15.4326 21.7681 15.6947 22 16.0073 22C16.3198 22 16.582 21.7681 19.153 19.2071C21.9156 16.4546 21.9559 16.4042 21.9559 15.9908C21.9559 15.4867 21.6535 15.1641 21.109 15.0733C20.736 15.0128 20.7259 15.0229 18.8808 16.868C17.0357 18.6929 17.0155 18.7131 17.0155 18.3703C17.0054 18.1787 16.9953 15.2145 16.9853 11.7965L16.9651 5.56554L16.713 5.31348C16.4307 5.03117 15.9669 4.92026 15.6443 5.06141Z"}),t.createElementVNode("path",{d:"M5.30247 20.3872L5 20.6997L5.04033 22.081C5.07058 23.4321 5.08066 23.4825 5.44363 24.2488C6.09899 25.6099 7.17782 26.5173 8.59945 26.8904C9.47663 27.1122 22.5335 27.1223 23.4006 26.8904C25.044 26.4669 26.3245 25.2671 26.8084 23.7043C26.9496 23.2506 27 22.7868 27 21.8794C27 20.6796 27 20.6695 26.7076 20.3771C26.3144 19.9839 25.901 19.9839 25.4675 20.3771L25.1347 20.6695L25.1045 21.8189C25.0843 22.8776 25.0541 23.0086 24.7516 23.6035C24.3987 24.3093 23.7938 24.8235 23.088 25.0251C22.5839 25.1663 9.4363 25.1663 8.93217 25.0251C8.30706 24.8436 7.64161 24.3093 7.29881 23.7144C7.00642 23.2002 6.98625 23.0691 6.93584 21.9197L6.88543 20.6695L6.5527 20.3771C6.11916 19.9839 5.70577 19.9839 5.30247 20.3872Z"})])],-1))],64))}}),[["__scopeId","data-v-94c18208"]]),X1=v(t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.createElementVNode("path",{d:"M8.58216 5.14236C6.22884 5.77558 4.70721 8.02494 5.04745 10.3688C5.61452 14.2627 10.3684 15.8127 13.0714 12.9962C13.6385 12.4103 14.319 11.2194 14.319 10.8225C14.319 10.6902 14.9428 10.6713 20.3771 10.6713H26.4353L26.7094 10.3972C27.0969 10.0097 27.0969 9.44261 26.7094 9.05511L26.4353 8.78103H20.396H14.3662L14.1867 8.23287C13.4589 5.9646 10.8599 4.52803 8.58216 5.14236ZM10.9638 7.21215C13.0525 8.24232 13.0336 11.2194 10.9355 12.2496C10.2172 12.5993 9.20593 12.6276 8.54436 12.2968C6.21939 11.1533 6.43676 7.81702 8.8846 7.01368C9.45166 6.8341 10.3495 6.91916 10.9638 7.21215Z"}),t.createElementVNode("path",{d:"M21.5953 17.6266C21.1133 17.7211 20.2155 18.0519 19.8752 18.2599C18.9868 18.7986 18.0322 20.0083 17.8054 20.8778L17.6826 21.3504H12.3616C6.66257 21.3504 6.63422 21.3504 6.37904 21.8135C6.20892 22.1443 6.26562 22.6452 6.51135 22.9287L6.73818 23.1933L12.1915 23.2406L17.6448 23.2878L17.8621 23.8738C18.4292 25.4427 19.7334 26.6052 21.2929 26.936C22.1057 27.1061 23.3154 27.0021 24.062 26.6997C25.3379 26.1799 26.4059 25.0174 26.8029 23.7037C26.9635 23.165 27.0013 22.8625 26.9635 22.0781C26.9352 21.1991 26.8974 21.0479 26.5855 20.3864C25.8105 18.7513 24.2794 17.7117 22.5499 17.6172C22.1529 17.5983 21.7276 17.6077 21.5953 17.6266ZM23.5517 19.8004C24.081 20.0556 24.5913 20.5754 24.8748 21.1519C24.9977 21.4071 25.045 21.7095 25.045 22.3427C25.045 23.1555 25.0261 23.2311 24.7236 23.7415C23.5611 25.6412 20.8014 25.5656 19.7902 23.5997C19.5066 23.0421 19.4405 22.0119 19.6484 21.3787C20.1682 19.8004 22.0206 19.0537 23.5517 19.8004Z"})])],-1))],64))}}),[["__scopeId","data-v-d11e6069"]]),Z1=v(t.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[t.createElementVNode("path",{d:"M13.4323 2.0816C13.3788 2.0909 13.2951 2.12113 13.2462 2.14904C13.1997 2.17462 11.5439 3.85601 9.56715 5.8816C6.70668 8.81648 5.96017 9.59322 5.90436 9.69787C5.84622 9.8095 5.83691 9.85601 5.83691 9.99787C5.83691 10.1397 5.84622 10.1886 5.90436 10.2979C6.00436 10.4886 13.102 17.7746 13.2764 17.8653C13.3695 17.9142 13.423 17.9258 13.5555 17.9258C13.916 17.9235 14.1788 17.6583 14.1788 17.2932C14.1788 17.0374 14.1392 16.9769 13.623 16.4467C13.3695 16.1862 11.8555 14.6328 10.2555 12.9909C8.65552 11.349 7.35087 9.99787 7.35552 9.9909C7.36017 9.9816 8.86715 8.43276 10.7044 6.54904C12.5416 4.66532 14.0671 3.08392 14.0951 3.03508C14.2392 2.79555 14.1951 2.45834 13.9927 2.25834C13.8462 2.1095 13.6323 2.04206 13.4323 2.0816Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-ca16a90c"]]),J1=v(t.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.createElementVNode("path",{d:"M29.3678 7.25259C29.2732 7.3128 28.8775 7.6999 28.5076 8.13001C27.7076 9.02463 16.2409 22.0483 16.2065 22.0999C16.1549 22.1601 15.6732 21.73 13.9786 20.1042C8.31835 14.6934 8.5334 14.8827 8.03448 14.8827C7.69899 14.8827 7.59577 14.9257 7.3463 15.1752C7.09684 15.4246 7.05383 15.5279 7.05383 15.8547C7.05383 16.3365 6.98501 16.259 10.1506 19.2354C11.5011 20.4999 13.256 22.1601 14.056 22.9171C15.6302 24.4225 15.9485 24.6461 16.3872 24.5687C16.7399 24.4999 16.7743 24.4569 20.0947 20.6891C21.5485 19.0289 23.2689 17.0762 23.914 16.3451C29.4624 10.0655 30.6495 8.69775 30.77 8.48269C30.942 8.14721 30.8474 7.6999 30.5377 7.38162C30.3399 7.19237 30.2194 7.14076 29.9183 7.14076C29.7119 7.14936 29.471 7.19237 29.3678 7.25259Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-48c8e6e2"]]),Aa=v(t.defineComponent({__name:"IconClose",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[t.createElementVNode("path",{d:"M7.53508 7.18138C7.03684 7.5158 6.86132 8.14496 7.1161 8.66643C7.18971 8.8138 8.02201 9.69236 9.44881 11.1207C10.6718 12.345 11.8211 13.49 12.0023 13.6714L12.3251 14.0058L9.80551 16.5224C7.92576 18.4043 7.25199 19.1184 7.14441 19.3225C6.83867 19.9346 7.0425 20.5865 7.637 20.8926C7.89745 21.0286 8.41268 21.0343 8.6618 20.9096C8.76372 20.8585 10.0037 19.6626 11.4191 18.2455L14.001 15.6666L16.5432 18.2229C18.1964 19.8723 19.1703 20.8132 19.3232 20.8869C19.5779 21.0116 20.0309 21.0399 20.2913 20.9379C20.5178 20.8529 20.8632 20.5015 20.9368 20.2747C21.0274 19.9913 21.0161 19.5719 20.9028 19.3508C20.8519 19.2431 19.6516 17.9961 18.2361 16.5791L15.6656 14.0001L18.2191 11.4495C19.7138 9.95309 20.8179 8.80813 20.8858 8.6721C21.0104 8.42837 21.0387 7.98058 20.9425 7.73119C20.8519 7.50446 20.5971 7.23239 20.3593 7.11336C20.0988 6.97733 19.6516 6.96599 19.3628 7.08502C19.2212 7.14737 18.3097 8.01459 16.5771 9.74904L14.001 12.328L11.4191 9.75471C9.6583 7.99192 8.77504 7.14737 8.63349 7.08502C8.51459 7.03968 8.28246 7 8.1126 7C7.86347 7 7.76156 7.03401 7.53508 7.18138Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-cbcad2a0"]]),K1=v(t.defineComponent({__name:"IconEdit",props:{size:{type:String,default:""},margin:{type:String,default:"0 15px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.createElementVNode("path",{d:"M21.993 4.16087C21.6831 4.26049 21.2404 4.48185 20.9969 4.64787C20.1778 5.22342 4.60489 20.9402 4.39459 21.4051C4.11789 22.0138 3 25.8434 3 26.1865C3 26.5961 3.30991 27.1938 3.65302 27.4373C4.2507 27.8689 4.58275 27.8468 6.88493 27.1716C8.06923 26.8174 9.23138 26.4411 9.47488 26.3194C10.0062 26.0537 25.4795 10.6468 26.0772 9.79458C26.8519 8.67669 26.9626 7.32637 26.3871 6.10887C25.6234 4.48185 23.6754 3.61853 21.993 4.16087ZM24.0406 6.25276C24.7379 6.70655 25.0035 7.69162 24.6272 8.44426C24.4501 8.78737 9.331 24.0393 8.73332 24.471C8.48982 24.6481 5.2247 25.6995 5.13616 25.6331C5.11402 25.611 5.42393 24.5042 5.82239 23.1871L6.12123 22.1909L14.1125 14.1886C22.5243 5.76576 22.4911 5.79896 23.3101 5.94285C23.4983 5.97605 23.8192 6.11994 24.0406 6.25276Z",fill:"currentColor"}),t.createElementVNode("path",{d:"M15.098 25.9216C14.5446 26.1872 14.4118 27.1169 14.8656 27.5265C15.0759 27.7146 15.4743 27.7257 21.1302 27.7589C25.325 27.781 27.273 27.7478 27.4722 27.6703C28.0367 27.4268 28.1806 26.6521 27.7489 26.154L27.4833 25.8441L21.4069 25.822C17.2674 25.8109 15.264 25.833 15.098 25.9216Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-55ea5a5c"]]),e0=v(t.defineComponent({__name:"IconEmail",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[t.createElementVNode("path",{d:"M20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V5.913C2.02243 5.39779 2.24301 4.91116 2.61568 4.5547C2.98835 4.19824 3.4843 3.99951 4 4H20C20.5304 4 21.0391 4.21071 21.4142 4.58579C21.7893 4.96086 22 5.46957 22 6V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20ZM4 7.868V18H20V7.868L12 13.2L4 7.868ZM4.8 6L12 10.8L19.2 6H4.8Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-99358e0a"]]),t0=v(t.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[t.createElementVNode("path",{d:"M8.91736 3.08529L6.83471 5.17059H8.0843H9.33058V7.25588V9.34117H7.24793H5.16529L5.15868 8.09993L5.14876 6.85868L3.07273 8.93404L1 11.0127L3.08264 13.098L5.16529 15.1833V13.9321V12.6843H7.24793H9.33058V14.7696V16.8548H7.89256C7.10248 16.8548 6.45455 16.8648 6.45785 16.878C6.45785 16.8946 6.60992 17.0402 6.79504 17.2057C7.16529 17.5367 8.90744 19.1189 9.38017 19.5525C10.7058 20.7639 10.9967 21.0188 11.0331 20.999C11.0562 20.9857 12.0876 20.0523 13.3273 18.9236L15.5785 16.8714L14.124 16.8615L12.6694 16.8548V14.7696V12.6843H14.7521H16.8347V13.9255C16.8347 14.6074 16.8446 15.1668 16.8612 15.1668C16.8975 15.1668 21 11.0491 21 11.0127C21 10.9763 16.8975 6.85868 16.8612 6.85868C16.8446 6.85868 16.8347 7.41807 16.8347 8.09993V9.34117H14.7521H12.6694V7.25588V5.17059H13.9091C14.5901 5.17059 15.1488 5.16066 15.1488 5.14411C15.1488 5.12094 11.043 1 11.0165 1C11.0066 1 10.0612 1.93673 8.91736 3.08529ZM12.081 3.24086C12.6595 3.82011 13.1322 4.30337 13.1322 4.31661C13.1322 4.33316 12.8413 4.34309 12.4876 4.34309H11.843V7.25588V10.1687H14.7686H17.6942V9.53646C17.6909 9.18891 17.6975 8.89763 17.7041 8.89101C17.7074 8.88439 18.1934 9.36103 18.7785 9.9469L19.843 11.0127L18.7686 12.0885L17.6942 13.1642V12.9325C17.6909 12.8034 17.6876 12.5155 17.6843 12.2871L17.6777 11.8733L14.762 11.8634L11.843 11.8568V14.7696V17.6823L12.6331 17.689L13.4264 17.6989L12.2165 18.7978L11.0066 19.9L10.7223 19.6419C10.5669 19.5028 10.4314 19.3804 10.4215 19.3704C10.405 19.3539 9.92893 18.917 9.28099 18.3311C9.09917 18.1656 8.86777 17.9538 8.7686 17.8578L8.58678 17.6823H9.37355H10.157V14.7696V11.8568H7.24793H4.33884L4.33223 12.5022L4.32231 13.1477L3.25455 12.0785L2.19008 11.0127L3.25455 9.94359L4.32231 8.87446L4.33223 9.52322L4.33884 10.1687H7.24793H10.157V7.25588V4.34309L9.5124 4.33647L8.86446 4.32654L9.93223 3.25741C10.5174 2.67154 11.0066 2.1916 11.0165 2.1916C11.0264 2.1916 11.5058 2.66492 12.081 3.24086Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-05547f14"]]),n0=v(t.defineComponent({__name:"IconPhone",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[t.createElementVNode("path",{d:"M19.4998 21.75H19.3723C4.63482 20.9025 2.54232 8.4675 2.24982 4.6725C2.22625 4.37744 2.26114 4.08062 2.35248 3.79906C2.44382 3.5175 2.58981 3.25673 2.78211 3.03169C2.9744 2.80665 3.20921 2.62177 3.47308 2.48763C3.73695 2.35349 4.02469 2.27274 4.31982 2.25H8.45232C8.75274 2.24971 9.04632 2.33963 9.29504 2.50812C9.54377 2.67661 9.73617 2.9159 9.84732 3.195L10.9873 6C11.0971 6.27266 11.1243 6.57156 11.0657 6.85957C11.007 7.14758 10.865 7.412 10.6573 7.62L9.05982 9.2325C9.30936 10.6506 9.98846 11.9578 11.0052 12.9772C12.022 13.9967 13.3274 14.6792 14.7448 14.9325L16.3723 13.32C16.5834 13.1146 16.8504 12.9759 17.1398 12.9213C17.4292 12.8666 17.7283 12.8983 17.9998 13.0125L20.8273 14.145C21.1022 14.2597 21.3367 14.4536 21.501 14.702C21.6653 14.9504 21.7519 15.2422 21.7498 15.54V19.5C21.7498 20.0967 21.5128 20.669 21.0908 21.091C20.6689 21.5129 20.0966 21.75 19.4998 21.75ZM4.49982 3.75C4.30091 3.75 4.11014 3.82902 3.96949 3.96967C3.82884 4.11032 3.74982 4.30109 3.74982 4.5V4.56C4.09482 9 6.30732 19.5 19.4548 20.25C19.5534 20.2561 19.6521 20.2427 19.7454 20.2105C19.8388 20.1783 19.9248 20.1281 19.9987 20.0626C20.0726 19.9971 20.1328 19.9176 20.1759 19.8288C20.219 19.74 20.2441 19.6436 20.2498 19.545V15.54L17.4223 14.4075L15.2698 16.545L14.9098 16.5C8.38482 15.6825 7.49982 9.1575 7.49982 9.09L7.45482 8.73L9.58482 6.5775L8.45982 3.75H4.49982Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-131f6ba1"]]),i0=v(t.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[t.createElementVNode("path",{d:"M3.08417 4.43062C2.86268 4.4769 2.70731 4.56285 2.52549 4.74467C2.29408 4.97607 2.20152 5.2174 2.22136 5.55459C2.25111 6.0207 1.96681 5.70996 6.78995 10.5397C9.18995 12.9463 11.2263 14.9662 11.309 15.029C11.5238 15.1843 11.7123 15.2471 11.99 15.2505C12.4693 15.2538 12.109 15.581 17.1106 10.5728C22.0891 5.58764 21.7288 5.98103 21.7255 5.505C21.7255 5.37607 21.7023 5.21078 21.6726 5.13145C21.5106 4.68186 21.0511 4.38434 20.5817 4.4174C20.1519 4.44715 20.4263 4.19591 16.0164 8.60252L11.9833 12.629L8.06598 8.71161C5.91061 6.55624 4.0726 4.73475 3.98003 4.66202C3.71227 4.45376 3.38499 4.36781 3.08417 4.43062Z",fill:"currentColor"}),t.createElementVNode("path",{d:"M9.69602 16.8994C9.70593 16.9292 9.72577 17.0184 9.73569 17.1044C9.76213 17.2664 9.7985 17.2994 9.83486 17.1903C9.84478 17.154 9.89106 17.1143 9.93734 17.1044C10.0464 17.078 10.0365 17.0548 9.87453 16.9589C9.6861 16.8465 9.67288 16.8432 9.69602 16.8994Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-4d8b581f"]]),o0=v(t.defineComponent({__name:"ArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{d:"M656.733 149.806C659.446 147.019 662.69 144.804 666.274 143.292C669.857 141.779 673.707 141 677.597 141C681.486 141 685.337 141.779 688.92 143.292C692.503 144.804 695.748 147.019 698.461 149.806C704.024 155.518 707.138 163.176 707.138 171.15C707.138 179.123 704.024 186.782 698.461 192.494L386.589 512.366L698.461 832.302C701.269 835.176 703.483 838.575 704.976 842.305C706.47 846.035 707.215 850.022 707.167 854.04C707.119 858.057 706.281 862.026 704.699 865.72C703.118 869.413 700.824 872.759 697.949 875.566C695.211 878.242 691.972 880.351 688.417 881.774C684.863 883.197 681.063 883.904 677.235 883.857C673.407 883.809 669.625 883.007 666.107 881.497C662.589 879.986 659.404 877.797 656.733 875.054L325.085 534.702C319.26 528.726 316 520.711 316 512.366C316 504.021 319.26 496.006 325.085 490.03L656.733 149.806Z"})])],-1))],64))}}),[["__scopeId","data-v-46c690c8"]]),r0=v(t.defineComponent({__name:"ArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{d:"M366.436 875.054C363.723 877.84 360.479 880.055 356.895 881.568C353.312 883.08 349.462 883.859 345.572 883.859C341.683 883.859 337.832 883.08 334.249 881.568C330.666 880.055 327.421 877.84 324.708 875.054C319.145 869.342 316.031 861.683 316.031 853.71C316.031 845.736 319.145 838.077 324.708 832.366L636.58 512.494L324.708 192.558C321.9 189.684 319.686 186.284 318.193 182.555C316.699 178.825 315.954 174.837 316.002 170.82C316.049 166.802 316.888 162.833 318.47 159.14C320.051 155.446 322.345 152.1 325.22 149.294C327.958 146.618 331.197 144.508 334.752 143.086C338.306 141.663 342.106 140.955 345.934 141.003C349.762 141.05 353.544 141.852 357.062 143.363C360.58 144.873 363.765 147.063 366.436 149.806L698.084 490.158C703.909 496.134 707.169 504.148 707.169 512.494C707.169 520.839 703.909 528.854 698.084 534.83L366.436 875.054Z"})])],-1))],64))}}),[["__scopeId","data-v-b688738b"]]),s0=v(t.defineComponent({__name:"DoubleArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{d:"M529.408 149.376C532.121 146.589 535.365 144.374 538.949 142.862C542.532 141.35 546.382 140.57 550.272 140.57C554.161 140.57 558.011 141.35 561.595 142.862C565.178 144.374 568.422 146.589 571.136 149.376C576.699 155.088 579.813 162.746 579.813 170.72C579.813 178.694 576.699 186.352 571.136 192.064L259.264 511.936L571.136 831.872C573.943 834.746 576.157 838.145 577.651 841.875C579.145 845.605 579.889 849.593 579.842 853.61C579.794 857.628 578.956 861.597 577.374 865.29C575.792 868.984 573.499 872.329 570.624 875.136C567.886 877.812 564.647 879.922 561.092 881.344C557.538 882.767 553.738 883.475 549.91 883.427C546.081 883.38 542.3 882.578 538.782 881.067C535.264 879.556 532.079 877.367 529.408 874.624L197.76 534.272C191.935 528.296 188.675 520.281 188.675 511.936C188.675 503.591 191.935 495.576 197.76 489.6L529.408 149.376ZM785.408 149.376C788.121 146.589 791.365 144.374 794.949 142.862C798.532 141.35 802.382 140.57 806.272 140.57C810.161 140.57 814.011 141.35 817.595 142.862C821.178 144.374 824.422 146.589 827.136 149.376C832.699 155.088 835.813 162.746 835.813 170.72C835.813 178.694 832.699 186.352 827.136 192.064L515.264 511.936L827.136 831.872C829.943 834.746 832.157 838.145 833.651 841.875C835.145 845.605 835.889 849.593 835.842 853.61C835.794 857.628 834.956 861.597 833.374 865.29C831.792 868.984 829.499 872.329 826.624 875.136C823.886 877.812 820.647 879.922 817.092 881.344C813.538 882.767 809.738 883.475 805.91 883.427C802.081 883.38 798.3 882.578 794.782 881.067C791.264 879.556 788.079 877.367 785.408 874.624L453.76 534.272C447.935 528.296 444.675 520.281 444.675 511.936C444.675 503.591 447.935 495.576 453.76 489.6L785.408 149.376Z"})])],-1))],64))}}),[["__scopeId","data-v-bd131770"]]),a0=v(t.defineComponent({__name:"DoubleArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{d:"M495.111 874.624C492.397 877.411 489.153 879.626 485.57 881.138C481.987 882.65 478.136 883.43 474.247 883.43C470.357 883.43 466.507 882.65 462.924 881.138C459.34 879.626 456.096 877.411 453.383 874.624C447.819 868.912 444.706 861.254 444.706 853.28C444.706 845.306 447.819 837.648 453.383 831.936L765.255 512.064L453.383 192.128C450.575 189.254 448.361 185.855 446.867 182.125C445.374 178.395 444.629 174.407 444.677 170.39C444.724 166.372 445.563 162.403 447.145 158.71C448.726 155.016 451.02 151.671 453.895 148.864C456.633 146.188 459.872 144.078 463.426 142.656C466.981 141.233 470.781 140.525 474.609 140.573C478.437 140.62 482.219 141.422 485.737 142.933C489.254 144.444 492.44 146.633 495.111 149.376L826.759 489.728C832.584 495.704 835.844 503.719 835.844 512.064C835.844 520.409 832.584 528.424 826.759 534.4L495.111 874.624ZM239.111 874.624C236.397 877.411 233.153 879.626 229.57 881.138C225.987 882.65 222.136 883.43 218.247 883.43C214.357 883.43 210.507 882.65 206.924 881.138C203.34 879.626 200.096 877.411 197.383 874.624C191.819 868.912 188.706 861.254 188.706 853.28C188.706 845.306 191.819 837.648 197.383 831.936L509.255 512.064L197.383 192.128C194.575 189.254 192.361 185.855 190.867 182.125C189.374 178.395 188.629 174.407 188.677 170.39C188.724 166.372 189.563 162.403 191.145 158.71C192.726 155.016 195.02 151.671 197.895 148.864C200.633 146.188 203.872 144.078 207.426 142.656C210.981 141.233 214.781 140.525 218.609 140.573C222.437 140.62 226.219 141.422 229.737 142.933C233.254 144.444 236.44 146.633 239.111 149.376L570.759 489.728C576.584 495.704 579.844 503.719 579.844 512.064C579.844 520.409 576.584 528.424 570.759 534.4L239.111 874.624Z"})])],-1))],64))}}),[["__scopeId","data-v-db5832a2"]]),l0=v(t.defineComponent({__name:"EllipsisSvg",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),o[3]||(o[3]=t.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-5abed3e4><symbol id="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" data-v-5abed3e4><path d="M65 135C73.2843 135 80 128.284 80 120C80 111.716 73.2843 105 65 105C56.7157 105 50 111.716 50 120C50 128.284 56.7157 135 65 135Z" data-v-5abed3e4></path><path d="M120 135C128.284 135 135 128.284 135 120C135 111.716 128.284 105 120 105C111.716 105 105 111.716 105 120C105 128.284 111.716 135 120 135Z" data-v-5abed3e4></path><path d="M175 135C183.284 135 190 128.284 190 120C190 111.716 183.284 105 175 105C166.716 105 160 111.716 160 120C160 128.284 166.716 135 175 135Z" data-v-5abed3e4></path></symbol></svg>',1))],64))}}),[["__scopeId","data-v-5abed3e4"]]);function c0(n){n.component("IconDownload",Y1),n.component("IconFilter",X1),n.component("ArrowLeft",o0),n.component("ArrowRight",r0),n.component("DoubleArrowLeft",s0),n.component("DoubleArrowRight",a0),n.component("EllipsisSvg",l0),n.component("IconArrowLeft",Z1),n.component("IconCheckDefault",J1),n.component("IconClose",Aa),n.component("IconEdit",K1),n.component("IconEmail",e0),n.component("IconMove",t0),n.component("IconPhone",n0),n.component("IconSearch",Pa),n.component("IconSelectArrow",i0)}const d0=t.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const e=t.ref(n.initActiveIdx),i=o=>{e.value=o};return t.watch(()=>n.initActiveIdx,()=>{i(n.initActiveIdx)}),{changeActiveId:i,activeIdx:e}}});function u0(n,e,i,o,r,s){return t.openBlock(),t.createElementBlock("div",null,[t.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const f0=v(d0,[["render",u0]]),h0=t.defineComponent({name:"CollapseItem",props:{tabId:{type:String,required:!1,default:""},activeId:{type:String,default:""},isCollaps:{type:Boolean,default:!0},title:{type:String,default:""},showToolsOnHover:{type:Boolean,default:!0},background:{type:String,required:!1,default:"#ffffff"},backgroundAttention:{type:String,required:!1,default:"#ffffff"},changeColor:{type:Boolean,default:!1},margin:{type:String,default:"10px 8px 2px 2px"},padding:{type:String,default:"0 10px"},selectable:{type:Boolean,default:!1}},emits:["changeActiveId"],setup(n,{emit:e}){const i=t.ref(n.activeId==="0"),o=()=>{i.value=!i.value,e("changeActiveId",n.tabId)};return t.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!0)}),t.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!1)}),{collapsed:i,handleItemClick:o}}}),m0=["for"],p0={class:"inside-icon"};function g0(n,e,i,o,r,s){return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:"tab",style:t.normalizeStyle({margin:n.margin,height:n.isCollaps&&n.collapsed?"60px":"","box-shadow":n.selectable&&n.activeId===n.tabId?"0px 0px 1px 2px #1979cf":""})},[n.isCollaps&&n.collapsed?(t.openBlock(),t.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:e[0]||(e[0]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...e[3]||(e[3]=[t.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])])):n.isCollaps&&!n.collapsed?(t.openBlock(),t.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:e[1]||(e[1]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...e[4]||(e[4]=[t.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)])])):t.createCommentVNode("",!0),t.createElementVNode("label",{for:n.tabId,onClick:e[2]||(e[2]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[t.createElementVNode("div",{style:t.normalizeStyle({cursor:n.isCollaps?"pointer":"default",background:n.changeColor?n.background:n.backgroundAttention,padding:n.padding,borderRadius:"5px"}),class:"tab-name"},[t.createElementVNode("div",p0,[t.renderSlot(n.$slots,"icon",{},void 0,!0)]),t.createElementVNode("div",{class:"title-in",style:t.normalizeStyle({marginRight:n.isCollaps?"50px":"0",width:n.isCollaps?"calc(100% - 50px)":"100%"})},[t.renderSlot(n.$slots,"inside-title",{},()=>[t.createTextVNode(t.toDisplayString(n.title),1)],!0)],4),t.createElementVNode("div",{class:t.normalizeClass(["tools-bar",{"hidden-part":n.showToolsOnHover}])},[t.renderSlot(n.$slots,"tools",{},void 0,!0)],2)],4)],8,m0),t.createElementVNode("div",{style:t.normalizeStyle({maxHeight:n.isCollaps?"":"1000000vh",background:n.changeColor?n.background:n.backgroundAttention}),class:t.normalizeClass(n.collapsed?"tab-content-down":"tab-content-up")},[t.renderSlot(n.$slots,"default",{},void 0,!0)],6)],4),e[5]||(e[5]=t.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-c2e31ebb><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-c2e31ebb></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-c2e31ebb></path></symbol></svg>',1))],64)}const y0=v(h0,[["render",g0],["__scopeId","data-v-c2e31ebb"]]),w0={class:"tab"},b0={class:"rotate"},S0=v(t.defineComponent({__name:"VerticalCollapseContainer",setup(n){const e=t.ref(!1),i=async()=>{e.value=!e.value};return(o,r)=>{const s=t.resolveComponent("ArrowRight"),a=t.resolveComponent("ArrowLeft");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",w0,[t.renderSlot(o.$slots,"main",{},void 0,!0),t.createElementVNode("div",{style:t.normalizeStyle({width:t.unref(e)?"50%":"20px",transition:"0.3s"}),class:"left"},[t.createElementVNode("div",{style:t.normalizeStyle({width:t.unref(e)?"100%":"0",transition:"0.3s"}),class:"left-content"},[t.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),t.createElementVNode("div",{class:"arrow-bar",onClick:i},[t.createElementVNode("div",b0,[t.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),t.unref(e)?(t.openBlock(),t.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(t.openBlock(),t.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),t.createElementVNode("div",{style:t.normalizeStyle({width:t.unref(e)?"50%":"100%",transition:"0.3s"}),class:"right"},[t.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),t.createVNode(a),t.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),C0={class:"add-block_body"},k0=v(t.defineComponent({__name:"PAdd",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(n){return(e,i)=>{const o=t.resolveComponent("PSticky");return t.openBlock(),t.createElementBlock("div",{class:"add-block",style:t.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[t.createVNode(o,{top:n.top,"z-index":n.zIndex},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),t.createElementVNode("div",C0,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),x0=v(t.defineComponent({__name:"PContainer",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"add-block",style:t.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),E0={class:"add-block_body"},B0=v(t.defineComponent({__name:"PContainerStickyHead",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(n){return(e,i)=>{const o=t.resolveComponent("PSticky"),r=t.resolveComponent("PContainer");return t.openBlock(),t.createBlock(r,{background:n.background,margin:n.margin,padding:n.padding},{default:t.withCtx(()=>[t.createVNode(o,{top:n.top,"z-index":n.zIndex},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),t.createElementVNode("div",E0,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),$0=["src"],N0={key:0,class:"header-row"},M0={class:"title-wrapper"},I0={key:0,class:"title-icon"},V0={class:"title-text"},T0={class:"text-subtitle1 text-weight-medium"},R0={key:0,class:"caption-row"},P0={class:"text-caption text-grey-6"},v0=["innerHTML"],A0={key:1,class:"card-footer"},za=v(t.defineComponent({__name:"PCard",props:{height:{type:String,default:"auto"},maxHeight:{type:String,default:"none"},img:{type:String,default:""},title:{type:String,default:""},content:{type:String,default:""},caption:{type:String,default:""},icon:{type:String,default:""},isMain:{type:Boolean,default:!1},noPointer:{type:Boolean,default:!1},noHover:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const i=t.ref(null),o=n,r=e,s=t.computed(()=>o.img?o.isMain?"365px":"200px":"0"),a=d=>{o.noPointer||r("click",d)};return(d,c)=>(t.openBlock(),t.createBlock(t.unref(V.QCard),{class:t.normalizeClass(["card",{"no-hover":n.noHover,"cursor-pointer":!n.noPointer}]),flat:"",bordered:"",style:t.normalizeStyle({height:n.height}),onClick:a},{default:t.withCtx(()=>[n.img?(t.openBlock(),t.createElementBlock("div",{key:0,class:"image-container",style:t.normalizeStyle({height:s.value})},[t.createElementVNode("img",{class:"image-img",src:n.img,alt:"image",style:t.normalizeStyle({height:s.value})},null,12,$0)],4)):t.createCommentVNode("",!0),t.createVNode(t.unref(V.QCardSection),{class:"card-content",style:t.normalizeStyle({maxHeight:n.maxHeight})},{default:t.withCtx(()=>[n.title||d.$slots.title||d.$slots.icon?(t.openBlock(),t.createElementBlock("div",N0,[t.createElementVNode("div",M0,[n.icon||d.$slots.icon?(t.openBlock(),t.createElementBlock("div",I0,[t.renderSlot(d.$slots,"icon",{},()=>[t.createVNode(t.unref(V.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",V0,[t.renderSlot(d.$slots,"title",{},()=>[t.createElementVNode("span",T0,t.toDisplayString(n.title),1)],!0)])]),d.$slots.caption||n.caption?(t.openBlock(),t.createElementBlock("div",R0,[t.renderSlot(d.$slots,"caption",{},()=>[t.createElementVNode("span",P0,t.toDisplayString(n.caption),1)],!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),n.title||d.$slots.title?(t.openBlock(),t.createBlock(t.unref(V.QSeparator),{key:1,class:"header-separator"})):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"contentRef",ref:i,class:"content-wrapper"},[t.renderSlot(d.$slots,"default",{},()=>[n.content?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(n.isMain?"main-content":"preview-content"),innerHTML:n.content},null,10,v0)):t.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),d.$slots.footer?(t.openBlock(),t.createElementBlock("div",A0,[t.renderSlot(d.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),z0={key:0,class:"list-title"},D0={class:"draggable-item"},F0={class:"drag-handle"},O0={class:"item-content"},_0={key:0,class:"item-actions"},L0={class:"item-content"},H0={key:0,class:"item-actions"},U0={key:4,class:"add-button-container"},q0=t.defineComponent({__name:"PCrudList",props:{sortable:{type:Boolean,default:!0},showAdd:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},title:{type:String,required:!0,default:""},store:{type:R.H.BaseStore,default:void 0},addFunc:{type:Function,required:!0},addToList:{type:Boolean,default:!0},removeFromList:{type:Boolean,default:!0},margin:{type:String,required:!0,default:"0"},background:{type:String,required:!0,default:"var(--background-color)"}},emits:["add","remove","update","sort"],setup(n,{emit:e}){t.useCssVars(c=>({v73008f9f:n.background}));const i=n,o=e,r=async()=>{const c=await i.addFunc();c.order!=="undefined"&&(c.order=i.list.length),i.addToList&&i.store&&i.store.AppendToAll(c),i.store&&await i.store.Create(c),await d(),o("add",c)},s=async c=>{i.removeFromList&&R.H.Classes.RemoveFromClassById(c,i.list),i.store&&await i.store.Remove(c),await d(),o("remove",c)},a=async c=>{i.store&&await i.store.Update(c),o("update",c)},d=async()=>{!i.sortable||i.list.length===0||typeof i.list[0].order>"u"||(R.H.Sorter.Sort(i.list),i.store&&await i.store.UpdateMany(i.list),o("sort"))};return(c,u)=>(t.openBlock(),t.createElementBlock("div",t.mergeProps(c.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(t.openBlock(),t.createElementBlock("div",z0,t.toDisplayString(n.title),1)):t.renderSlot(c.$slots,"title",{},void 0,!0,1),n.sortable?(t.openBlock(),t.createBlock(t.unref(mo),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:d},{item:t.withCtx(({element:f,index:h})=>[t.createElementVNode("div",D0,[t.createElementVNode("div",F0,[t.createVNode(t.unref(V.QIcon),{name:"drag_indicator",class:"drag-icon"})]),t.createElementVNode("div",O0,[t.renderSlot(c.$slots,"default",{item:f,update:a,index:h},()=>[t.createVNode(Wt,{modelValue:f.name,"onUpdate:modelValue":m=>f.name=m,outlined:"",dense:"",class:"content-input",onBlur:m=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(t.openBlock(),t.createElementBlock("div",_0,[t.createVNode(Ke,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:m=>s(f.id)},null,8,["onClick"])])):t.createCommentVNode("",!0)])]),_:3},8,["list"])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:3},t.renderList(n.list,(f,h)=>(t.openBlock(),t.createElementBlock("div",{key:f.id,class:"static-item",style:t.normalizeStyle({background:n.background})},[t.createElementVNode("div",L0,[t.renderSlot(c.$slots,"default",{item:f,update:a,index:h},()=>[t.createVNode(Wt,{modelValue:f.name,"onUpdate:modelValue":m=>f.name=m,outlined:"",dense:"",class:"content-input",onBlur:m=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(t.openBlock(),t.createElementBlock("div",H0,[t.createVNode(Ke,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:m=>s(f.id)},null,8,["onClick"])])):t.createCommentVNode("",!0)],4))),128)),n.showAdd?(t.openBlock(),t.createElementBlock("div",U0,[t.createVNode(Ke,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):t.createCommentVNode("",!0)],16))}}),Da=v(q0,[["__scopeId","data-v-27edbd1f"]]),j0={class:"del-block_title"},W0={class:"del-block_body"},G0=v(t.defineComponent({__name:"PDel",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"10px 10px 10px 50px"},padding:{type:String,required:!1,default:"10px"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"del-block",style:t.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[t.createElementVNode("div",j0,[t.renderSlot(e.$slots,"title",{},void 0,!0)]),t.createElementVNode("div",W0,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),Q0={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},Y0={class:"edit-dialog-header"},X0={class:"edit-dialog-title"},Z0={class:"edit-dialog-content"},J0={key:0,class:"edit-dialog-actions"},Fa=v(t.defineComponent({__name:"PEditDialog",props:t.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},Q0),emits:["update:modelValue","confirm","close"],setup(n,{expose:e,emit:i}){const o=n,r=i,s=t.ref(!1);t.watch(()=>o.modelValue,h=>{s.value=h},{immediate:!0});const a=async()=>{r("confirm"),d()},d=()=>{r("close"),s.value=!1,r("update:modelValue",!1)},c=()=>{s.value&&d()};e({opened:s,toggle:()=>{s.value=!s.value,r("update:modelValue",s.value)}});const f=async()=>{await t.nextTick();const h=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');h&&"focus"in h&&h.focus()};return(h,m)=>{const S=t.resolveDirective("close-popup");return t.openBlock(),t.createBlock(Ji,{modelValue:t.unref(s),"onUpdate:modelValue":[m[0]||(m[0]=w=>t.isRef(s)?s.value=w:null),d],position:"top",onKeydown:[t.withKeys(a,["enter"]),t.withKeys(c,["escape"])],onShow:f},{default:t.withCtx(()=>[t.createElementVNode("div",{class:"edit-dialog",style:t.normalizeStyle({width:o.width})},[t.createElementVNode("div",Y0,[t.createElementVNode("div",X0,t.toDisplayString(o.title),1),t.withDirectives(t.createVNode(Ke,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[S]])]),t.createElementVNode("div",Z0,[t.renderSlot(h.$slots,"default",{},void 0,!0)]),o.showConfirm?(t.openBlock(),t.createElementBlock("div",J0,[t.withDirectives(t.createVNode(Ke,{flat:"",label:o.cancelLabel,size:"sm"},null,8,["label"]),[[S]]),t.createVNode(Ke,{flat:"",label:o.confirmLabel,color:"primary",disable:o.disabled,size:"sm",onClick:a},null,8,["label","disable"])])):t.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"])}}}),[["__scopeId","data-v-beb7df93"]]),Oa=v(t.defineComponent({__name:"PModal",props:{showCloseDialog:{type:Boolean,required:!1,default:!1},closable:{type:Boolean,required:!1,default:!1},show:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:String,default:"760px"},maxHeight:{type:String,default:"70vh"},margin:{type:String,default:"auto"},top:{type:String,default:"20vh"},padding:{type:String,default:"var(--modal-window-padding)"},showClose:{type:Boolean,default:!1}},emits:["save","close"],setup(n,{emit:e}){const i=n,o=e,r=a=>{a.key==="Escape"&&s()};t.onMounted(()=>{document.body.addEventListener("keydown",r)}),t.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{i.closable&&o("close")};return(a,d)=>{const c=t.resolveComponent("IconClose");return t.openBlock(),t.createElementBlock(t.Fragment,null,[n.show?(t.openBlock(),t.createElementBlock("div",{key:0,class:"blur",onClick:s})):t.createCommentVNode("",!0),n.show?(t.openBlock(),t.createElementBlock("div",{key:1,class:"modal-w",style:t.normalizeStyle({maxWidth:n.width,width:n.width,margin:n.margin,padding:n.padding,top:n.top,maxHeight:n.maxHeight})},[n.closable?(t.openBlock(),t.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[t.createVNode(c,{size:"20px"})])):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"default",{},void 0,!0)],4)):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function K0(n){n.component("CollapseContainer",f0),n.component("CollapseItem",y0),n.component("VerticalCollapseContainer",S0),n.component("PAdd",k0),n.component("PCard",za),n.component("PCrudList",Da),n.component("PEditDialog",Fa),n.component("PModal",Oa),n.component("PContainer",x0),n.component("PContainerStickyHead",B0),n.component("PDel",G0)}const ey={class:"btn-group"},_a=v(t.defineComponent({__name:"PAuthForm",props:{width:{type:String,default:"auto"},margin:{type:String,default:"auto"},padding:{type:String,default:"0"},background:{type:String,default:"inherit"}},emits:["submit"],setup(n,{emit:e}){const i=e,o=t.computed(()=>Ae.Form.GetButtons()),r=t.useTemplateRef("fields"),s=async d=>{if(!d.isSubmit){Ae.Form.SetChunk(d.GetChunk()),a();return}const c=Ae.Form.Validate();if(c.length>0){qt.Notify.Error(c.join("<br/>"));return}i("submit")},a=()=>{if(!r.value)return;const d=r.value[0];d&&d.$refs.input.focus()};return t.onMounted(async()=>{await a()}),t.onBeforeUnmount(()=>{Ae.Form.Reset()}),(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"auth-card",style:t.normalizeStyle({maxWidth:n.width,margin:n.margin,padding:n.padding,background:n.background})},[t.createVNode(or,{string:t.unref(Ae).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(Ae).Form.GetFields(),u=>(t.openBlock(),t.createBlock(Wt,{id:u.id,key:u.id,ref_for:!0,ref_key:"fields",ref:r,modelValue:u.value,"onUpdate:modelValue":f=>u.value=f,autocomplete:"nope",type:u.IsPassword?"password":"text",placeholder:u.label,margin:"10px 0 0 0"},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder"]))),128)),t.createElementVNode("div",ey,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o),(u,f)=>(t.openBlock(),t.createBlock(Ke,{id:u.id,key:u.GetChunk(),disabled:t.unref(Ae).Form.IsBlock,type:f===0?t.unref(me).Success:t.unref(me).Primary,skin:"base",text:u.text,margin:"10px 0 0 0",width:"100%",onClick:h=>s(u)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),ty=t.defineComponent({__name:"PAuthModal",props:{width:{type:String,default:"320px"},margin:{type:String,default:"0"},padding:{type:String,default:"2vw"}},emits:["submit"],setup(n){const e=()=>{Ae.Form.Reset(),Ae.Modal.Close()};return(i,o)=>(t.openBlock(),t.createBlock(Oa,{show:t.unref(Ae).Modal.Visible,closable:t.unref(Ae).Modal.Closable,width:n.width,padding:n.padding,onClose:e},{default:t.withCtx(()=>[t.createVNode(_a,{margin:n.margin,padding:"0",onSubmit:o[0]||(o[0]=r=>i.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),ny={class:"field"},iy=v(t.defineComponent({__name:"PNameEdit",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(!1),s=t.ref(),a=t.ref(i.withName.name),d=t.ref(!1),c=()=>{d.value=!1},u=async()=>{a.value.trim(),i.withName.setName&&i.withName.setName(a.value),r.value=!r.value,o("submit")};return(f,h)=>{const m=t.resolveComponent("PString"),S=t.resolveComponent("PInput"),w=t.resolveComponent("InfoItem"),E=t.resolveComponent("PButton"),B=t.resolveComponent("el-form");return t.openBlock(),t.createBlock(B,{ref_key:"form",ref:s,style:{width:"100%"}},{default:t.withCtx(()=>[t.createVNode(w,{title:"Название","show-save-dialog":d.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:c},{"open-inside-content":t.withCtx(()=>[t.createVNode(w,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:t.withCtx(()=>[t.createElementVNode("div",ny,[t.createVNode(S,{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=x=>a.value=x),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])])]),_:1}),t.createVNode(E,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:t.withCtx(()=>[a.value.length?(t.openBlock(),t.createBlock(m,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(t.openBlock(),t.createBlock(m,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-4f7966cb"]]),oy=["onClick"],ry=v(t.defineComponent({__name:"PTabs",props:{menus:{type:Object,required:!0},tabHeight:{type:String,required:!1,default:"40px"},height:{type:String,required:!1,default:""},minMenuItemWidth:{type:String,required:!1,default:"150px"},outTopMargin:{type:String,required:!1,default:"40px"},background:{type:String,required:!1,default:"#ffffff"},margin:{type:String,required:!1,default:"var(--tabs-margin, 0 10px 10px 10px)"},borderRadius:{type:String,required:!1,default:"var(--tabs-border-radius, 10px)"}},emits:["select"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(window.innerWidth),s=t.ref(),a=t.ref(Number(i.tabHeight.replace(/[^+\d]/g,""))),d=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(i.tabHeight.replace(/[^+\d]/g,""))};t.onMounted(()=>window.addEventListener("resize",d)),t.onUnmounted(()=>window.removeEventListener("resize",d));const c=t.computed(()=>`calc(100% - ${a.value}px + 1px)`);t.onBeforeMount(()=>{i.menus.Select()});const u=f=>{i.menus.Select(f),o("select")};return(f,h)=>(t.openBlock(),t.createElementBlock("div",{class:"mainblock",style:t.normalizeStyle({height:`calc(100% - ${n.outTopMargin} - ${n.tabHeight}`,margin:n.margin,borderRadius:n.borderRadius})},[t.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:t.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${n.minMenuItemWidth}, 1fr))`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.menus.items,(m,S)=>(t.openBlock(),t.createElementBlock("div",{key:S},[t.createElementVNode("div",{class:t.normalizeClass({"selected-tab":S===n.menus.idx,tab:S!==n.menus.idx}),style:t.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:w=>u(S)},t.toDisplayString(m.name),15,oy)]))),128))],4),t.createElementVNode("div",{class:"body-container",style:t.normalizeStyle({background:n.background,height:t.unref(c)})},[t.renderSlot(f.$slots,"default",{},()=>[n.menus.idx>-1?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.menus.GetComponent()),{key:0})):t.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-caa5b5d8"]]),sy=["id"],ay=["for"],ly={class:"left-field"},cy=["href","download"],dy={key:1,class:"text-field__input"},uy={class:"right-field"},fy=t.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Ge},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"Label",required:!1},margin:{type:String,required:!1,default:"10px 0 0 0"},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},placeholder:{type:String,required:!1,default:""}},emits:["upload","remove"],setup(n,{emit:e}){const i=n,o=e,r=De.GUID(),s=De.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!c(f.name)){Sn.Error(`Загруженный файл должен быть в одном из форматов: ${i.formats.join(", ")}`);return}const h=new Ge;h.setFile(f),h.url=URL.createObjectURL(f),o("upload",h)},d=()=>{o("remove")};t.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const c=u=>{let f=zs.Get(u);return!!i.formats.includes(f.toLowerCase())};return(u,f)=>{const h=t.resolveComponent("PString"),m=t.resolveComponent("PFlex"),S=t.resolveComponent("PButton");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("input",{id:t.unref(r),type:"file",hidden:"",onChange:a},null,40,sy),t.createElementVNode("div",{class:"text-field",style:t.normalizeStyle({margin:n.margin,padding:n.padding})},[n.label?(t.openBlock(),t.createElementBlock("label",{key:0,class:"text-field__label",for:n.label},t.toDisplayString(n.label),9,ay)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"field",style:t.normalizeStyle({borderColor:n.borderColor})},[t.createElementVNode("div",ly,[t.createVNode(m,null,{default:t.withCtx(()=>[t.renderSlot(u.$slots,"default",{},void 0,!0),t.createVNode(h,{string:n.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),n.fileInfo&&n.fileInfo.originalName?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-field__input",style:t.normalizeStyle({color:n.color})},[t.createElementVNode("a",{href:n.fileInfo.getFileUrl(),target:"_blank",download:n.fileInfo.originalName},[t.createElementVNode("div",null,t.toDisplayString(n.fileInfo.originalName),1)],8,cy),t.createVNode(S,{skin:"text",type:"del",onClick:d},{default:t.withCtx(()=>[t.createVNode(Aa,{size:"20px",margin:"0 5px"})]),_:1})],4)):(t.openBlock(),t.createElementBlock("div",dy,[t.createVNode(h,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),t.createElementVNode("div",uy,[t.createVNode(S,{id:t.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:n.fileInfo&&n.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),hy=v(fy,[["__scopeId","data-v-8b73ee22"]]);function La(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),i.push.apply(i,o)}return i}function ae(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?La(Object(i),!0).forEach(function(o){dt(n,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):La(Object(i)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(i,o))})}return n}function dt(n,e,i){return e in n?Object.defineProperty(n,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[e]=i,n}function my(n,e){if(n==null)return{};var i,o,r=function(a,d){if(a==null)return{};var c,u,f={},h=Object.keys(a);for(u=0;u<h.length;u++)c=h[u],d.indexOf(c)>=0||(f[c]=a[c]);return f}(n,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o<s.length;o++)i=s[o],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(n,i)&&(r[i]=n[i])}return r}function un(n){return function(e){if(Array.isArray(e))return sr(e)}(n)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(n)||function(e,i){if(e){if(typeof e=="string")return sr(e,i);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return sr(e,i)}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function sr(n,e){(e==null||e>n.length)&&(e=n.length);for(var i=0,o=new Array(e);i<e;i++)o[i]=n[i];return o}var Ha,py,eo,Ne=(Ha=function(n){/*!
27
27
  Copyright (c) 2018 Jed Watson.
28
28
  Licensed under the MIT License (MIT), see
29
29
  http://jedwatson.github.io/classnames
30
- */(function(){var e={}.hasOwnProperty;function i(){for(var o=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")o.push(s);else if(Array.isArray(s)){if(s.length){var d=i.apply(null,s);d&&o.push(d)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var c in s)e.call(s,c)&&s[c]&&o.push(c);else o.push(s.toString())}}return o.join(" ")}n.exports?(i.default=i,n.exports=i):window.classNames=i})()},Ha(Ki={path:py,exports:{},require:function(n,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(e==null&&Ki.path)}},Ki.exports),Ki.exports),yt=function(n){return function(e,i){if(!e)return n;var o;typeof e=="string"?o=e:i=e;var r=n;return o&&(r+="__"+o),r+(i?Object.keys(i).reduce(function(s,a){var d=i[a];return d&&(s+=" "+(typeof d=="boolean"?r+"--"+a:r+"--"+a+"_"+d)),s},""):"")}};function sr(n,e,i){var o,r,s,a,d;function c(){var f=Date.now()-a;f<e&&f>=0?o=setTimeout(c,e-f):(o=null,i||(d=n.apply(s,r),s=r=null))}e==null&&(e=100);var u=function(){s=this,r=arguments,a=Date.now();var f=i&&!o;return o||(o=setTimeout(c,e)),f&&(d=n.apply(s,r),s=r=null),d};return u.clear=function(){o&&(clearTimeout(o),o=null)},u.flush=function(){o&&(d=n.apply(s,r),s=r=null,clearTimeout(o),o=null)},u}sr.debounce=sr;var ar=sr,G=function(){return G=Object.assign||function(n){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},G.apply(this,arguments)};/*! *****************************************************************************
30
+ */(function(){var e={}.hasOwnProperty;function i(){for(var o=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")o.push(s);else if(Array.isArray(s)){if(s.length){var d=i.apply(null,s);d&&o.push(d)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var c in s)e.call(s,c)&&s[c]&&o.push(c);else o.push(s.toString())}}return o.join(" ")}n.exports?(i.default=i,n.exports=i):window.classNames=i})()},Ha(eo={path:py,exports:{},require:function(n,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(e==null&&eo.path)}},eo.exports),eo.exports),yt=function(n){return function(e,i){if(!e)return n;var o;typeof e=="string"?o=e:i=e;var r=n;return o&&(r+="__"+o),r+(i?Object.keys(i).reduce(function(s,a){var d=i[a];return d&&(s+=" "+(typeof d=="boolean"?r+"--"+a:r+"--"+a+"_"+d)),s},""):"")}};function ar(n,e,i){var o,r,s,a,d;function c(){var f=Date.now()-a;f<e&&f>=0?o=setTimeout(c,e-f):(o=null,i||(d=n.apply(s,r),s=r=null))}e==null&&(e=100);var u=function(){s=this,r=arguments,a=Date.now();var f=i&&!o;return o||(o=setTimeout(c,e)),f&&(d=n.apply(s,r),s=r=null),d};return u.clear=function(){o&&(clearTimeout(o),o=null)},u.flush=function(){o&&(d=n.apply(s,r),s=r=null,clearTimeout(o),o=null)},u}ar.debounce=ar;var lr=ar,G=function(){return G=Object.assign||function(n){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},G.apply(this,arguments)};/*! *****************************************************************************
31
31
  Copyright (c) Microsoft Corporation.
32
32
 
33
33
  Permission to use, copy, modify, and/or distribute this software for any
@@ -40,5 +40,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
40
40
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41
41
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42
42
  PERFORMANCE OF THIS SOFTWARE.
43
- ***************************************************************************** */function Ua(n,e){var i,o;return n&&e?(i=""+n+e[0].toUpperCase()+e.slice(1),o=n+"-"+e):(i=n||e,o=n||e),{name:i,classname:o}}function qa(n){return/^blob:/.test(n)}function ja(n){return qa(n)||function(e){return/^data:/.test(e)}(n)}function Dn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Re(n){return n===void 0}function eo(n){return typeof n=="object"&&n!==null}function lr(n,e,i){var o={};return eo(n)?(Object.keys(e).forEach(function(r){Re(n[r])?o[r]=e[r]:eo(e[r])?eo(n[r])?o[r]=lr(n[r],e[r],i[r]):o[r]=n[r]?e[r]:i[r]:e[r]===!0||e[r]===!1?o[r]=!!n[r]:o[r]=n[r]}),o):n?e:i}function to(n){var e=Number(n);return Number.isNaN(e)?n:e}function Wa(n){return typeof(n=="number"||function(e){return typeof e=="object"&&e!==null}(n)&&toString.call(n)=="[object Number]")&&!Ga(n)}function Ga(n){return n!=n}function Qa(n,e){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}var di=function(n,e){n===void 0&&(n={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=n,this.scale=e},gy=function(n,e){e===void 0&&(e={}),this.type="resize",this.directions=n,this.params=e},cr=function(n){this.type="move",this.directions=n},yy=function(){function n(e,i,o,r,s){this.type="drag",this.nativeEvent=e,this.position=o,this.previousPosition=r,this.element=i,this.anchor=s}return n.prototype.shift=function(){var e=this,i=e.element,o=e.anchor,r=e.position;if(i){var s=i.getBoundingClientRect(),a=s.left,d=s.top;return{left:r.left-a-o.left,top:r.top-d-o.top}}return{left:0,top:0}},n}(),dr={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(n){n.cancelable&&!this.disabled&&n.touches.length===1&&(this.touches=fn(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(e,i){return{clientX:e.clientX+i.clientX/n.touches.length,clientY:e.clientY+i.clientY/n.touches.length}},{clientX:0,clientY:0})),n.preventDefault&&n.preventDefault(),n.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(n){this.touches.length&&(this.processMove(n,n.touches),n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation())},onMouseDown:function(n){if(!this.disabled){var e={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[e],this.initAnchor(e),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var e=this.$refs.draggable.getBoundingClientRect(),i=e.left,o=e.right,r=e.bottom,s=e.top;this.anchor={left:n.clientX-i,top:n.clientY-s,bottom:r-n.clientY,right:o-n.clientX}},processMove:function(n,e){var i=fn(e);if(this.touches.length){if(this.touches.length===1&&i.length===1){var o=this.$refs.draggable;this.$emit("drag",new yy(n,o,{left:i[0].clientX,top:i[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=i}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};dr.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"draggable",class:i.classname,onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:e[3]||(e[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:e[4]||(e[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[t.renderSlot(n.$slots,"default")],34)};var ur=yt("vue-handler-wrapper"),Ya={name:"HandlerWrapper",components:{DraggableElement:dr},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var n;if(this.horizontalPosition||this.verticalPosition){var e,i=Ua(this.horizontalPosition,this.verticalPosition);n=ur((dt(e={},i.classname,!0),dt(e,"disabled",this.disabled),e))}else n=ur({disabled:this.disabled});return{root:n,draggable:ur("draggable")}}},emits:["leave","enter","drag","drag-end"]};Ya.render=function(n,e,i,o,r,s){var a=t.resolveComponent("DraggableElement");return t.openBlock(),t.createBlock("div",{class:s.classes.root},[t.createVNode(a,{class:s.classes.draggable,onDrag:e[1]||(e[1]=function(d){return n.$emit("drag",d)}),onDragEnd:e[2]||(e[2]=function(d){return n.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(d){return n.$emit("leave")}),onEnter:e[4]||(e[4]=function(d){return n.$emit("enter")})},{default:t.withCtx(function(){return[t.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var wy=yt("vue-line-wrapper"),Xa={name:"LineWrapper",components:{DraggableElement:dr},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return wy((dt(n={},this.position,!0),dt(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};Xa.render=function(n,e,i,o,r,s){var a=t.resolveComponent("DraggableElement");return t.openBlock(),t.createBlock(a,{class:s.classname,onDrag:e[1]||(e[1]=function(d){return n.$emit("drag",d)}),onDragEnd:e[2]||(e[2]=function(d){return n.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(d){return n.$emit("leave")}),onEnter:e[4]||(e[4]=function(d){return n.$emit("enter")})},{default:t.withCtx(function(){return[t.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var $t=["left","right","top","bottom"],by=["left","right"],Sy=["top","bottom"],Cy=["left","top"],ky=["fill-area","fit-area","stencil","none"],Za={left:0,top:0,width:0,height:0};function Ja(n,e,i){return!(i=i||["width","height","left","top"]).some(function(o){return n[o]!==e[o]})}function Nt(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function Fn(n,e){return{left:n.left-e.left,top:n.top-e.top}}function Oe(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function ui(n,e){var i={left:0,top:0,right:0,bottom:0};return $t.forEach(function(o){var r=e[o],s=Nt(n)[o];i[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),i}function Mt(n,e){return{left:n.left-e.left,top:n.top-e.top,width:n.width+e.left+e.right,height:n.height+e.top+e.bottom}}function no(n){return{left:-n.left,top:-n.top}}function et(n,e){return G(G({},n),{left:n.left+e.left,top:n.top+e.top})}function ut(n,e,i,o){if(e!==1){if(i){var r=Oe(n);return{width:n.width*e,height:n.height*e,left:n.left+n.width*(1-e)/2+(i.left-r.left)*(1-e),top:n.top+n.height*(1-e)/2+(i.top-r.top)*(1-e)}}return{width:n.width*e,height:n.height*e,left:n.left+n.width*(1-e)/2,top:n.top+n.height*(1-e)/2}}return n}function le(n){return n.width/n.height}function On(n,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/n.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/n.height:1/0)}function _n(n,e){var i={left:0,top:0},o=ui(n,e);return o.left&&o.left>0?i.left=o.left:o.right&&o.right>0&&(i.left=-o.right),o.top&&o.top>0?i.top=o.top:o.bottom&&o.bottom>0&&(i.top=-o.bottom),i}function fr(n,e){var i;return e.minimum&&n<e.minimum?i=e.minimum:e.maximum&&n>e.maximum&&(i=e.maximum),i}function Ka(n,e){var i=le(n),o=le(e);return e.width<1/0&&e.height<1/0?i>o?{width:e.width,height:e.width/i}:{width:e.height*i,height:e.height}:e.width<1/0?{width:e.width,height:e.width/i}:e.height<1/0?{width:e.height*i,height:e.height}:n}function el(n,e){var i=e*Math.PI/180;return{width:Math.abs(n.width*Math.cos(i))+Math.abs(n.height*Math.sin(i)),height:Math.abs(n.width*Math.sin(i))+Math.abs(n.height*Math.cos(i))}}function Qt(n,e){var i=e*Math.PI/180;return{left:n.left*Math.cos(i)-n.top*Math.sin(i),top:n.left*Math.sin(i)+n.top*Math.cos(i)}}function io(n,e){var i=ui(_e(n,e),e);return i.left+i.right+i.top+i.bottom?i.left+i.right>i.top+i.bottom?Math.min((n.width+i.left+i.right)/n.width,On(n,e)):Math.min((n.height+i.top+i.bottom)/n.height,On(n,e)):1}function _e(n,e,i){i===void 0&&(i=!1);var o=_n(n,e);return et(n,i?no(o):o)}function hr(n){return{width:n.right!==void 0&&n.left!==void 0?n.right-n.left:1/0,height:n.bottom!==void 0&&n.top!==void 0?n.bottom-n.top:1/0}}function xy(n,e){return G(G({},n),{minWidth:Math.min(e.width,n.minWidth),minHeight:Math.min(e.height,n.minHeight),maxWidth:Math.min(e.width,n.maxWidth),maxHeight:Math.min(e.height,n.maxHeight)})}function tl(n,e,i){i===void 0&&(i=!0);var o={};return $t.forEach(function(r){var s=n[r],a=e[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?i?Math.max(s,a):Math.min(s,a):i?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function oo(n,e){return tl(n,e,!0)}function nl(n){var e=n.size,i=n.aspectRatio,o=n.ignoreMinimum,r=n.sizeRestrictions;return!!((e.correctRatio||le(e)>=i.minimum&&le(e)<=i.maximum)&&e.height<=r.maxHeight&&e.width<=r.maxWidth&&e.width&&e.height&&(o||e.height>=r.minHeight&&e.width>=r.minWidth))}function il(n,e){return Math.pow(n.width-e.width,2)+Math.pow(n.height-e.height,2)}function Dt(n){var e=n.width,i=n.height,o=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,e)),height:Math.max(o.minHeight,Math.min(o.maxHeight,i))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(h,m){return nl({size:m,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:f})&&(!h||il(m,{width:e,height:i})<il(h,{width:e,height:i}))?m:h},null)}var d=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&d.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),nl({size:s,aspectRatio:r,sizeRestrictions:o})&&d.push(s);var c=a(d)||a(d,!0);return c&&{width:c.width,height:c.height}}function mr(n){var e=n.event,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=et(i,e.directions);return et(s,_n(s,r))}function Ey(n){var e=n.coordinates,i=n.transform,o=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,d=n.visibleArea,c=function(f,h){return mr({coordinates:f,positionRestrictions:s,event:new cr({left:h.left-f.left,top:h.top-f.top})})},u=G({},e);return(Array.isArray(i)?i:[i]).forEach(function(f){var h={};Re((h=typeof f=="function"?f({coordinates:u,imageSize:o,visibleArea:d}):f).width)&&Re(h.height)||(u=function(m,b){var C=G(G(G({},m),Dt({width:b.width,height:b.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return c(C,{left:m.left,top:m.top})}(u,G(G({},u),h))),Re(h.left)&&Re(h.top)||(u=c(u,G(G({},u),h)))}),u}function By(n){n.event;var e=n.getAreaRestrictions,i=n.boundaries,o=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,d=n.positionRestrictions;n.stencilReference;var c,u,f,h=G({},o),m=G({},r),b=G({},s);c=le(b),u=le(h),f===void 0&&(f=.001),(c===0||u===0?Math.abs(u-c)<f:Math.abs(u/c)<1+f&&Math.abs(u/c)>1-f)||(h=G(G({},h),Dt({sizeRestrictions:a,width:h.width,height:h.height,aspectRatio:{minimum:le(b),maximum:le(b)}})));var C=io(m=ut(m,h.width*i.width/(m.width*b.width)),e({visibleArea:m,type:"resize"}));return C!==1&&(m=ut(m,C),h=ut(h,C)),m=_e(m=et(m,Fn(Oe(h),Oe(m))),e({visibleArea:m,type:"move"})),{coordinates:h=_e(h,oo(Nt(m),d)),visibleArea:m}}function $y(n){var e=n.event,i=n.getAreaRestrictions,o=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var d=G({},r),c=G({},s);if(r&&s&&e.type!=="manipulateImage"){var u={width:0,height:0};c.width,o.width,le(o)>le(d)?(u.height=.8*o.height,u.width=u.height*le(d)):(u.width=.8*o.width,u.height=u.width*le(d));var f=io(c=ut(c,d.width*o.width/(c.width*u.width)),i({visibleArea:c,type:"resize"}));c=ut(c,f),f!==1&&(u.height/=f,u.width/=f),c=_e(c=et(c,Fn(Oe(d),Oe(c))),i({visibleArea:c,type:"move"})),d=_e(d,oo(Nt(c),a))}return{coordinates:d,visibleArea:c}}function Ny(n){var e=n.event,i=n.coordinates,o=n.visibleArea,r=n.getAreaRestrictions,s=G({},o),a=G({},i);if(e.type==="setCoordinates"){var d=Math.max(0,a.width-s.width),c=Math.max(0,a.height-s.height);d>c?s=ut(s,Math.min(a.width/s.width,On(s,r({visibleArea:s,type:"resize"})))):c>d&&(s=ut(s,Math.min(a.height/s.height,On(s,r({visibleArea:s,type:"resize"}))))),s=_e(s=et(s,no(_n(a,Nt(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function My(n){var e=n.imageSize,i=n.visibleArea,o=n.coordinates,r=i||e;return{left:(i?i.left:0)+r.width/2-o.width/2,top:(i?i.top:0)+r.height/2-o.height/2}}function Iy(n){var e=n.imageSize,i=n.visibleArea,o=n.aspectRatio,r=n.sizeRestrictions,s=i||e,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,le(s))),d=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Dt(G(G({},d),{aspectRatio:o,sizeRestrictions:r}))}function Vy(n){var e,i,o=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,d=n.sizeRestrictions,c=n.stencilSize,u=r||o;return le(u)>le(s)?i=(e=c.height*u.height/s.height)*le(c):e=(i=c.width*u.width/s.width)/le(c),Dt({width:i,height:e,aspectRatio:a,sizeRestrictions:d})}function Ty(n){var e=n.getAreaRestrictions,i=n.coordinates,o=n.imageSize,r=le(n.boundaries);if(i){var s={height:Math.max(i.height,o.height),width:Math.max(i.width,o.width)},a=Ka({width:le(s)>r?s.width:s.height*r,height:le(s)>r?s.width/r:s.height},hr(e())),d={left:i.left+i.width/2-a.width/2,top:i.top+i.height/2-a.height/2,width:a.width,height:a.height},c=ui(i,Nt(G({left:0,top:0},o))),u={};return!c.left&&!c.right&&d.width<=o.width&&(u.left=0,u.right=o.width),!c.top&&!c.bottom&&d.height<=o.height&&(u.top=0,u.bottom=o.height),_e(d,u)}var f=le(o);return a={height:f>r?o.height:o.width/r,width:f>r?o.height*r:o.width},{left:o.width/2-a.width/2,top:o.height/2-a.height/2,width:a.width,height:a.height}}function ro(n,e){return tl(n,Nt(e))}function Ry(n){var e=n.event,i=n.coordinates,o=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,d=n.adjustStencil,c=e.scale,u=e.move,f=G({},o),h=G({},i),m=1,b=1,C=c.factor&&Math.abs(c.factor-1)>.001;f=et(f,{left:u.left||0,top:u.top||0});var B={stencil:{minimum:Math.max(r.minWidth?r.minWidth/h.width:0,r.minHeight?r.minHeight/h.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/h.width:1/0,r.maxHeight?r.maxHeight/h.height:1/0,On(h,a))},area:{maximum:On(f,s({visibleArea:f,type:"resize"}))}};c.factor&&C&&(c.factor<1?(b=Math.max(c.factor,B.stencil.minimum))>1&&(b=1):c.factor>1&&(b=Math.min(c.factor,Math.min(B.area.maximum,B.stencil.maximum)))<1&&(b=1)),b&&(f=ut(f,b,c.center));var $=i.left-o.left,x=o.width+o.left-(i.width+i.left),M=i.top-o.top,k=o.height+o.top-(i.height+i.top);return f=_e(f=et(f,_n(f,{left:a.left!==void 0?a.left-$*b:void 0,top:a.top!==void 0?a.top-M*b:void 0,bottom:a.bottom!==void 0?a.bottom+k*b:void 0,right:a.right!==void 0?a.right+x*b:void 0})),s({visibleArea:f,type:"move"})),h.width=h.width*b,h.height=h.height*b,h.left=f.left+$*b,h.top=f.top+M*b,h=_e(h,oo(Nt(f),a)),c.factor&&C&&d&&(c.factor>1?m=Math.min(B.area.maximum,c.factor)/b:c.factor<1&&(m=Math.max(h.height/f.height,h.width/f.width,c.factor/b)),m!==1&&(f=et(f=_e(f=ut(f,m,c.factor>1?c.center:Oe(h)),s({visibleArea:f,type:"move"})),no(_n(h,Nt(f)))))),{coordinates:h,visibleArea:f}}function Py(n){var e=n.aspectRatio,i=n.getAreaRestrictions,o=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,d=n.imageSize,c=n.previousImageSize,u=n.angle,f=G({},o),h=G({},r),m=Qt(Oe(G({left:0,top:0},c)),u);return(f=G(G({},Dt({sizeRestrictions:s,aspectRatio:e,width:f.width,height:f.height})),Qt(Oe(f),u))).left-=m.left-d.width/2+f.width/2,f.top-=m.top-d.height/2+f.height/2,h=ut(h,io(h,i({visibleArea:h,type:"resize"}))),{coordinates:f=_e(f,a),visibleArea:h=_e(h=et(h,Fn(Oe(f),Oe(o))),i({visibleArea:h,type:"move"}))}}function vy(n){var e=n.flip,i=n.previousFlip,o=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,d=n.imageSize,c=G({},s),u=G({},a),f=i.horizontal!==e.horizontal,h=i.vertical!==e.vertical;if(f||h){var m=Qt({left:d.width/2,top:d.height/2},-o),b=Qt(Oe(c),-o),C=Qt({left:f?m.left-(b.left-m.left):b.left,top:h?m.top-(b.top-m.top):b.top},o);c=et(c,Fn(C,Oe(c))),b=Qt(Oe(u),-o),u=_e(u=et(u,Fn(C=Qt({left:f?m.left-(b.left-m.left):b.left,top:h?m.top-(b.top-m.top):b.top},o),Oe(u))),r({visibleArea:u,type:"move"}))}return{coordinates:c,visibleArea:u}}function ol(n){var e=n.directions,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=n.sizeRestrictions,a=n.preserveRatio,d=n.compensate,c=G({},e),u=Mt(i,c).width,f=Mt(i,c).height;u<0&&(c.left<0&&c.right<0?(c.left=-(i.width-s.minWidth)/(c.left/c.right),c.right=-(i.width-s.minWidth)/(c.right/c.left)):c.left<0?c.left=-(i.width-s.minWidth):c.right<0&&(c.right=-(i.width-s.minWidth))),f<0&&(c.top<0&&c.bottom<0?(c.top=-(i.height-s.minHeight)/(c.top/c.bottom),c.bottom=-(i.height-s.minHeight)/(c.bottom/c.top)):c.top<0?c.top=-(i.height-s.minHeight):c.bottom<0&&(c.bottom=-(i.height-s.minHeight)));var h=ui(Mt(i,c),r);d&&(h.left&&h.left>0&&h.right===0?(c.right+=h.left,c.left-=h.left):h.right&&h.right>0&&h.left===0&&(c.left+=h.right,c.right-=h.right),h.top&&h.top>0&&h.bottom===0?(c.bottom+=h.top,c.top-=h.top):h.bottom&&h.bottom>0&&h.top===0&&(c.top+=h.bottom,c.bottom-=h.bottom),h=ui(Mt(i,c),r));var m={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if($t.forEach(function(B){var $=h[B];$&&c[B]&&(m[B]=Math.max(0,1-$/c[B]))}),a){var b=Math.min.apply(null,$t.map(function(B){return m[B]}));b!==1/0&&$t.forEach(function(B){c[B]*=b})}else $t.forEach(function(B){m[B]!==1/0&&(c[B]*=m[B])});if(u=Mt(i,c).width,f=Mt(i,c).height,c.right+c.left&&(u>s.maxWidth?m.width=(s.maxWidth-i.width)/(c.right+c.left):u<s.minWidth&&(m.width=(s.minWidth-i.width)/(c.right+c.left))),c.bottom+c.top&&(f>s.maxHeight?m.height=(s.maxHeight-i.height)/(c.bottom+c.top):f<s.minHeight&&(m.height=(s.minHeight-i.height)/(c.bottom+c.top))),a){var C=Math.min(m.width,m.height);C!==1/0&&$t.forEach(function(B){c[B]*=C})}else m.width!==1/0&&by.forEach(function(B){c[B]*=m.width}),m.height!==1/0&&Sy.forEach(function(B){c[B]*=m.height});return c}function so(n,e,i){return e==0&&i==0?n/2:e==0?0:i==0?n:n*Math.abs(e/(e+i))}var Ay=yt("vue-simple-handler"),zy=yt("vue-simple-handler-wrapper"),pr={name:"SimpleHandler",components:{HandlerWrapper:Ya},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var n,e=(dt(n={},this.horizontalPosition,!!this.horizontalPosition),dt(n,this.verticalPosition,!!this.verticalPosition),dt(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),dt(n,"hover",this.hover),n);return{default:Ne(Ay(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ne(zy(e),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};pr.render=function(n,e,i,o,r,s){var a=t.resolveComponent("HandlerWrapper");return t.openBlock(),t.createBlock(a,{class:s.classes.wrapper,"vertical-position":i.verticalPosition,"horizontal-position":i.horizontalPosition,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:t.withCtx(function(){return[t.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Dy=yt("vue-simple-line"),Fy=yt("vue-simple-line-wrapper"),gr={name:"SimpleLine",components:{LineWrapper:Xa},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:Ne(Dy(dt({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ne(Fy(dt({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};gr.render=function(n,e,i,o,r,s){var a=t.resolveComponent("LineWrapper");return t.openBlock(),t.createBlock(a,{class:s.classes.wrapper,position:i.position,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:t.withCtx(function(){return[t.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var yr=yt("vue-bounding-box"),Oy=["east","west",null],_y=["south","north",null],rl={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return pr}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return gr}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return Oy.forEach(function(e){_y.forEach(function(i){if(e!==i){var o=Ua(e,i),r=o.name,s=o.classname;n.push({name:r,classname:s,verticalDirection:i,horizontalDirection:e})}})}),{points:n}},computed:{style:function(){var n={};return this.width&&this.height&&(n.width="".concat(this.width,"px"),n.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),n},classes:function(){var n=this.handlersClasses,e=this.handlersWrappersClasses,i=this.linesClasses,o=this.linesWrappersClasses;return{root:yr(),handlers:n,handlersWrappers:e,lines:i,linesWrappers:o}},lineNodes:function(){var n=this,e=[];return this.points.forEach(function(i){i.horizontalDirection&&i.verticalDirection||!n.lines[i.name]||e.push({name:i.name,component:n.linesComponent,class:Ne(n.classes.lines.default,n.classes.lines[i.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Ne(n.classes.linesWrappers.default,n.classes.linesWrappers[i.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:i.verticalDirection,horizontalDirection:i.horizontalDirection,disabled:!n.resizable})}),e},handlerNodes:function(){var n=this,e=[],i=this.width,o=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class:Ne(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Ne(n.classes.handlersWrappers.default,n.classes.handlersWrappers[r.name]),hoverClass:n.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!n.resizable};if(i&&o){var a=r.horizontalDirection,d=r.verticalDirection,c=a==="east"?i:a==="west"?0:i/2,u=d==="south"?o:d==="north"?0:o/2;s.wrapperClass=yr("handler"),s.wrapperStyle={transform:"translate(".concat(c,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=yr("handler",dt({},r.classname,!0));e.push(s)}}),e}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(n,e,i){var o,r=n.shift(),s=r.left,a=r.top,d={left:0,right:0,top:0,bottom:0};e==="west"?d.left-=s:e==="east"&&(d.right+=s),i==="north"?d.top-=a:i==="south"&&(d.bottom+=a),!i&&e?o="width":i&&!e&&(o="height"),this.resizable&&this.$emit("resize",new gy(d,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:i==="south"||!i,top:i==="north"||!i},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};rl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[t.renderSlot(n.$slots,"default"),t.createVNode("div",null,[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(s.lineNodes,function(a){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(d){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(s.handlerNodes,function(a){return t.openBlock(),t.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(d){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var Ly=yt("vue-draggable-area"),sl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:Ly()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(n){if(n.cancelable){var e=this.movable&&n.touches.length===1;e&&(this.touches=fn(n.touches)),(this.touchStarted||e)&&(n.preventDefault(),n.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(n){this.touches.length>=1&&(this.touchStarted?(this.processMove(n,n.touches),n.preventDefault(),n.stopPropagation()):Qa({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:n.touches[0].clientX,y:n.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(n){if(this.movable&&n.button===0){var e={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[e],this.initAnchor(e),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.cancelable&&n.preventDefault(),n.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var e=this.$refs.container.getBoundingClientRect(),i=e.left,o=e.top;this.anchor={x:n.clientX-i,y:n.clientY-o}},processMove:function(n,e){var i=fn(e);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&i.length===1&&this.$emit("move",new cr({left:i[0].clientX-(r+this.anchor.x),top:i[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};sl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[t.renderSlot(n.$slots,"default")],544)};function wr(n){var e,i;return{rotate:n.rotate||0,flip:{horizontal:((e=n==null?void 0:n.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((i=n==null?void 0:n.flip)===null||i===void 0?void 0:i.vertical)||!1}}}function Hy(n){return new Promise(function(e,i){try{if(n)if(/^data:/i.test(n))e(function(c){c=c.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(c),f=u.length,h=new ArrayBuffer(f),m=new Uint8Array(h),b=0;b<f;b++)m[b]=u.charCodeAt(b);return h}(n));else if(/^blob:/i.test(n)){var o=new FileReader;o.onload=function(c){e(c.target.result)},s=n,a=function(c){o.readAsArrayBuffer(c)},(d=new XMLHttpRequest).open("GET",s,!0),d.responseType="blob",d.onload=function(){this.status!=200&&this.status!==0||a(this.response)},d.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?e(r.response):i("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",n,!0),r.responseType="arraybuffer",r.send(null)}else i("Error: the image is empty")}catch(c){i(c)}var s,a,d})}function al(n){var e=n.rotate,i=n.flip,o=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+e+"deg) ",s+=" scaleX("+o*(i.horizontal?-1:1)+") ",s+=" scaleY("+r*(i.vertical?-1:1)+") "}function Uy(n){try{var e,i=new DataView(n),o=void 0,r=void 0,s=void 0,a=void 0;if(i.getUint8(0)===255&&i.getUint8(1)===216)for(var d=i.byteLength,c=2;c+1<d;){if(i.getUint8(c)===255&&i.getUint8(c+1)===225){s=c;break}c++}if(s&&(o=s+10,function(b,C,B){var $,x="";for($=C,B+=C;$<B;$++)x+=String.fromCharCode(b.getUint8($));return x}(i,s+4,4)==="Exif")){var u=i.getUint16(o);if(((r=u===18761)||u===19789)&&i.getUint16(o+2,r)===42){var f=i.getUint32(o+4,r);f>=8&&(a=o+f)}}if(a){for(var h=i.getUint16(a,r),m=0;m<h;m++)if(c=a+12*m+2,i.getUint16(c,r)===274){c+=8,e=i.getUint16(c,r),i.setUint16(c,1,r);break}}return e}catch{return null}}function ll(n,e){var i=e.getBoundingClientRect(),o=i.left,r=i.top,s={left:0,top:0},a=0;return n.forEach(function(d){s.left+=(d.clientX-o)/n.length,s.top+=(d.clientY-r)/n.length}),n.forEach(function(d){a+=Qa({x:s.left,y:s.top},{x:d.clientX-o,y:d.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var cl={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=ar(this.processEnd),this.touches=[]},methods:{processMove:function(n,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new di({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var i=ll(e,this.$refs.container),o=this.oldGeometricProperties;o.count===i.count&&o.count>1&&this.$emit("resize",new di({left:o.centerMass.left-i.centerMass.left,top:o.centerMass.top-i.centerMass.top},{factor:o.spread/i.spread,center:i.centerMass})),this.oldGeometricProperties=i}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(n){return this.eventsFilter?this.eventsFilter(n,this.transforming)!==!1:(n.preventDefault(),n.stopPropagation(),!0)},onTouchStart:function(n){if(n.cancelable&&(this.touchMove||this.touchResize&&n.touches.length>1)&&this.processEvent(n)){var e=this.$refs.container,i=e.getBoundingClientRect(),o=i.left,r=i.top,s=i.bottom,a=i.right;this.touches=fn(n.touches).filter(function(d){return d.clientX>o&&d.clientX<a&&d.clientY>r&&d.clientY<s}),this.oldGeometricProperties=ll(this.touches,e)}},onTouchEnd:function(n){n.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(n){var e=this;if(this.touches.length){var i=fn(n.touches).filter(function(o){return!o.identifier||e.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(n)&&(this.processMove(n,i),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var e={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(n){this.touches.length&&this.processEvent(n)&&this.processMove(n,[{clientX:n.clientX,clientY:n.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(n){if(this.wheelResize&&this.processEvent(n)){var e=this.$refs.container.getBoundingClientRect(),i=e.left,o=e.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(d=+a)==0||Ga(d)?d:d>0?1:-1),s={left:n.clientX-i,top:n.clientY-o};this.$emit("resize",new di({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,d}},emits:["resize","move","transform-end"]};cl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:e[3]||(e[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[t.renderSlot(n.$slots,"default")],544)};var br={components:{TransformableImage:cl},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};br.render=function(n,e,i,o,r,s){var a=t.resolveComponent("transformable-image");return t.openBlock(),t.createBlock(a,{"touch-move":i.touchMove,"touch-resize":i.touchResize,"mouse-move":i.mouseMove,"wheel-resize":i.wheelResize,onMove:e[1]||(e[1]=function(d){return n.$emit("move",d)}),onResize:e[2]||(e[2]=function(d){return n.$emit("resize",d)})},{default:t.withCtx(function(){return[t.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var ao=yt("vue-preview"),dl={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:ao({fill:this.fill}),wrapper:ao("wrapper"),imageWrapper:ao("image-wrapper"),image:Ne(ao("image"),this.imageClass)}},style:function(){if(this.fill)return{};var n={};return this.width&&(n.width="".concat(this.size.width,"px")),this.height&&(n.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},wrapperStyle:function(){var n={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},imageStyle:function(){if(this.coordinates&&this.image){var n=this.coordinates.width/this.size.width,e=ae(ae({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),i=this.imageSize.width,o=this.imageSize.height,r=el({width:i,height:o},e.rotate),s={width:"".concat(i,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(i-r.width)*e.scaleX/2,top:(o-r.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*i/2,top:(1-e.scaleY)*o/2}};return s.transform=`translate(
44
- `.concat(-this.coordinates.left/n-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/n-a.rotate.top-a.scale.top,"px) ")+al(e),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(n){(n.width||n.height)&&this.onChangeImage()}},mounted:function(){var n=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){n.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var n=this.$refs.image;this.calculatedImageSize.height=n.naturalHeight,this.calculatedImageSize.width=n.naturalWidth},refresh:function(){var n=this.$refs.root;this.width||(this.calculatedSize.width=n.clientWidth),this.height||(this.calculatedSize.height=n.clientHeight)},onChangeImage:function(){var n=this.$refs.image;n&&n.complete&&this.refreshImage(),this.refresh()}}};dl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[t.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[t.withDirectives(t.createVNode("img",{ref:"image",src:i.image&&i.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[t.vShow,i.image&&i.image.src]])],6)],6)};var ul={components:{Preview:dl},inheritAttrs:!1};ul.render=function(n,e,i,o,r,s){var a=t.resolveComponent("preview");return t.openBlock(),t.createBlock(a,t.mergeProps(n.$attrs,{fill:!0}),null,16)};var Sr=yt("vue-rectangle-stencil"),fl={name:"RectangleStencil",components:{StencilPreview:ul,BoundingBox:rl,DraggableArea:sl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return pr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return gr}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:Ne(Sr({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Ne(Sr("preview"),this.previewClass),boundingBox:Ne(Sr("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,e=n.height,i=n.width,o=n.left,r=n.top,s={width:"".concat(i,"px"),height:"".concat(e,"px"),transform:"translate(".concat(o,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(n){this.$emit("move",n),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(n){this.$emit("resize",n),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};fl.render=function(n,e,i,o,r,s){var a=t.resolveComponent("stencil-preview"),d=t.resolveComponent("draggable-area"),c=t.resolveComponent("bounding-box");return t.openBlock(),t.createBlock("div",{class:s.classes.stencil,style:s.style},[t.createVNode(c,{width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,transitions:i.transitions,class:s.classes.boundingBox,handlers:i.handlers,"handlers-component":i.handlersComponent,"handlers-classes":i.handlersClasses,"handlers-wrappers-classes":i.handlersWrappersClasses,lines:i.lines,"lines-component":i.linesComponent,"lines-classes":i.linesClasses,"lines-wrappers-classes":i.linesWrappersClasses,resizable:i.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:t.withCtx(function(){return[t.createVNode(d,{movable:i.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:t.withCtx(function(){return[t.createVNode(a,{image:i.image,coordinates:i.coordinates,width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,class:s.classes.preview,transitions:i.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var qy=["transitions"],Ft=yt("vue-advanced-cropper"),hl={name:"Cropper",components:{BackgroundWrapper:br},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return fl}},backgroundWrapperComponent:{type:[Object,String],default:function(){return br}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(n){return ky.indexOf(n)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(n){return!(typeof n=="string"&&n!=="fill"&&n!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(n){var e=n.event,i=n.coordinates,o=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=G(G({},i),{right:i.left+i.width,bottom:i.top+i.height}),d=e.params||{},c=G({},e.directions),u=d.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(c.left=0,c.right=0),s.heightFrozen&&(c.top=0,c.bottom=0),$t.forEach(function(P){u[P]||(c[P]=0)});var f=Mt(a,c=ol({coordinates:a,directions:c,sizeRestrictions:s,positionRestrictions:r})).width,h=Mt(a,c).height,m=d.preserveRatio?le(a):fr(f/h,o);if(m){var b=d.respectDirection;if(b||(b=a.width>=a.height||m===1?"width":"height"),b==="width"){var C=f/m-a.height;if(u.top&&u.bottom){var B=c.top,$=c.bottom;c.bottom=so(C,$,B),c.top=so(C,B,$)}else u.bottom?c.bottom=C:u.top?c.top=C:u.right?c.right=0:u.left&&(c.left=0)}else if(b==="height"){var x=a.width-h*m;if(u.left&&u.right){var M=c.left,k=c.right;c.left=-so(x,M,k),c.right=-so(x,k,M)}else u.left?c.left=-x:u.right?c.right=-x:u.top?c.top=0:u.bottom&&(c.bottom=0)}c=ol({directions:c,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:d.compensate})}return f=Mt(a,c).width,h=Mt(a,c).height,(m=d.preserveRatio?le(a):fr(f/h,o))&&Math.abs(m-f/h)>.001&&$t.forEach(function(P){u[P]||(c[P]=0)}),mr({event:new cr({left:-c.left,top:-c.top}),coordinates:{width:i.width+c.right+c.left,height:i.height+c.top+c.bottom,left:i.left,top:i.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:mr},initStretcher:{type:Function,default:function(n){var e=n.stretcher,i=n.imageSize,o=le(i);e.style.width=i.width+"px",e.style.height=e.clientWidth/o+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var e=n.visibleArea,i=n.coordinates,o=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=G(G({},i),Dt({width:i.width,height:i.height,aspectRatio:o,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,r.minHeight),minWidth:Math.min(e.width,r.minWidth)}}));return a=_e(a=et(a,Fn(Oe(i),Oe(a))),oo(Nt(e),s))}},fitVisibleArea:{type:Function,default:function(n){var e=n.visibleArea,i=n.boundaries,o=n.getAreaRestrictions,r=n.coordinates,s=G({},e);s.height=s.width/le(i),s.top+=(e.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=ut(s,Math.max(r.height/s.height,r.width/s.width)));var a=no(_n(r,Nt(s=ut(s,io(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=_e(s=et(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var e=n.visibleArea,i=n.boundaries,o=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(le(i)>le(o)?(a={top:0,bottom:o.height},e&&s==="move"&&(e.width>o.width?(a.left=-(e.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},e&&s==="move"&&(e.height>o.height?(a.top=-(e.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(n){return{minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(n){var e=n.imageSize,i={};return n.imageRestriction!=="none"&&(i={left:0,top:0,right:e.width,bottom:e.height}),i}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:ae({},Za)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var n=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(n))+Math.abs(this.imageAttributes.height*Math.sin(n)),height:Math.abs(this.imageAttributes.width*Math.sin(n))+Math.abs(this.imageAttributes.height*Math.cos(n))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var n=lr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:lr(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:n}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var n=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:Re(this.minWidth)?0:to(this.minWidth),minHeight:Re(this.minHeight)?0:to(this.minHeight),maxWidth:Re(this.maxWidth)?1/0:to(this.maxWidth),maxHeight:Re(this.maxHeight)?1/0:to(this.maxHeight)});if(n=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,d=o.positionRestrictions,c=G(G({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});d.left!==void 0&&d.right!==void 0&&(c.maxWidth=Math.min(c.maxWidth,d.right-d.left)),d.bottom!==void 0&&d.top!==void 0&&(c.maxHeight=Math.min(c.maxHeight,d.bottom-d.top));var u=hr(r),f=Ka(a,u);return u.width<1/0&&(!c.maxWidth||c.maxWidth>f.width)&&(c.maxWidth=Math.min(c.maxWidth,f.width)),u.height<1/0&&(!c.maxHeight||c.maxHeight>f.height)&&(c.maxHeight=Math.min(c.maxHeight,f.height)),c.minWidth>c.maxWidth&&(c.minWidth=c.maxWidth,c.widthFrozen=!0),c.minHeight>c.maxHeight&&(c.minHeight=c.maxHeight,c.heightFrozen=!0),c}({sizeRestrictions:n,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),i=hr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,i.width*e.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,i.height*e.height/this.boundaries.height),n.maxWidth<n.minWidth&&(n.minWidth=n.maxWidth),n.maxHeight<n.minHeight&&(n.minHeight=n.maxHeight)}return n}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Ft(),image:Ne(Ft("image"),this.imageClass),stencil:Ft("stencil"),boundaries:Ne(Ft("boundaries"),this.boundariesClass),stretcher:Ne(Ft("stretcher")),background:Ne(Ft("background"),this.backgroundClass),foreground:Ne(Ft("foreground"),this.foregroundClass),imageWrapper:Ne(Ft("image-wrapper")),cropperWrapper:Ne(Ft("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,e=n.width,i=n.height,o=n.left,r=n.top;return{width:e/this.coefficient,height:i/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var n={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(n.opacity="0"),n},imageStyle:function(){var n=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},i={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},o=ae(ae({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/n.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/n.height)}),r={width:"".concat(n.width,"px"),height:"".concat(n.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-i.left-this.imageTransforms.translateX,"px, ").concat(-e.top-i.top-this.imageTransforms.translateY,"px)")+al(o)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var n=this;this.$nextTick(function(){n.resetCoordinates(),n.runAutoZoom("setCoordinates"),n.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(n,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(i){return n[i]!==e[i]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=ar(this.update,this.debounce),this.debouncedDisableTransitions=ar(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var n=this.initialized?this.prepareResult(ae({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:ae({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var i=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ae({},this.visibleArea):null,imageTransforms:e,get canvas(){return i.canvas?i.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ae({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(n,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new di({},{factor:1/n,center:e}),{normalize:!1,transitions:r})},move:function(n,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new di({left:n||0,top:e||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var e=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.autoZoom,r=o===void 0||o,s=i.transitions,a=s===void 0||s;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(n),r&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=n})},refresh:function(){var n=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){n.onChange()}):this.resetVisibleArea().then(function(){n.onChange()})},reset:function(){var n=this;return this.resetVisibleArea().then(function(){n.onChange(!1)})},awaitRender:function(n){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){n(),e.awaiting=!1}))},prepareResult:function(n){return this.roundResult?function(e){var i=e.coordinates,o=e.sizeRestrictions,r=e.positionRestrictions,s={width:Math.round(i.width),height:Math.round(i.height),left:Math.round(i.left),top:Math.round(i.top)};return s.width>o.maxWidth?s.width=Math.floor(i.width):s.width<o.minWidth&&(s.width=Math.ceil(i.width)),s.height>o.maxHeight?s.height=Math.floor(i.height):s.height<o.minHeight&&(s.height=Math.ceil(i.height)),_e(s,r)}(ae(ae({},this.getPublicProperties()),{},{positionRestrictions:ro(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,e,i,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?By:this.autoZoom?$y:Ny);var s=r({event:{type:n,params:o},visibleArea:e,coordinates:i,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return ae(ae({},s),{},{changed:!Ja(s.visibleArea,e)||!Ja(s.coordinates,i)})},runAutoZoom:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.transitions,o=i!==void 0&&i,r=my(e,qy),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,d=s.coordinates,c=s.changed;o&&c&&this.enableTransitions(),this.visibleArea=a,this.coordinates=d,o&&c&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(e){var i=e.event,o=e.visibleArea,r=e.coefficient;if(i.type==="manipulateImage")return G(G({},i),{move:{left:i.move&&i.move.left?r*i.move.left:0,top:i.move&&i.move.top?r*i.move.top:0},scale:{factor:i.scale&&i.scale.factor?i.scale.factor:1,center:i.scale&&i.scale.center?{left:i.scale.center.left*r+o.left,top:i.scale.center.top*r+o.top}:null}});if(i.type==="resize"){var s=G(G({},i),{directions:G({},i.directions)});return $t.forEach(function(d){s.directions[d]*=r}),s}if(i.type==="move"){var a=G(G({},i),{directions:G({},i.directions)});return Cy.forEach(function(d){a.directions[d]*=r}),a}return i}(ae(ae({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,e=this.$refs.image,i=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(d,c,u){var f=u.rotate,h=u.flip,m={width:c.naturalWidth,height:c.naturalHeight},b=el(m,f),C=d.getContext("2d");d.height=b.height,d.width=b.width,C.save();var B=Qt(Oe(G({left:0,top:0},m)),f);return C.translate(-(B.left-b.width/2),-(B.top-b.height/2)),C.rotate(f*Math.PI/180),C.translate(h.horizontal?m.width:0,h.vertical?m.height:0),C.scale(h.horizontal?-1:1,h.vertical?-1:1),C.drawImage(c,0,0,m.width,m.height),C.restore(),d}(this.$refs.sourceCanvas,e,this.imageTransforms):e,o=ae({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(d){return d.find(function(c){return u=c,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Dt({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(d,c,u,f,h){d.width=f?f.width:u.width,d.height=f?f.height:u.height;var m=d.getContext("2d");m.clearRect(0,0,d.width,d.height),h&&(h.imageSmoothingEnabled&&(m.imageSmoothingEnabled=h.imageSmoothingEnabled),h.imageSmoothingQuality&&(m.imageSmoothingQuality=h.imageSmoothingQuality),h.fillColor&&(m.fillStyle=h.fillColor,m.fillRect(0,0,d.width,d.height),m.save()));var b=u.left<0?-u.left:0,C=u.top<0?-u.top:0;m.drawImage(c,u.left+b,u.top+C,u.width,u.height,b*(d.width/u.width),C*(d.height/u.height),d.width,d.height)}(n,i,this.coordinates,s,o),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.visibleArea&&e?xy(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&e?ro(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Ey({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:i,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?Vy:Iy);var i=this.sizeRestrictions;i.minWidth,i.minHeight,i.maxWidth,i.maxHeight;var o=Dn(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,r=this.defaultPosition||My,s=[o,function(a){var d=a.coordinates;return ae({},Dn(r)?r({coordinates:d,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,fn(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var n=this;this.imageLoaded=!1,setTimeout(function(){var e=n.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),n.coordinates=n.defaultCoordinates(),n.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var n=this,e=this.$refs.stretcher,i=this.$refs.cropper;return this.initStretcher({cropper:i,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:i,imageSize:n.imageSize};if(Dn(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(o):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,d=s.clientHeight,c=s.clientWidth,u=d,f=a.width*d/a.height;return f>c&&(f=c,u=a.height*c/a.width),{width:f,height:u}}(o):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!n.boundaries.width||!n.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var n=this;return this.appliedImageTransforms=ae(ae({},this.defaultImageTransforms),{},{flip:ae({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var e,i,o,r,s,a,d=n.defaultVisibleArea||Ty;n.visibleArea=Dn(d)?d({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(e={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},i=e.visibleArea,o=e.boundaries,r=e.getAreaRestrictions,s=G({},i),a=le(o),s.width/s.height!==a&&(s.height=s.width/a),_e(s,r({visibleArea:s,type:"move"}))),n.priority==="visible-area"?n.resetCoordinates():n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("resetVisibleArea")}).catch(function(){n.visibleArea=null})},updateVisibleArea:function(){var n=this;return this.updateBoundaries().then(function(){n.visibleArea=n.fitVisibleArea({imageSize:n.imageSize,boundaries:n.boundaries,visibleArea:n.visibleArea,coordinates:n.coordinates,getAreaRestrictions:n.getAreaRestrictions}),n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("updateVisibleArea")}).catch(function(){n.visibleArea=null})},onChange:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];n&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var n,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(ja(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],d={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},c=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!d.protocol&&!d.host&&!d.port||d.protocol&&d.protocol==s.protocol&&d.host&&d.host==s.host&&d.host&&c(d)==c(s))}(this.src)){var i=Re(this.crossOrigin)?this.canvas:this.crossOrigin;i===!0&&(i="anonymous"),this.imageAttributes.crossOrigin=i||null}if(this.checkOrientation){var o=(n=this.src,new Promise(function(r){Hy(n).then(function(s){var a=Uy(s);r(s?{source:n,arrayBuffer:s,orientation:a}:{source:n,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:n,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(e.onParseImage)},this.transitionTime)}else setTimeout(function(){e.onParseImage({source:e.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var n=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){n.$emit("ready"),n.onChange(!1)}))},onParseImage:function(n){var e=this,i=n.source,o=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?qa(i)||!ja(i)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],d=new Uint8Array(s);d.length>0;){var c=d.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(c):c.slice())),d=d.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=i,Dn(this.defaultTransforms)?this.appliedImageTransforms=wr(this.defaultTransforms()):eo(this.defaultTransforms)?this.appliedImageTransforms=wr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=wr({});if(s)switch(s){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a}(r),this.defaultImageTransforms=ae(ae({},this.appliedImageTransforms),{},{flip:ae({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=e.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?e.onSuccessLoadImage():e.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(n){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(ae(ae({},e.getPublicProperties()),{},{positionRestrictions:ro(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(n)})),e.onChange()})},onResize:function(n){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var i=e.sizeRestrictions,o=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(ae(ae({},e.getPublicProperties()),{},{positionRestrictions:ro(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(i.maxWidth,e.visibleArea.width),maxHeight:Math.min(i.maxHeight,e.visibleArea.height),minWidth:Math.max(i.minWidth,o),minHeight:Math.max(i.minHeight,o)},event:e.normalizeEvent(n)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var i=e.transitions,o=i!==void 0&&i,r=e.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=Ry(ae(ae({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),d=a.visibleArea,c=a.coordinates;this.visibleArea=d,this.coordinates=c,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=n.visibleArea,i=n.type,o=i===void 0?"move":i;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:o})},getAspectRatio:function(n){var e,i,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var d=this.$refs.stencil.aspectRatios();e=d.minimum,i=d.maximum}if(Re(e)&&(e=Re(r)?s:r),Re(i)&&(i=Re(r)?a:r),!n&&(Re(e)||Re(i))){var c=this.getStencilSize(),u=c?le(c):null;Re(e)&&(e=Wa(u)?u:void 0),Re(i)&&(i=Wa(u)?u:void 0)}return{minimum:e,maximum:i}},getStencilSize:function(){if(this.stencilSize)return n={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=n.boundaries,i=n.stencilSize,o=n.aspectRatio,fr(le(r=Dn(i)?i({boundaries:e,aspectRatio:o}):i),o)&&(r=Dt({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:o.minimum,maximum:o.maximum}})),(r.width>e.width||r.height>e.height)&&(r=Dt({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:le(r),maximum:le(r)}})),r;var n,e,i,o,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return ae({},Za)},flip:function(n,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=ae({},this.imageTransforms.flip),a=vy({flip:{horizontal:n?!s.horizontal:s.horizontal,vertical:e?!s.vertical:s.vertical},previousFlip:s,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),d=a.visibleArea,c=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=d,this.coordinates=c,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.transitions,o=i===void 0||i;if(!this.transitionsActive){o&&this.enableTransitions();var r=ae({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=Py({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:n,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,d=s.coordinates,c=this.processAutoZoom("rotateImage",a,d);a=c.visibleArea,d=c.coordinates,this.visibleArea=a,this.coordinates=d,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},jy={key:0,ref:"canvas",style:{display:"none"}},Wy={key:1,ref:"sourceCanvas",style:{display:"none"}};hl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"cropper",class:s.classes.cropper},[t.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),t.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:t.withCtx(function(){return[t.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),t.createVNode("div",{class:s.classes.imageWrapper},[t.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:e[1]||(e[1]=t.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),t.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),t.withDirectives((t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.stencilComponent),t.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},i.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[t.vShow,r.imageLoaded]]),i.canvas?(t.openBlock(),t.createBlock("canvas",jy,null,512)):t.createCommentVNode("",!0),i.canvas?(t.openBlock(),t.createBlock("canvas",Wy,null,512)):t.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const Gy={width:0,height:0,left:0,top:0};class Cr{constructor(){l(this,"id");l(this,"ratio",0);l(this,"src","");l(this,"coordinates",Gy)}setCoordinates(e){this.coordinates=e}getCoordinates(){return this.coordinates}static Create(e,i=0,o){const r=new Cr;return r.src=e,r.ratio=i,r.id=o,r}setRatio(e){this.ratio=e}getRatio(){return this.ratio}setSrc(e){this.src=e}getSrc(){return this.src}}const Qy={class:"cropper-wrapper"},Yy={class:"row justify-end q-mt-md"},Xy=v(t.defineComponent({__name:"ImageCropper",props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:1}},emits:["crop","update:ratio"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.ratio),s=t.ref(Cr.Create(i.src,i.ratio));s.value.setRatio(r.value);const a=t.ref(),d=t.computed(()=>[{label:"2:3 (формат A4)",value:2/3},{label:"4:3 (для карточек новостей)",value:4/3},{label:"1:1 (для фото сотрудников)",value:1},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"3:4 (вертикальное изображение)",value:3/4},{label:"Задать пропорции вручную",value:0}]),c=()=>{s.value.setRatio(r.value)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(h=>{var m;o("crop",{blob:h,src:(m=f.canvas)==null?void 0:m.toDataURL()}),o("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,h)=>(t.openBlock(),t.createElementBlock("div",Qy,[t.createVNode(Ji,{modelValue:r.value,"onUpdate:modelValue":[h[0]||(h[0]=m=>r.value=m),c],clearable:!1,options:d.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),t.createVNode(t.unref(hl),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:h[1]||(h[1]=m=>s.value.setCoordinates(m.coordinates))},null,8,["src","stencil-props"]),t.createElementVNode("div",Yy,[t.createVNode(Ke,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-7ca895df"]]),Zy={class:"column items-center q-my-md"},Jy={class:"uploader-content"},Ky={class:"uploader-icon"},ew={class:"tools-button absolute-full column items-center justify-center"},tw={class:"row q-gutter-sm"},nw=v(t.defineComponent({__name:"PUploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{},height:{default:150},emitCrop:{type:Boolean,default:!1},ratio:{default:1},acceptTypes:{default:"image/*"},maxFileSize:{default:10485760}},emits:["crop","removeFile","update:ratio"],setup(n,{emit:e}){const i=V.ClosePopup,o=n,r=e,s=t.ref(),a=t.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),d=t.ref(!1),c=t.ref(),u=t.ref(o.ratio),f=t.ref(""),h=t.computed(()=>({width:`${o.height*u.value}px`,height:`${o.height}px`,maxWidth:"100%"})),m=t.computed(()=>({width:`${o.height*u.value}px`,height:`${o.height}px`})),b=()=>{s.value=void 0,u.value=1,r("update:ratio",1),r("removeFile")},C=x=>{x.blob.src=x.src,o.fileInfo.setFile&&o.fileInfo.setFile(x.blob),o.fileInfo.fileSystemPath&&(s.value=o.fileInfo),d.value=!1,r("crop")},B=x=>{f.value=x.url,d.value=!0},$=x=>{if(x.length===0)return;const M=x[0];M.url=URL.createObjectURL(M),s.value=M,o.fileInfo.setFile&&o.fileInfo.setFile(M),o.withCrop&&B(s.value)};return t.watch(u,x=>{r("update:ratio",x)}),t.watch(()=>[o.fileInfo.description,o.fileInfo.order,o.fileInfo.fileSystemPath],()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),t.onBeforeMount(()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),(x,M)=>(t.openBlock(),t.createElementBlock("div",Zy,[t.unref(s)?(t.openBlock(),t.createElementBlock("div",{key:1,class:"img-container relative-position",style:t.normalizeStyle(t.unref(h))},[t.createVNode(t.unref(V.QImg),{src:t.unref(s).url,ratio:t.unref(u),class:"uploaded-image","spinner-color":"primary"},null,8,["src","ratio"]),t.createElementVNode("div",ew,[t.createElementVNode("div",tw,[t.createVNode(Ke,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md",onClick:M[0]||(M[0]=k=>B(t.unref(s)))},{default:t.withCtx(()=>[t.createVNode(ci,null,{default:t.withCtx(()=>[...M[5]||(M[5]=[t.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),t.createVNode(Ke,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md",onClick:b},{default:t.withCtx(()=>[t.createVNode(ci,null,{default:t.withCtx(()=>[...M[6]||(M[6]=[t.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(t.openBlock(),t.createBlock(t.unref(V.QUploader),{key:0,id:t.unref(a),ref_key:"uploader",ref:c,class:"img-uploader",style:t.normalizeStyle(t.unref(m)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:$,onRemoved:b},{header:t.withCtx(()=>[t.createElementVNode("div",Jy,[t.createVNode(t.unref(V.QUploaderAddTrigger)),t.createElementVNode("div",Ky,[t.createVNode(t.unref(V.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),M[4]||(M[4]=t.createElementVNode("div",{class:"uploader-text text-primary text-center"},[t.createElementVNode("div",{class:"text-weight-medium"},"Добавить изображение"),t.createElementVNode("div",{class:"text-caption text-grey-6 q-mt-xs"}," Перетащите файл или нажмите для загрузки ")],-1))])]),_:1},8,["id","style","accept","max-file-size"])),t.createVNode(Zi,{modelValue:t.unref(d),"onUpdate:modelValue":M[3]||(M[3]=k=>t.isRef(d)?d.value=k:null),persistent:""},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCard),{class:"full-height"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCardSection),{class:"row items-center q-pb-none"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QSpace)),t.withDirectives(t.createVNode(Ke,{icon:"close",flat:"",round:"",dense:""},null,512),[[t.unref(i)]])]),_:1}),t.createVNode(t.unref(V.QCardSection),{class:"cropper-section"},{default:t.withCtx(()=>[t.createVNode(Xy,{ratio:t.unref(u),"onUpdate:ratio":M[1]||(M[1]=k=>t.isRef(u)?u.value=k:null),src:t.unref(f),onCrop:C,onClose:M[2]||(M[2]=k=>d.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),[["__scopeId","data-v-8e597e65"]]);function iw(n){n.component("PTabs",ry),n.component("PUploaderFile",hy),n.component("PUploaderImage",nw),n.component("PAuthForm",_a),n.component("PAuthModal",ty),n.component("PNameEdit",iy)}const ow={install:function(n){Cg(n),K0(n),c0(n),iw(n),Q1(n)}};function rw(n,e={}){const{quasarPlugins:i=!0}=e;i&&n.use(V.Quasar,{plugins:{Notify:V.Notify,Dialog:V.Dialog}}),ow.install(n)}class sw extends wi{constructor(){super(...arguments);l(this,"label","Логин");l(this,"name","login");l(this,"validator",new zr);l(this,"method",bn.Login);l(this,"id","field-auth-login")}}const aw=["PF","PFM"],lw=v(t.defineComponent({__name:"ExtractCreateForm",emits:["create"],setup(n,{emit:e}){const i=e,o=ExtractsStore.Item,r=async()=>{await ExtractsStore.Create(),ExtractsStore.AppendToAll([o]),i("create")};return(s,a)=>{const d=t.resolveComponent("PInput"),c=t.resolveComponent("PButton");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(d,{modelValue:t.unref(o).name,"onUpdate:modelValue":a[0]||(a[0]=u=>t.unref(o).name=u)},null,8,["modelValue"]),t.createVNode(c,{text:"Создать",onClick:r})],64)}}}),[["__scopeId","data-v-acdf750a"]]),cw=Object.freeze(Object.defineProperty({__proto__:null,default:v(t.defineComponent({__name:"ExtractsList",setup(n){const e=t.ref(!1),i=t.ref(!1),o=async()=>{i.value=!0},r=async()=>{await Promise.all([o()])},s=()=>{e.value=!e.value};return R.H.Hooks.onBeforeMount(r),(a,d)=>{const c=lw,u=t.resolveComponent("PModal");return t.unref(e)?(t.openBlock(),t.createBlock(u,{key:0,show:t.unref(e)},{default:t.withCtx(()=>[t.createVNode(c,{onCreate:s})]),_:1},8,["show"])):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03915680"]])},Symbol.toStringTag,{value:"Module"}));W.AuthButtonLogin=mo,W.AuthButtonRefresh=vr,W.AuthButtonRegister=po,W.AuthButtonRestore=yi,W.AuthChunks=ve,W.AuthFieldsIds=Pt,W.AuthFormSettings=Fr,W.AuthMethods=bn,W.EmailField=bi,W.LoginField=sw,W.PBadge=Ea,W.PButton=Ke,W.PCard=za,W.PCheckBox=Ba,W.PChip=$a,W.PCrudList=Da,W.PDateInput=Na,W.PDialog=Zi,W.PEditDialog=Fa,W.PF=R,W.PFM=Xp,W.PHint=or,W.PInput=Gt,W.POptionsListSingle=Ma,W.POpts=Ia,W.PSelect=Ji,W.PTableToggle=Va,W.PToggle=Ta,W.PasswordField=Si,W.PasswordRepeatField=Dr,W.Schedule=ri,W.ScheduleDay=Yi,W.ScheduleDefaultLabels=nr,W.ScheduleGridEditor=ka,W.SchedulePlace=An,W.ScheduleSession=vn,W.ScheduleSlot=zt,W.ScheduleTimeline=xa,W.installSprof=rw,W.pfName=aw,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});
43
+ ***************************************************************************** */function Ua(n,e){var i,o;return n&&e?(i=""+n+e[0].toUpperCase()+e.slice(1),o=n+"-"+e):(i=n||e,o=n||e),{name:i,classname:o}}function qa(n){return/^blob:/.test(n)}function ja(n){return qa(n)||function(e){return/^data:/.test(e)}(n)}function Dn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Re(n){return n===void 0}function to(n){return typeof n=="object"&&n!==null}function cr(n,e,i){var o={};return to(n)?(Object.keys(e).forEach(function(r){Re(n[r])?o[r]=e[r]:to(e[r])?to(n[r])?o[r]=cr(n[r],e[r],i[r]):o[r]=n[r]?e[r]:i[r]:e[r]===!0||e[r]===!1?o[r]=!!n[r]:o[r]=n[r]}),o):n?e:i}function no(n){var e=Number(n);return Number.isNaN(e)?n:e}function Wa(n){return typeof(n=="number"||function(e){return typeof e=="object"&&e!==null}(n)&&toString.call(n)=="[object Number]")&&!Ga(n)}function Ga(n){return n!=n}function Qa(n,e){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}var di=function(n,e){n===void 0&&(n={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=n,this.scale=e},gy=function(n,e){e===void 0&&(e={}),this.type="resize",this.directions=n,this.params=e},dr=function(n){this.type="move",this.directions=n},yy=function(){function n(e,i,o,r,s){this.type="drag",this.nativeEvent=e,this.position=o,this.previousPosition=r,this.element=i,this.anchor=s}return n.prototype.shift=function(){var e=this,i=e.element,o=e.anchor,r=e.position;if(i){var s=i.getBoundingClientRect(),a=s.left,d=s.top;return{left:r.left-a-o.left,top:r.top-d-o.top}}return{left:0,top:0}},n}(),ur={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(n){n.cancelable&&!this.disabled&&n.touches.length===1&&(this.touches=un(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(e,i){return{clientX:e.clientX+i.clientX/n.touches.length,clientY:e.clientY+i.clientY/n.touches.length}},{clientX:0,clientY:0})),n.preventDefault&&n.preventDefault(),n.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(n){this.touches.length&&(this.processMove(n,n.touches),n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation())},onMouseDown:function(n){if(!this.disabled){var e={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[e],this.initAnchor(e),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var e=this.$refs.draggable.getBoundingClientRect(),i=e.left,o=e.right,r=e.bottom,s=e.top;this.anchor={left:n.clientX-i,top:n.clientY-s,bottom:r-n.clientY,right:o-n.clientX}},processMove:function(n,e){var i=un(e);if(this.touches.length){if(this.touches.length===1&&i.length===1){var o=this.$refs.draggable;this.$emit("drag",new yy(n,o,{left:i[0].clientX,top:i[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=i}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};ur.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"draggable",class:i.classname,onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:e[3]||(e[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:e[4]||(e[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[t.renderSlot(n.$slots,"default")],34)};var fr=yt("vue-handler-wrapper"),Ya={name:"HandlerWrapper",components:{DraggableElement:ur},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var n;if(this.horizontalPosition||this.verticalPosition){var e,i=Ua(this.horizontalPosition,this.verticalPosition);n=fr((dt(e={},i.classname,!0),dt(e,"disabled",this.disabled),e))}else n=fr({disabled:this.disabled});return{root:n,draggable:fr("draggable")}}},emits:["leave","enter","drag","drag-end"]};Ya.render=function(n,e,i,o,r,s){var a=t.resolveComponent("DraggableElement");return t.openBlock(),t.createBlock("div",{class:s.classes.root},[t.createVNode(a,{class:s.classes.draggable,onDrag:e[1]||(e[1]=function(d){return n.$emit("drag",d)}),onDragEnd:e[2]||(e[2]=function(d){return n.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(d){return n.$emit("leave")}),onEnter:e[4]||(e[4]=function(d){return n.$emit("enter")})},{default:t.withCtx(function(){return[t.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var wy=yt("vue-line-wrapper"),Xa={name:"LineWrapper",components:{DraggableElement:ur},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return wy((dt(n={},this.position,!0),dt(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};Xa.render=function(n,e,i,o,r,s){var a=t.resolveComponent("DraggableElement");return t.openBlock(),t.createBlock(a,{class:s.classname,onDrag:e[1]||(e[1]=function(d){return n.$emit("drag",d)}),onDragEnd:e[2]||(e[2]=function(d){return n.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(d){return n.$emit("leave")}),onEnter:e[4]||(e[4]=function(d){return n.$emit("enter")})},{default:t.withCtx(function(){return[t.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var Et=["left","right","top","bottom"],by=["left","right"],Sy=["top","bottom"],Cy=["left","top"],ky=["fill-area","fit-area","stencil","none"],Za={left:0,top:0,width:0,height:0};function Ja(n,e,i){return!(i=i||["width","height","left","top"]).some(function(o){return n[o]!==e[o]})}function Bt(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function Fn(n,e){return{left:n.left-e.left,top:n.top-e.top}}function Oe(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function ui(n,e){var i={left:0,top:0,right:0,bottom:0};return Et.forEach(function(o){var r=e[o],s=Bt(n)[o];i[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),i}function $t(n,e){return{left:n.left-e.left,top:n.top-e.top,width:n.width+e.left+e.right,height:n.height+e.top+e.bottom}}function io(n){return{left:-n.left,top:-n.top}}function et(n,e){return G(G({},n),{left:n.left+e.left,top:n.top+e.top})}function ut(n,e,i,o){if(e!==1){if(i){var r=Oe(n);return{width:n.width*e,height:n.height*e,left:n.left+n.width*(1-e)/2+(i.left-r.left)*(1-e),top:n.top+n.height*(1-e)/2+(i.top-r.top)*(1-e)}}return{width:n.width*e,height:n.height*e,left:n.left+n.width*(1-e)/2,top:n.top+n.height*(1-e)/2}}return n}function le(n){return n.width/n.height}function On(n,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/n.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/n.height:1/0)}function _n(n,e){var i={left:0,top:0},o=ui(n,e);return o.left&&o.left>0?i.left=o.left:o.right&&o.right>0&&(i.left=-o.right),o.top&&o.top>0?i.top=o.top:o.bottom&&o.bottom>0&&(i.top=-o.bottom),i}function hr(n,e){var i;return e.minimum&&n<e.minimum?i=e.minimum:e.maximum&&n>e.maximum&&(i=e.maximum),i}function Ka(n,e){var i=le(n),o=le(e);return e.width<1/0&&e.height<1/0?i>o?{width:e.width,height:e.width/i}:{width:e.height*i,height:e.height}:e.width<1/0?{width:e.width,height:e.width/i}:e.height<1/0?{width:e.height*i,height:e.height}:n}function el(n,e){var i=e*Math.PI/180;return{width:Math.abs(n.width*Math.cos(i))+Math.abs(n.height*Math.sin(i)),height:Math.abs(n.width*Math.sin(i))+Math.abs(n.height*Math.cos(i))}}function Gt(n,e){var i=e*Math.PI/180;return{left:n.left*Math.cos(i)-n.top*Math.sin(i),top:n.left*Math.sin(i)+n.top*Math.cos(i)}}function oo(n,e){var i=ui(_e(n,e),e);return i.left+i.right+i.top+i.bottom?i.left+i.right>i.top+i.bottom?Math.min((n.width+i.left+i.right)/n.width,On(n,e)):Math.min((n.height+i.top+i.bottom)/n.height,On(n,e)):1}function _e(n,e,i){i===void 0&&(i=!1);var o=_n(n,e);return et(n,i?io(o):o)}function mr(n){return{width:n.right!==void 0&&n.left!==void 0?n.right-n.left:1/0,height:n.bottom!==void 0&&n.top!==void 0?n.bottom-n.top:1/0}}function xy(n,e){return G(G({},n),{minWidth:Math.min(e.width,n.minWidth),minHeight:Math.min(e.height,n.minHeight),maxWidth:Math.min(e.width,n.maxWidth),maxHeight:Math.min(e.height,n.maxHeight)})}function tl(n,e,i){i===void 0&&(i=!0);var o={};return Et.forEach(function(r){var s=n[r],a=e[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?i?Math.max(s,a):Math.min(s,a):i?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function ro(n,e){return tl(n,e,!0)}function nl(n){var e=n.size,i=n.aspectRatio,o=n.ignoreMinimum,r=n.sizeRestrictions;return!!((e.correctRatio||le(e)>=i.minimum&&le(e)<=i.maximum)&&e.height<=r.maxHeight&&e.width<=r.maxWidth&&e.width&&e.height&&(o||e.height>=r.minHeight&&e.width>=r.minWidth))}function il(n,e){return Math.pow(n.width-e.width,2)+Math.pow(n.height-e.height,2)}function At(n){var e=n.width,i=n.height,o=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,e)),height:Math.max(o.minHeight,Math.min(o.maxHeight,i))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(h,m){return nl({size:m,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:f})&&(!h||il(m,{width:e,height:i})<il(h,{width:e,height:i}))?m:h},null)}var d=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&d.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),nl({size:s,aspectRatio:r,sizeRestrictions:o})&&d.push(s);var c=a(d)||a(d,!0);return c&&{width:c.width,height:c.height}}function pr(n){var e=n.event,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=et(i,e.directions);return et(s,_n(s,r))}function Ey(n){var e=n.coordinates,i=n.transform,o=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,d=n.visibleArea,c=function(f,h){return pr({coordinates:f,positionRestrictions:s,event:new dr({left:h.left-f.left,top:h.top-f.top})})},u=G({},e);return(Array.isArray(i)?i:[i]).forEach(function(f){var h={};Re((h=typeof f=="function"?f({coordinates:u,imageSize:o,visibleArea:d}):f).width)&&Re(h.height)||(u=function(m,S){var w=G(G(G({},m),At({width:S.width,height:S.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return c(w,{left:m.left,top:m.top})}(u,G(G({},u),h))),Re(h.left)&&Re(h.top)||(u=c(u,G(G({},u),h)))}),u}function By(n){n.event;var e=n.getAreaRestrictions,i=n.boundaries,o=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,d=n.positionRestrictions;n.stencilReference;var c,u,f,h=G({},o),m=G({},r),S=G({},s);c=le(S),u=le(h),f===void 0&&(f=.001),(c===0||u===0?Math.abs(u-c)<f:Math.abs(u/c)<1+f&&Math.abs(u/c)>1-f)||(h=G(G({},h),At({sizeRestrictions:a,width:h.width,height:h.height,aspectRatio:{minimum:le(S),maximum:le(S)}})));var w=oo(m=ut(m,h.width*i.width/(m.width*S.width)),e({visibleArea:m,type:"resize"}));return w!==1&&(m=ut(m,w),h=ut(h,w)),m=_e(m=et(m,Fn(Oe(h),Oe(m))),e({visibleArea:m,type:"move"})),{coordinates:h=_e(h,ro(Bt(m),d)),visibleArea:m}}function $y(n){var e=n.event,i=n.getAreaRestrictions,o=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var d=G({},r),c=G({},s);if(r&&s&&e.type!=="manipulateImage"){var u={width:0,height:0};c.width,o.width,le(o)>le(d)?(u.height=.8*o.height,u.width=u.height*le(d)):(u.width=.8*o.width,u.height=u.width*le(d));var f=oo(c=ut(c,d.width*o.width/(c.width*u.width)),i({visibleArea:c,type:"resize"}));c=ut(c,f),f!==1&&(u.height/=f,u.width/=f),c=_e(c=et(c,Fn(Oe(d),Oe(c))),i({visibleArea:c,type:"move"})),d=_e(d,ro(Bt(c),a))}return{coordinates:d,visibleArea:c}}function Ny(n){var e=n.event,i=n.coordinates,o=n.visibleArea,r=n.getAreaRestrictions,s=G({},o),a=G({},i);if(e.type==="setCoordinates"){var d=Math.max(0,a.width-s.width),c=Math.max(0,a.height-s.height);d>c?s=ut(s,Math.min(a.width/s.width,On(s,r({visibleArea:s,type:"resize"})))):c>d&&(s=ut(s,Math.min(a.height/s.height,On(s,r({visibleArea:s,type:"resize"}))))),s=_e(s=et(s,io(_n(a,Bt(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function My(n){var e=n.imageSize,i=n.visibleArea,o=n.coordinates,r=i||e;return{left:(i?i.left:0)+r.width/2-o.width/2,top:(i?i.top:0)+r.height/2-o.height/2}}function Iy(n){var e=n.imageSize,i=n.visibleArea,o=n.aspectRatio,r=n.sizeRestrictions,s=i||e,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,le(s))),d=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return At(G(G({},d),{aspectRatio:o,sizeRestrictions:r}))}function Vy(n){var e,i,o=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,d=n.sizeRestrictions,c=n.stencilSize,u=r||o;return le(u)>le(s)?i=(e=c.height*u.height/s.height)*le(c):e=(i=c.width*u.width/s.width)/le(c),At({width:i,height:e,aspectRatio:a,sizeRestrictions:d})}function Ty(n){var e=n.getAreaRestrictions,i=n.coordinates,o=n.imageSize,r=le(n.boundaries);if(i){var s={height:Math.max(i.height,o.height),width:Math.max(i.width,o.width)},a=Ka({width:le(s)>r?s.width:s.height*r,height:le(s)>r?s.width/r:s.height},mr(e())),d={left:i.left+i.width/2-a.width/2,top:i.top+i.height/2-a.height/2,width:a.width,height:a.height},c=ui(i,Bt(G({left:0,top:0},o))),u={};return!c.left&&!c.right&&d.width<=o.width&&(u.left=0,u.right=o.width),!c.top&&!c.bottom&&d.height<=o.height&&(u.top=0,u.bottom=o.height),_e(d,u)}var f=le(o);return a={height:f>r?o.height:o.width/r,width:f>r?o.height*r:o.width},{left:o.width/2-a.width/2,top:o.height/2-a.height/2,width:a.width,height:a.height}}function so(n,e){return tl(n,Bt(e))}function Ry(n){var e=n.event,i=n.coordinates,o=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,d=n.adjustStencil,c=e.scale,u=e.move,f=G({},o),h=G({},i),m=1,S=1,w=c.factor&&Math.abs(c.factor-1)>.001;f=et(f,{left:u.left||0,top:u.top||0});var E={stencil:{minimum:Math.max(r.minWidth?r.minWidth/h.width:0,r.minHeight?r.minHeight/h.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/h.width:1/0,r.maxHeight?r.maxHeight/h.height:1/0,On(h,a))},area:{maximum:On(f,s({visibleArea:f,type:"resize"}))}};c.factor&&w&&(c.factor<1?(S=Math.max(c.factor,E.stencil.minimum))>1&&(S=1):c.factor>1&&(S=Math.min(c.factor,Math.min(E.area.maximum,E.stencil.maximum)))<1&&(S=1)),S&&(f=ut(f,S,c.center));var B=i.left-o.left,x=o.width+o.left-(i.width+i.left),N=i.top-o.top,C=o.height+o.top-(i.height+i.top);return f=_e(f=et(f,_n(f,{left:a.left!==void 0?a.left-B*S:void 0,top:a.top!==void 0?a.top-N*S:void 0,bottom:a.bottom!==void 0?a.bottom+C*S:void 0,right:a.right!==void 0?a.right+x*S:void 0})),s({visibleArea:f,type:"move"})),h.width=h.width*S,h.height=h.height*S,h.left=f.left+B*S,h.top=f.top+N*S,h=_e(h,ro(Bt(f),a)),c.factor&&w&&d&&(c.factor>1?m=Math.min(E.area.maximum,c.factor)/S:c.factor<1&&(m=Math.max(h.height/f.height,h.width/f.width,c.factor/S)),m!==1&&(f=et(f=_e(f=ut(f,m,c.factor>1?c.center:Oe(h)),s({visibleArea:f,type:"move"})),io(_n(h,Bt(f)))))),{coordinates:h,visibleArea:f}}function Py(n){var e=n.aspectRatio,i=n.getAreaRestrictions,o=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,d=n.imageSize,c=n.previousImageSize,u=n.angle,f=G({},o),h=G({},r),m=Gt(Oe(G({left:0,top:0},c)),u);return(f=G(G({},At({sizeRestrictions:s,aspectRatio:e,width:f.width,height:f.height})),Gt(Oe(f),u))).left-=m.left-d.width/2+f.width/2,f.top-=m.top-d.height/2+f.height/2,h=ut(h,oo(h,i({visibleArea:h,type:"resize"}))),{coordinates:f=_e(f,a),visibleArea:h=_e(h=et(h,Fn(Oe(f),Oe(o))),i({visibleArea:h,type:"move"}))}}function vy(n){var e=n.flip,i=n.previousFlip,o=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,d=n.imageSize,c=G({},s),u=G({},a),f=i.horizontal!==e.horizontal,h=i.vertical!==e.vertical;if(f||h){var m=Gt({left:d.width/2,top:d.height/2},-o),S=Gt(Oe(c),-o),w=Gt({left:f?m.left-(S.left-m.left):S.left,top:h?m.top-(S.top-m.top):S.top},o);c=et(c,Fn(w,Oe(c))),S=Gt(Oe(u),-o),u=_e(u=et(u,Fn(w=Gt({left:f?m.left-(S.left-m.left):S.left,top:h?m.top-(S.top-m.top):S.top},o),Oe(u))),r({visibleArea:u,type:"move"}))}return{coordinates:c,visibleArea:u}}function ol(n){var e=n.directions,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=n.sizeRestrictions,a=n.preserveRatio,d=n.compensate,c=G({},e),u=$t(i,c).width,f=$t(i,c).height;u<0&&(c.left<0&&c.right<0?(c.left=-(i.width-s.minWidth)/(c.left/c.right),c.right=-(i.width-s.minWidth)/(c.right/c.left)):c.left<0?c.left=-(i.width-s.minWidth):c.right<0&&(c.right=-(i.width-s.minWidth))),f<0&&(c.top<0&&c.bottom<0?(c.top=-(i.height-s.minHeight)/(c.top/c.bottom),c.bottom=-(i.height-s.minHeight)/(c.bottom/c.top)):c.top<0?c.top=-(i.height-s.minHeight):c.bottom<0&&(c.bottom=-(i.height-s.minHeight)));var h=ui($t(i,c),r);d&&(h.left&&h.left>0&&h.right===0?(c.right+=h.left,c.left-=h.left):h.right&&h.right>0&&h.left===0&&(c.left+=h.right,c.right-=h.right),h.top&&h.top>0&&h.bottom===0?(c.bottom+=h.top,c.top-=h.top):h.bottom&&h.bottom>0&&h.top===0&&(c.top+=h.bottom,c.bottom-=h.bottom),h=ui($t(i,c),r));var m={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Et.forEach(function(E){var B=h[E];B&&c[E]&&(m[E]=Math.max(0,1-B/c[E]))}),a){var S=Math.min.apply(null,Et.map(function(E){return m[E]}));S!==1/0&&Et.forEach(function(E){c[E]*=S})}else Et.forEach(function(E){m[E]!==1/0&&(c[E]*=m[E])});if(u=$t(i,c).width,f=$t(i,c).height,c.right+c.left&&(u>s.maxWidth?m.width=(s.maxWidth-i.width)/(c.right+c.left):u<s.minWidth&&(m.width=(s.minWidth-i.width)/(c.right+c.left))),c.bottom+c.top&&(f>s.maxHeight?m.height=(s.maxHeight-i.height)/(c.bottom+c.top):f<s.minHeight&&(m.height=(s.minHeight-i.height)/(c.bottom+c.top))),a){var w=Math.min(m.width,m.height);w!==1/0&&Et.forEach(function(E){c[E]*=w})}else m.width!==1/0&&by.forEach(function(E){c[E]*=m.width}),m.height!==1/0&&Sy.forEach(function(E){c[E]*=m.height});return c}function ao(n,e,i){return e==0&&i==0?n/2:e==0?0:i==0?n:n*Math.abs(e/(e+i))}var Ay=yt("vue-simple-handler"),zy=yt("vue-simple-handler-wrapper"),gr={name:"SimpleHandler",components:{HandlerWrapper:Ya},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var n,e=(dt(n={},this.horizontalPosition,!!this.horizontalPosition),dt(n,this.verticalPosition,!!this.verticalPosition),dt(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),dt(n,"hover",this.hover),n);return{default:Ne(Ay(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ne(zy(e),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};gr.render=function(n,e,i,o,r,s){var a=t.resolveComponent("HandlerWrapper");return t.openBlock(),t.createBlock(a,{class:s.classes.wrapper,"vertical-position":i.verticalPosition,"horizontal-position":i.horizontalPosition,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:t.withCtx(function(){return[t.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Dy=yt("vue-simple-line"),Fy=yt("vue-simple-line-wrapper"),yr={name:"SimpleLine",components:{LineWrapper:Xa},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:Ne(Dy(dt({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ne(Fy(dt({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};yr.render=function(n,e,i,o,r,s){var a=t.resolveComponent("LineWrapper");return t.openBlock(),t.createBlock(a,{class:s.classes.wrapper,position:i.position,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:t.withCtx(function(){return[t.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var wr=yt("vue-bounding-box"),Oy=["east","west",null],_y=["south","north",null],rl={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return gr}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return yr}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return Oy.forEach(function(e){_y.forEach(function(i){if(e!==i){var o=Ua(e,i),r=o.name,s=o.classname;n.push({name:r,classname:s,verticalDirection:i,horizontalDirection:e})}})}),{points:n}},computed:{style:function(){var n={};return this.width&&this.height&&(n.width="".concat(this.width,"px"),n.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),n},classes:function(){var n=this.handlersClasses,e=this.handlersWrappersClasses,i=this.linesClasses,o=this.linesWrappersClasses;return{root:wr(),handlers:n,handlersWrappers:e,lines:i,linesWrappers:o}},lineNodes:function(){var n=this,e=[];return this.points.forEach(function(i){i.horizontalDirection&&i.verticalDirection||!n.lines[i.name]||e.push({name:i.name,component:n.linesComponent,class:Ne(n.classes.lines.default,n.classes.lines[i.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Ne(n.classes.linesWrappers.default,n.classes.linesWrappers[i.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:i.verticalDirection,horizontalDirection:i.horizontalDirection,disabled:!n.resizable})}),e},handlerNodes:function(){var n=this,e=[],i=this.width,o=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class:Ne(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Ne(n.classes.handlersWrappers.default,n.classes.handlersWrappers[r.name]),hoverClass:n.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!n.resizable};if(i&&o){var a=r.horizontalDirection,d=r.verticalDirection,c=a==="east"?i:a==="west"?0:i/2,u=d==="south"?o:d==="north"?0:o/2;s.wrapperClass=wr("handler"),s.wrapperStyle={transform:"translate(".concat(c,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=wr("handler",dt({},r.classname,!0));e.push(s)}}),e}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(n,e,i){var o,r=n.shift(),s=r.left,a=r.top,d={left:0,right:0,top:0,bottom:0};e==="west"?d.left-=s:e==="east"&&(d.right+=s),i==="north"?d.top-=a:i==="south"&&(d.bottom+=a),!i&&e?o="width":i&&!e&&(o="height"),this.resizable&&this.$emit("resize",new gy(d,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:i==="south"||!i,top:i==="north"||!i},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};rl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[t.renderSlot(n.$slots,"default"),t.createVNode("div",null,[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(s.lineNodes,function(a){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(d){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(s.handlerNodes,function(a){return t.openBlock(),t.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(d){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var Ly=yt("vue-draggable-area"),sl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:Ly()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(n){if(n.cancelable){var e=this.movable&&n.touches.length===1;e&&(this.touches=un(n.touches)),(this.touchStarted||e)&&(n.preventDefault(),n.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(n){this.touches.length>=1&&(this.touchStarted?(this.processMove(n,n.touches),n.preventDefault(),n.stopPropagation()):Qa({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:n.touches[0].clientX,y:n.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(n){if(this.movable&&n.button===0){var e={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[e],this.initAnchor(e),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.cancelable&&n.preventDefault(),n.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var e=this.$refs.container.getBoundingClientRect(),i=e.left,o=e.top;this.anchor={x:n.clientX-i,y:n.clientY-o}},processMove:function(n,e){var i=un(e);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&i.length===1&&this.$emit("move",new dr({left:i[0].clientX-(r+this.anchor.x),top:i[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};sl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[t.renderSlot(n.$slots,"default")],544)};function br(n){var e,i;return{rotate:n.rotate||0,flip:{horizontal:((e=n==null?void 0:n.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((i=n==null?void 0:n.flip)===null||i===void 0?void 0:i.vertical)||!1}}}function Hy(n){return new Promise(function(e,i){try{if(n)if(/^data:/i.test(n))e(function(c){c=c.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(c),f=u.length,h=new ArrayBuffer(f),m=new Uint8Array(h),S=0;S<f;S++)m[S]=u.charCodeAt(S);return h}(n));else if(/^blob:/i.test(n)){var o=new FileReader;o.onload=function(c){e(c.target.result)},s=n,a=function(c){o.readAsArrayBuffer(c)},(d=new XMLHttpRequest).open("GET",s,!0),d.responseType="blob",d.onload=function(){this.status!=200&&this.status!==0||a(this.response)},d.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?e(r.response):i("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",n,!0),r.responseType="arraybuffer",r.send(null)}else i("Error: the image is empty")}catch(c){i(c)}var s,a,d})}function al(n){var e=n.rotate,i=n.flip,o=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+e+"deg) ",s+=" scaleX("+o*(i.horizontal?-1:1)+") ",s+=" scaleY("+r*(i.vertical?-1:1)+") "}function Uy(n){try{var e,i=new DataView(n),o=void 0,r=void 0,s=void 0,a=void 0;if(i.getUint8(0)===255&&i.getUint8(1)===216)for(var d=i.byteLength,c=2;c+1<d;){if(i.getUint8(c)===255&&i.getUint8(c+1)===225){s=c;break}c++}if(s&&(o=s+10,function(S,w,E){var B,x="";for(B=w,E+=w;B<E;B++)x+=String.fromCharCode(S.getUint8(B));return x}(i,s+4,4)==="Exif")){var u=i.getUint16(o);if(((r=u===18761)||u===19789)&&i.getUint16(o+2,r)===42){var f=i.getUint32(o+4,r);f>=8&&(a=o+f)}}if(a){for(var h=i.getUint16(a,r),m=0;m<h;m++)if(c=a+12*m+2,i.getUint16(c,r)===274){c+=8,e=i.getUint16(c,r),i.setUint16(c,1,r);break}}return e}catch{return null}}function ll(n,e){var i=e.getBoundingClientRect(),o=i.left,r=i.top,s={left:0,top:0},a=0;return n.forEach(function(d){s.left+=(d.clientX-o)/n.length,s.top+=(d.clientY-r)/n.length}),n.forEach(function(d){a+=Qa({x:s.left,y:s.top},{x:d.clientX-o,y:d.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var cl={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=lr(this.processEnd),this.touches=[]},methods:{processMove:function(n,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new di({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var i=ll(e,this.$refs.container),o=this.oldGeometricProperties;o.count===i.count&&o.count>1&&this.$emit("resize",new di({left:o.centerMass.left-i.centerMass.left,top:o.centerMass.top-i.centerMass.top},{factor:o.spread/i.spread,center:i.centerMass})),this.oldGeometricProperties=i}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(n){return this.eventsFilter?this.eventsFilter(n,this.transforming)!==!1:(n.preventDefault(),n.stopPropagation(),!0)},onTouchStart:function(n){if(n.cancelable&&(this.touchMove||this.touchResize&&n.touches.length>1)&&this.processEvent(n)){var e=this.$refs.container,i=e.getBoundingClientRect(),o=i.left,r=i.top,s=i.bottom,a=i.right;this.touches=un(n.touches).filter(function(d){return d.clientX>o&&d.clientX<a&&d.clientY>r&&d.clientY<s}),this.oldGeometricProperties=ll(this.touches,e)}},onTouchEnd:function(n){n.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(n){var e=this;if(this.touches.length){var i=un(n.touches).filter(function(o){return!o.identifier||e.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(n)&&(this.processMove(n,i),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var e={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(n){this.touches.length&&this.processEvent(n)&&this.processMove(n,[{clientX:n.clientX,clientY:n.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(n){if(this.wheelResize&&this.processEvent(n)){var e=this.$refs.container.getBoundingClientRect(),i=e.left,o=e.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(d=+a)==0||Ga(d)?d:d>0?1:-1),s={left:n.clientX-i,top:n.clientY-o};this.$emit("resize",new di({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,d}},emits:["resize","move","transform-end"]};cl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:e[3]||(e[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[t.renderSlot(n.$slots,"default")],544)};var Sr={components:{TransformableImage:cl},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};Sr.render=function(n,e,i,o,r,s){var a=t.resolveComponent("transformable-image");return t.openBlock(),t.createBlock(a,{"touch-move":i.touchMove,"touch-resize":i.touchResize,"mouse-move":i.mouseMove,"wheel-resize":i.wheelResize,onMove:e[1]||(e[1]=function(d){return n.$emit("move",d)}),onResize:e[2]||(e[2]=function(d){return n.$emit("resize",d)})},{default:t.withCtx(function(){return[t.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var lo=yt("vue-preview"),dl={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:lo({fill:this.fill}),wrapper:lo("wrapper"),imageWrapper:lo("image-wrapper"),image:Ne(lo("image"),this.imageClass)}},style:function(){if(this.fill)return{};var n={};return this.width&&(n.width="".concat(this.size.width,"px")),this.height&&(n.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},wrapperStyle:function(){var n={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},imageStyle:function(){if(this.coordinates&&this.image){var n=this.coordinates.width/this.size.width,e=ae(ae({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),i=this.imageSize.width,o=this.imageSize.height,r=el({width:i,height:o},e.rotate),s={width:"".concat(i,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(i-r.width)*e.scaleX/2,top:(o-r.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*i/2,top:(1-e.scaleY)*o/2}};return s.transform=`translate(
44
+ `.concat(-this.coordinates.left/n-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/n-a.rotate.top-a.scale.top,"px) ")+al(e),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(n){(n.width||n.height)&&this.onChangeImage()}},mounted:function(){var n=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){n.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var n=this.$refs.image;this.calculatedImageSize.height=n.naturalHeight,this.calculatedImageSize.width=n.naturalWidth},refresh:function(){var n=this.$refs.root;this.width||(this.calculatedSize.width=n.clientWidth),this.height||(this.calculatedSize.height=n.clientHeight)},onChangeImage:function(){var n=this.$refs.image;n&&n.complete&&this.refreshImage(),this.refresh()}}};dl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[t.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[t.withDirectives(t.createVNode("img",{ref:"image",src:i.image&&i.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[t.vShow,i.image&&i.image.src]])],6)],6)};var ul={components:{Preview:dl},inheritAttrs:!1};ul.render=function(n,e,i,o,r,s){var a=t.resolveComponent("preview");return t.openBlock(),t.createBlock(a,t.mergeProps(n.$attrs,{fill:!0}),null,16)};var Cr=yt("vue-rectangle-stencil"),fl={name:"RectangleStencil",components:{StencilPreview:ul,BoundingBox:rl,DraggableArea:sl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return gr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return yr}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:Ne(Cr({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Ne(Cr("preview"),this.previewClass),boundingBox:Ne(Cr("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,e=n.height,i=n.width,o=n.left,r=n.top,s={width:"".concat(i,"px"),height:"".concat(e,"px"),transform:"translate(".concat(o,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(n){this.$emit("move",n),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(n){this.$emit("resize",n),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};fl.render=function(n,e,i,o,r,s){var a=t.resolveComponent("stencil-preview"),d=t.resolveComponent("draggable-area"),c=t.resolveComponent("bounding-box");return t.openBlock(),t.createBlock("div",{class:s.classes.stencil,style:s.style},[t.createVNode(c,{width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,transitions:i.transitions,class:s.classes.boundingBox,handlers:i.handlers,"handlers-component":i.handlersComponent,"handlers-classes":i.handlersClasses,"handlers-wrappers-classes":i.handlersWrappersClasses,lines:i.lines,"lines-component":i.linesComponent,"lines-classes":i.linesClasses,"lines-wrappers-classes":i.linesWrappersClasses,resizable:i.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:t.withCtx(function(){return[t.createVNode(d,{movable:i.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:t.withCtx(function(){return[t.createVNode(a,{image:i.image,coordinates:i.coordinates,width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,class:s.classes.preview,transitions:i.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var qy=["transitions"],zt=yt("vue-advanced-cropper"),hl={name:"Cropper",components:{BackgroundWrapper:Sr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return fl}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Sr}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(n){return ky.indexOf(n)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(n){return!(typeof n=="string"&&n!=="fill"&&n!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(n){var e=n.event,i=n.coordinates,o=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=G(G({},i),{right:i.left+i.width,bottom:i.top+i.height}),d=e.params||{},c=G({},e.directions),u=d.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(c.left=0,c.right=0),s.heightFrozen&&(c.top=0,c.bottom=0),Et.forEach(function(P){u[P]||(c[P]=0)});var f=$t(a,c=ol({coordinates:a,directions:c,sizeRestrictions:s,positionRestrictions:r})).width,h=$t(a,c).height,m=d.preserveRatio?le(a):hr(f/h,o);if(m){var S=d.respectDirection;if(S||(S=a.width>=a.height||m===1?"width":"height"),S==="width"){var w=f/m-a.height;if(u.top&&u.bottom){var E=c.top,B=c.bottom;c.bottom=ao(w,B,E),c.top=ao(w,E,B)}else u.bottom?c.bottom=w:u.top?c.top=w:u.right?c.right=0:u.left&&(c.left=0)}else if(S==="height"){var x=a.width-h*m;if(u.left&&u.right){var N=c.left,C=c.right;c.left=-ao(x,N,C),c.right=-ao(x,C,N)}else u.left?c.left=-x:u.right?c.right=-x:u.top?c.top=0:u.bottom&&(c.bottom=0)}c=ol({directions:c,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:d.compensate})}return f=$t(a,c).width,h=$t(a,c).height,(m=d.preserveRatio?le(a):hr(f/h,o))&&Math.abs(m-f/h)>.001&&Et.forEach(function(P){u[P]||(c[P]=0)}),pr({event:new dr({left:-c.left,top:-c.top}),coordinates:{width:i.width+c.right+c.left,height:i.height+c.top+c.bottom,left:i.left,top:i.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:pr},initStretcher:{type:Function,default:function(n){var e=n.stretcher,i=n.imageSize,o=le(i);e.style.width=i.width+"px",e.style.height=e.clientWidth/o+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var e=n.visibleArea,i=n.coordinates,o=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=G(G({},i),At({width:i.width,height:i.height,aspectRatio:o,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,r.minHeight),minWidth:Math.min(e.width,r.minWidth)}}));return a=_e(a=et(a,Fn(Oe(i),Oe(a))),ro(Bt(e),s))}},fitVisibleArea:{type:Function,default:function(n){var e=n.visibleArea,i=n.boundaries,o=n.getAreaRestrictions,r=n.coordinates,s=G({},e);s.height=s.width/le(i),s.top+=(e.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=ut(s,Math.max(r.height/s.height,r.width/s.width)));var a=io(_n(r,Bt(s=ut(s,oo(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=_e(s=et(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var e=n.visibleArea,i=n.boundaries,o=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(le(i)>le(o)?(a={top:0,bottom:o.height},e&&s==="move"&&(e.width>o.width?(a.left=-(e.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},e&&s==="move"&&(e.height>o.height?(a.top=-(e.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(n){return{minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(n){var e=n.imageSize,i={};return n.imageRestriction!=="none"&&(i={left:0,top:0,right:e.width,bottom:e.height}),i}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:ae({},Za)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var n=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(n))+Math.abs(this.imageAttributes.height*Math.sin(n)),height:Math.abs(this.imageAttributes.width*Math.sin(n))+Math.abs(this.imageAttributes.height*Math.cos(n))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var n=cr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:cr(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:n}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var n=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:Re(this.minWidth)?0:no(this.minWidth),minHeight:Re(this.minHeight)?0:no(this.minHeight),maxWidth:Re(this.maxWidth)?1/0:no(this.maxWidth),maxHeight:Re(this.maxHeight)?1/0:no(this.maxHeight)});if(n=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,d=o.positionRestrictions,c=G(G({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});d.left!==void 0&&d.right!==void 0&&(c.maxWidth=Math.min(c.maxWidth,d.right-d.left)),d.bottom!==void 0&&d.top!==void 0&&(c.maxHeight=Math.min(c.maxHeight,d.bottom-d.top));var u=mr(r),f=Ka(a,u);return u.width<1/0&&(!c.maxWidth||c.maxWidth>f.width)&&(c.maxWidth=Math.min(c.maxWidth,f.width)),u.height<1/0&&(!c.maxHeight||c.maxHeight>f.height)&&(c.maxHeight=Math.min(c.maxHeight,f.height)),c.minWidth>c.maxWidth&&(c.minWidth=c.maxWidth,c.widthFrozen=!0),c.minHeight>c.maxHeight&&(c.minHeight=c.maxHeight,c.heightFrozen=!0),c}({sizeRestrictions:n,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),i=mr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,i.width*e.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,i.height*e.height/this.boundaries.height),n.maxWidth<n.minWidth&&(n.minWidth=n.maxWidth),n.maxHeight<n.minHeight&&(n.minHeight=n.maxHeight)}return n}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:zt(),image:Ne(zt("image"),this.imageClass),stencil:zt("stencil"),boundaries:Ne(zt("boundaries"),this.boundariesClass),stretcher:Ne(zt("stretcher")),background:Ne(zt("background"),this.backgroundClass),foreground:Ne(zt("foreground"),this.foregroundClass),imageWrapper:Ne(zt("image-wrapper")),cropperWrapper:Ne(zt("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,e=n.width,i=n.height,o=n.left,r=n.top;return{width:e/this.coefficient,height:i/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var n={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(n.opacity="0"),n},imageStyle:function(){var n=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},i={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},o=ae(ae({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/n.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/n.height)}),r={width:"".concat(n.width,"px"),height:"".concat(n.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-i.left-this.imageTransforms.translateX,"px, ").concat(-e.top-i.top-this.imageTransforms.translateY,"px)")+al(o)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var n=this;this.$nextTick(function(){n.resetCoordinates(),n.runAutoZoom("setCoordinates"),n.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(n,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(i){return n[i]!==e[i]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=lr(this.update,this.debounce),this.debouncedDisableTransitions=lr(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var n=this.initialized?this.prepareResult(ae({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:ae({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var i=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ae({},this.visibleArea):null,imageTransforms:e,get canvas(){return i.canvas?i.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ae({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(n,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new di({},{factor:1/n,center:e}),{normalize:!1,transitions:r})},move:function(n,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new di({left:n||0,top:e||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var e=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.autoZoom,r=o===void 0||o,s=i.transitions,a=s===void 0||s;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(n),r&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=n})},refresh:function(){var n=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){n.onChange()}):this.resetVisibleArea().then(function(){n.onChange()})},reset:function(){var n=this;return this.resetVisibleArea().then(function(){n.onChange(!1)})},awaitRender:function(n){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){n(),e.awaiting=!1}))},prepareResult:function(n){return this.roundResult?function(e){var i=e.coordinates,o=e.sizeRestrictions,r=e.positionRestrictions,s={width:Math.round(i.width),height:Math.round(i.height),left:Math.round(i.left),top:Math.round(i.top)};return s.width>o.maxWidth?s.width=Math.floor(i.width):s.width<o.minWidth&&(s.width=Math.ceil(i.width)),s.height>o.maxHeight?s.height=Math.floor(i.height):s.height<o.minHeight&&(s.height=Math.ceil(i.height)),_e(s,r)}(ae(ae({},this.getPublicProperties()),{},{positionRestrictions:so(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,e,i,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?By:this.autoZoom?$y:Ny);var s=r({event:{type:n,params:o},visibleArea:e,coordinates:i,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return ae(ae({},s),{},{changed:!Ja(s.visibleArea,e)||!Ja(s.coordinates,i)})},runAutoZoom:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.transitions,o=i!==void 0&&i,r=my(e,qy),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,d=s.coordinates,c=s.changed;o&&c&&this.enableTransitions(),this.visibleArea=a,this.coordinates=d,o&&c&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(e){var i=e.event,o=e.visibleArea,r=e.coefficient;if(i.type==="manipulateImage")return G(G({},i),{move:{left:i.move&&i.move.left?r*i.move.left:0,top:i.move&&i.move.top?r*i.move.top:0},scale:{factor:i.scale&&i.scale.factor?i.scale.factor:1,center:i.scale&&i.scale.center?{left:i.scale.center.left*r+o.left,top:i.scale.center.top*r+o.top}:null}});if(i.type==="resize"){var s=G(G({},i),{directions:G({},i.directions)});return Et.forEach(function(d){s.directions[d]*=r}),s}if(i.type==="move"){var a=G(G({},i),{directions:G({},i.directions)});return Cy.forEach(function(d){a.directions[d]*=r}),a}return i}(ae(ae({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,e=this.$refs.image,i=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(d,c,u){var f=u.rotate,h=u.flip,m={width:c.naturalWidth,height:c.naturalHeight},S=el(m,f),w=d.getContext("2d");d.height=S.height,d.width=S.width,w.save();var E=Gt(Oe(G({left:0,top:0},m)),f);return w.translate(-(E.left-S.width/2),-(E.top-S.height/2)),w.rotate(f*Math.PI/180),w.translate(h.horizontal?m.width:0,h.vertical?m.height:0),w.scale(h.horizontal?-1:1,h.vertical?-1:1),w.drawImage(c,0,0,m.width,m.height),w.restore(),d}(this.$refs.sourceCanvas,e,this.imageTransforms):e,o=ae({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(d){return d.find(function(c){return u=c,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=At({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(d,c,u,f,h){d.width=f?f.width:u.width,d.height=f?f.height:u.height;var m=d.getContext("2d");m.clearRect(0,0,d.width,d.height),h&&(h.imageSmoothingEnabled&&(m.imageSmoothingEnabled=h.imageSmoothingEnabled),h.imageSmoothingQuality&&(m.imageSmoothingQuality=h.imageSmoothingQuality),h.fillColor&&(m.fillStyle=h.fillColor,m.fillRect(0,0,d.width,d.height),m.save()));var S=u.left<0?-u.left:0,w=u.top<0?-u.top:0;m.drawImage(c,u.left+S,u.top+w,u.width,u.height,S*(d.width/u.width),w*(d.height/u.height),d.width,d.height)}(n,i,this.coordinates,s,o),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.visibleArea&&e?xy(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&e?so(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Ey({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:i,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?Vy:Iy);var i=this.sizeRestrictions;i.minWidth,i.minHeight,i.maxWidth,i.maxHeight;var o=Dn(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,r=this.defaultPosition||My,s=[o,function(a){var d=a.coordinates;return ae({},Dn(r)?r({coordinates:d,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,un(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var n=this;this.imageLoaded=!1,setTimeout(function(){var e=n.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),n.coordinates=n.defaultCoordinates(),n.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var n=this,e=this.$refs.stretcher,i=this.$refs.cropper;return this.initStretcher({cropper:i,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:i,imageSize:n.imageSize};if(Dn(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(o):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,d=s.clientHeight,c=s.clientWidth,u=d,f=a.width*d/a.height;return f>c&&(f=c,u=a.height*c/a.width),{width:f,height:u}}(o):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!n.boundaries.width||!n.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var n=this;return this.appliedImageTransforms=ae(ae({},this.defaultImageTransforms),{},{flip:ae({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var e,i,o,r,s,a,d=n.defaultVisibleArea||Ty;n.visibleArea=Dn(d)?d({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(e={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},i=e.visibleArea,o=e.boundaries,r=e.getAreaRestrictions,s=G({},i),a=le(o),s.width/s.height!==a&&(s.height=s.width/a),_e(s,r({visibleArea:s,type:"move"}))),n.priority==="visible-area"?n.resetCoordinates():n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("resetVisibleArea")}).catch(function(){n.visibleArea=null})},updateVisibleArea:function(){var n=this;return this.updateBoundaries().then(function(){n.visibleArea=n.fitVisibleArea({imageSize:n.imageSize,boundaries:n.boundaries,visibleArea:n.visibleArea,coordinates:n.coordinates,getAreaRestrictions:n.getAreaRestrictions}),n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("updateVisibleArea")}).catch(function(){n.visibleArea=null})},onChange:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];n&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var n,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(ja(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],d={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},c=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!d.protocol&&!d.host&&!d.port||d.protocol&&d.protocol==s.protocol&&d.host&&d.host==s.host&&d.host&&c(d)==c(s))}(this.src)){var i=Re(this.crossOrigin)?this.canvas:this.crossOrigin;i===!0&&(i="anonymous"),this.imageAttributes.crossOrigin=i||null}if(this.checkOrientation){var o=(n=this.src,new Promise(function(r){Hy(n).then(function(s){var a=Uy(s);r(s?{source:n,arrayBuffer:s,orientation:a}:{source:n,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:n,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(e.onParseImage)},this.transitionTime)}else setTimeout(function(){e.onParseImage({source:e.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var n=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){n.$emit("ready"),n.onChange(!1)}))},onParseImage:function(n){var e=this,i=n.source,o=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?qa(i)||!ja(i)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],d=new Uint8Array(s);d.length>0;){var c=d.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(c):c.slice())),d=d.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=i,Dn(this.defaultTransforms)?this.appliedImageTransforms=br(this.defaultTransforms()):to(this.defaultTransforms)?this.appliedImageTransforms=br(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=br({});if(s)switch(s){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a}(r),this.defaultImageTransforms=ae(ae({},this.appliedImageTransforms),{},{flip:ae({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=e.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?e.onSuccessLoadImage():e.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(n){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(ae(ae({},e.getPublicProperties()),{},{positionRestrictions:so(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(n)})),e.onChange()})},onResize:function(n){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var i=e.sizeRestrictions,o=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(ae(ae({},e.getPublicProperties()),{},{positionRestrictions:so(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(i.maxWidth,e.visibleArea.width),maxHeight:Math.min(i.maxHeight,e.visibleArea.height),minWidth:Math.max(i.minWidth,o),minHeight:Math.max(i.minHeight,o)},event:e.normalizeEvent(n)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var i=e.transitions,o=i!==void 0&&i,r=e.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=Ry(ae(ae({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),d=a.visibleArea,c=a.coordinates;this.visibleArea=d,this.coordinates=c,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=n.visibleArea,i=n.type,o=i===void 0?"move":i;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:o})},getAspectRatio:function(n){var e,i,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var d=this.$refs.stencil.aspectRatios();e=d.minimum,i=d.maximum}if(Re(e)&&(e=Re(r)?s:r),Re(i)&&(i=Re(r)?a:r),!n&&(Re(e)||Re(i))){var c=this.getStencilSize(),u=c?le(c):null;Re(e)&&(e=Wa(u)?u:void 0),Re(i)&&(i=Wa(u)?u:void 0)}return{minimum:e,maximum:i}},getStencilSize:function(){if(this.stencilSize)return n={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=n.boundaries,i=n.stencilSize,o=n.aspectRatio,hr(le(r=Dn(i)?i({boundaries:e,aspectRatio:o}):i),o)&&(r=At({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:o.minimum,maximum:o.maximum}})),(r.width>e.width||r.height>e.height)&&(r=At({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:le(r),maximum:le(r)}})),r;var n,e,i,o,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return ae({},Za)},flip:function(n,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=ae({},this.imageTransforms.flip),a=vy({flip:{horizontal:n?!s.horizontal:s.horizontal,vertical:e?!s.vertical:s.vertical},previousFlip:s,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),d=a.visibleArea,c=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=d,this.coordinates=c,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.transitions,o=i===void 0||i;if(!this.transitionsActive){o&&this.enableTransitions();var r=ae({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=Py({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:n,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,d=s.coordinates,c=this.processAutoZoom("rotateImage",a,d);a=c.visibleArea,d=c.coordinates,this.visibleArea=a,this.coordinates=d,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},jy={key:0,ref:"canvas",style:{display:"none"}},Wy={key:1,ref:"sourceCanvas",style:{display:"none"}};hl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"cropper",class:s.classes.cropper},[t.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),t.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:t.withCtx(function(){return[t.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),t.createVNode("div",{class:s.classes.imageWrapper},[t.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:e[1]||(e[1]=t.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),t.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),t.withDirectives((t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.stencilComponent),t.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},i.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[t.vShow,r.imageLoaded]]),i.canvas?(t.openBlock(),t.createBlock("canvas",jy,null,512)):t.createCommentVNode("",!0),i.canvas?(t.openBlock(),t.createBlock("canvas",Wy,null,512)):t.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const Gy={width:0,height:0,left:0,top:0};class kr{constructor(){l(this,"id");l(this,"ratio",0);l(this,"src","");l(this,"coordinates",Gy)}setCoordinates(e){this.coordinates=e}getCoordinates(){return this.coordinates}static Create(e,i=0,o){const r=new kr;return r.src=e,r.ratio=i,r.id=o,r}setRatio(e){this.ratio=e}getRatio(){return this.ratio}setSrc(e){this.src=e}getSrc(){return this.src}}const Qy={class:"cropper-wrapper"},Yy={class:"row justify-end q-mt-md"},Xy=v(t.defineComponent({__name:"ImageCropper",props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:1}},emits:["crop","update:ratio"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.ratio),s=t.ref(kr.Create(i.src,i.ratio));s.value.setRatio(r.value);const a=t.ref(),d=t.computed(()=>[{label:"2:3 (формат A4)",value:2/3},{label:"4:3 (для карточек новостей)",value:4/3},{label:"1:1 (для фото сотрудников)",value:1},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"3:4 (вертикальное изображение)",value:3/4},{label:"Задать пропорции вручную",value:0}]),c=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(h=>{var m;o("crop",{blob:h,src:(m=f.canvas)==null?void 0:m.toDataURL()}),o("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,h)=>(t.openBlock(),t.createElementBlock("div",Qy,[t.createVNode(Ki,{modelValue:r.value,"onUpdate:modelValue":[h[0]||(h[0]=m=>r.value=m),h[1]||(h[1]=m=>c(m))],clearable:!1,options:d.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),t.createVNode(t.unref(hl),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:h[2]||(h[2]=m=>s.value.setCoordinates(m.coordinates))},null,8,["src","stencil-props"]),t.createElementVNode("div",Yy,[t.createVNode(Ke,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),Zy={class:"column items-center q-my-md"},Jy={class:"uploader-content"},Ky={class:"uploader-icon"},ew={class:"tools-button absolute-full column items-center justify-center"},tw={class:"row q-gutter-sm"},nw=v(t.defineComponent({__name:"PUploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{},height:{default:150},emitCrop:{type:Boolean,default:!1},ratio:{default:1},acceptTypes:{default:"image/*"},maxFileSize:{default:10485760}},emits:["crop","removeFile","update:ratio"],setup(n,{emit:e}){const i=V.ClosePopup,o=n,r=e,s=t.ref(),a=t.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),d=t.ref(!1),c=t.ref(),u=t.ref(o.ratio),f=t.ref(""),h=t.computed(()=>({width:`${o.height*u.value}px`,height:`${o.height}px`,maxWidth:"100%"})),m=t.computed(()=>({width:`${o.height*u.value}px`,height:`${o.height}px`,maxWidth:"100%"})),S=()=>{s.value=void 0,u.value=1,r("update:ratio",1),r("removeFile")},w=x=>{x.blob.src=x.src,o.fileInfo.setFile&&o.fileInfo.setFile(x.blob),o.fileInfo.fileSystemPath&&(s.value=o.fileInfo),d.value=!1,r("crop")},E=x=>{f.value=x.url,d.value=!0},B=x=>{if(x.length===0)return;const N=x[0];N.url=URL.createObjectURL(N),s.value=N,o.fileInfo.setFile&&o.fileInfo.setFile(N),o.withCrop&&E(s.value)};return t.watch(u,x=>{r("update:ratio",x)}),t.watch(()=>[o.fileInfo.description,o.fileInfo.order,o.fileInfo.fileSystemPath],()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),t.onBeforeMount(()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),(x,N)=>(t.openBlock(),t.createElementBlock("div",Zy,[t.unref(s)?(t.openBlock(),t.createElementBlock("div",{key:1,class:"img-container relative-position",style:t.normalizeStyle(t.unref(h))},[t.createVNode(t.unref(V.QImg),{src:t.unref(s).url,ratio:t.unref(u),class:"uploaded-image","spinner-color":"primary"},null,8,["src","ratio"]),t.createElementVNode("div",ew,[t.createElementVNode("div",tw,[t.createVNode(Ke,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md",onClick:N[0]||(N[0]=C=>E(t.unref(s)))},{default:t.withCtx(()=>[t.createVNode(ci,null,{default:t.withCtx(()=>[...N[5]||(N[5]=[t.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),t.createVNode(Ke,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md",onClick:S},{default:t.withCtx(()=>[t.createVNode(ci,null,{default:t.withCtx(()=>[...N[6]||(N[6]=[t.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(t.openBlock(),t.createBlock(t.unref(V.QUploader),{key:0,id:t.unref(a),ref_key:"uploader",ref:c,class:"img-uploader",style:t.normalizeStyle(t.unref(m)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:B,onRemoved:S},{header:t.withCtx(()=>[t.createElementVNode("div",Jy,[t.createVNode(t.unref(V.QUploaderAddTrigger)),t.createElementVNode("div",Ky,[t.createVNode(t.unref(V.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),N[4]||(N[4]=t.createElementVNode("div",{class:"uploader-text text-primary text-center"},[t.createElementVNode("div",{class:"text-weight-medium"},"Добавить изображение"),t.createElementVNode("div",{class:"text-caption text-grey-6 q-mt-xs"}," Перетащите файл или нажмите для загрузки ")],-1))])]),_:1},8,["id","style","accept","max-file-size"])),t.createVNode(Ji,{modelValue:t.unref(d),"onUpdate:modelValue":N[3]||(N[3]=C=>t.isRef(d)?d.value=C:null),persistent:""},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCard),{class:"full-height"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QCardSection),{class:"row items-center q-pb-none"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.QSpace)),t.withDirectives(t.createVNode(Ke,{icon:"close",flat:"",round:"",dense:""},null,512),[[t.unref(i)]])]),_:1}),t.createVNode(t.unref(V.QCardSection),{class:"cropper-section"},{default:t.withCtx(()=>[t.createVNode(Xy,{ratio:t.unref(u),"onUpdate:ratio":N[1]||(N[1]=C=>t.isRef(u)?u.value=C:null),src:t.unref(f),onCrop:w,onClose:N[2]||(N[2]=C=>d.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),[["__scopeId","data-v-52f912c6"]]);function iw(n){n.component("PTabs",ry),n.component("PUploaderFile",hy),n.component("PUploaderImage",nw),n.component("PAuthForm",_a),n.component("PAuthModal",ty),n.component("PNameEdit",iy)}const ow={install:function(n){Cg(n),K0(n),c0(n),iw(n),Q1(n)}};function rw(n,e={}){const{quasarPlugins:i=!0}=e;i&&n.use(V.Quasar,{plugins:{Notify:V.Notify,Dialog:V.Dialog}}),ow.install(n)}class sw extends wi{constructor(){super(...arguments);l(this,"label","Логин");l(this,"name","login");l(this,"validator",new Dr);l(this,"method",wn.Login);l(this,"id","field-auth-login")}}const aw=["PF","PFM"],lw=v(t.defineComponent({__name:"ExtractCreateForm",emits:["create"],setup(n,{emit:e}){const i=e,o=ExtractsStore.Item,r=async()=>{await ExtractsStore.Create(),ExtractsStore.AppendToAll([o]),i("create")};return(s,a)=>{const d=t.resolveComponent("PInput"),c=t.resolveComponent("PButton");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(d,{modelValue:t.unref(o).name,"onUpdate:modelValue":a[0]||(a[0]=u=>t.unref(o).name=u)},null,8,["modelValue"]),t.createVNode(c,{text:"Создать",onClick:r})],64)}}}),[["__scopeId","data-v-acdf750a"]]),cw=Object.freeze(Object.defineProperty({__proto__:null,default:v(t.defineComponent({__name:"ExtractsList",setup(n){const e=t.ref(!1),i=t.ref(!1),o=async()=>{i.value=!0},r=async()=>{await Promise.all([o()])},s=()=>{e.value=!e.value};return R.H.Hooks.onBeforeMount(r),(a,d)=>{const c=lw,u=t.resolveComponent("PModal");return t.unref(e)?(t.openBlock(),t.createBlock(u,{key:0,show:t.unref(e)},{default:t.withCtx(()=>[t.createVNode(c,{onCreate:s})]),_:1},8,["show"])):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03915680"]])},Symbol.toStringTag,{value:"Module"}));W.AuthButtonLogin=po,W.AuthButtonRefresh=Ar,W.AuthButtonRegister=go,W.AuthButtonRestore=yi,W.AuthChunks=ve,W.AuthFieldsIds=Tt,W.AuthFormSettings=Or,W.AuthMethods=wn,W.EmailField=bi,W.LoginField=sw,W.PBadge=Ba,W.PButton=Ke,W.PCard=za,W.PCheckBox=$a,W.PChip=Na,W.PCrudList=Da,W.PDateInput=Zi,W.PDialog=Ji,W.PEditDialog=Fa,W.PF=R,W.PFM=Xp,W.PHint=rr,W.PInput=Wt,W.POptionsListSingle=Ma,W.POpts=Ia,W.PSelect=Ki,W.PTableToggle=Va,W.PToggle=Ta,W.PasswordField=Si,W.PasswordRepeatField=Fr,W.Schedule=ri,W.ScheduleDay=Yi,W.ScheduleDefaultLabels=ir,W.ScheduleGridEditor=xa,W.SchedulePlace=An,W.ScheduleSession=vn,W.ScheduleSlot=vt,W.ScheduleTimeline=Ea,W.installSprof=rw,W.pfName=aw,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});