sprof 0.3.3 → 0.4.1

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.
Files changed (29) hide show
  1. package/README.md +16 -13
  2. package/dist/auto-import.d.ts +70 -0
  3. package/dist/auto-import.js +20 -0
  4. package/dist/auto-import.test.d.ts +1 -0
  5. package/dist/core/components/atoms/PDialog/PDialog.stories.d.ts +72 -24
  6. package/dist/core/components/atoms/PDialog/PDialog.vue.d.ts +17 -7
  7. package/dist/core/components/atoms/PInput/PInput.stories.d.ts +30 -0
  8. package/dist/core/components/atoms/PInput/PInput.vue.d.ts +12 -0
  9. package/dist/core/components/atoms/PInputNumber/PInputNumber.stories.d.ts +1 -1
  10. package/dist/core/components/atoms/PInputNumber/PInputNumber.vue.d.ts +1 -1
  11. package/dist/core/components/atoms/PSelect/PSelect.stories.d.ts +54 -8
  12. package/dist/core/components/atoms/PSelect/PSelect.vue.d.ts +20 -3
  13. package/dist/core/components/organisms/PAuthForm/PAuthForm.stories.d.ts +22 -2
  14. package/dist/core/components/organisms/PAuthForm/PAuthForm.vue.d.ts +11 -1
  15. package/dist/core/composables/index.d.ts +16 -0
  16. package/dist/core/composables/useCrud.d.ts +47 -0
  17. package/dist/core/composables/useCrud.test.d.ts +1 -0
  18. package/dist/core/composables/useFilters.d.ts +33 -0
  19. package/dist/core/composables/useFilters.test.d.ts +1 -0
  20. package/dist/core/composables/usePagination.d.ts +45 -0
  21. package/dist/core/composables/usePagination.test.d.ts +1 -0
  22. package/dist/index.d.ts +4 -0
  23. package/dist/modules/schedule/components/ScheduleGridEditor.vue.d.ts +16 -0
  24. package/dist/modules/table/cells/PTableNumber.vue.d.ts +3 -3
  25. package/dist/modules/table/cells/PTableString.vue.d.ts +1 -1
  26. package/dist/sprof.js +4894 -4757
  27. package/dist/sprof.umd.cjs +14 -14
  28. package/dist/style.css +1 -1
  29. package/package.json +9 -3
@@ -1,4 +1,4 @@
1
- (function(L,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("quasar"),require("vue"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","quasar","vue","vuedraggable","vue-router"],x):(L=typeof globalThis<"u"?globalThis:L||self,x(L.sprof={},L.Quasar,L.Vue,L.draggable,L.VueRouter))})(this,function(L,x,e,wi,Yl){"use strict";var Cw=Object.defineProperty;var Sw=(L,x,e)=>x in L?Cw(L,x,{enumerable:!0,configurable:!0,writable:!0,value:e}):L[x]=e;var d=(L,x,e)=>Sw(L,typeof x!="symbol"?x+"":x,e);var Ht,Ut,it,jn,re,at,Zt;var xn=typeof document<"u"?document.currentScript:null,Le=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Le||{}),he=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(he||{});class nn{constructor(t,o,i,r){d(this,"text","Сохранить");d(this,"type",he.Success);d(this,"condition",!0);d(this,"action");d(this,"id","button");d(this,"disabled",!1);this.text=t,this.type=i,this.action=o,r!==void 0&&(this.condition=r)}static Primary(t,o,i){return new nn(t,o,he.Primary,i)}static Success(t,o,i){return new nn(t,o,he.Success,i)}static Warning(t,o,i){return new nn(t,o,he.Warning,i)}static Error(t,o,i){return new nn(t,o,he.Error,i)}}class ko extends nn{constructor(){super();d(this,"id","auth-button");d(this,"chunk",Le.Login);d(this,"text","");d(this,"isSubmit",!1);d(this,"isLink",!0)}GetChunk(){return this.chunk}}let bi=class extends ko{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"chunk",Le.Login)}};class Yr extends ko{constructor(){super(...arguments);d(this,"id","auth-button-refresh");d(this,"text","Обновить пароль");d(this,"isSubmit",!1);d(this,"chunk",Le.Refresh)}}class Ci extends ko{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"chunk",Le.Register)}}class xo extends ko{constructor(){super(...arguments);d(this,"id","auth-button-restore");d(this,"text","Забыли пароль?");d(this,"isSubmit",!1);d(this,"chunk",Le.Restore)}}class Xr{constructor(){d(this,"value","");d(this,"label","");d(this,"placeholder","");d(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var zt=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(zt||{});class Eo extends Xr{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}get IsPassword(){return this.id===zt.Password||this.id===zt.PasswordRepeat}}var En=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(En||{});const Xl=/\S+@\S+\.\S+/;class Zr{constructor(){d(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),Xl.test(t)||this.errors.push("Некорректный email"),this.errors}}let Zl=class extends Eo{constructor(){super(...arguments);d(this,"id",zt.Email);d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new Zr);d(this,"method",En.Email)}};const Bo=new Zl;class Jl{constructor(){d(this,"errors",[]);d(this,"length",3)}validate(t){return t===""||!t?(this.errors.push("Введите пароль"),this.errors):(t.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let Kl=class extends Eo{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new Jl);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id",zt.Password)}};const No=new Kl;let ec=class extends Eo{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id",zt.PasswordRepeat)}};const Jr=new ec,Kr={allowRestore:!1,[Le.Login]:{methods:[En.Email],title:"Вход в систему",action:"login",buttons:[new bi,new Ci,new xo],fields:[Bo,No],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Le.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Ci,new bi,new xo],fields:[Bo,No,Jr],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Le.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new xo],fields:[Bo]},[Le.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Yr],fields:[No]}};class tc{constructor(){d(this,"block",!1);d(this,"settings",Kr);d(this,"chunk",Le.Login);d(this,"selectedMethod",En.Email)}async Block(t){this.block=!0,await t(),this.block=!1}get IsBlock(){return this.block}GetValues(){const t=this.GetFields(),o=new Map;return t.forEach(i=>{i.value&&o.set(i.name,i.value)}),Object.fromEntries(o)}Validate(){if(this.IsRegister){const t=this.GetField(zt.Password),o=this.GetField(zt.PasswordRepeat);if((t==null?void 0:t.value)!==(o==null?void 0:o.value))return["Пароли не совпадают"]}return this.GetFields().map(t=>t.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(t=>!t.method||t.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===Le.Login}get IsRegister(){return this.chunk===Le.Register}get IsRestore(){return this.chunk===Le.Restore}get IsRefresh(){return this.chunk===Le.Refresh}SetChunk(t){this.chunk=t}GetTitle(){return this.GetCurSet().title}GetButtons(){const t=this.GetCurSet().buttons;return t.forEach(o=>{o.isSubmit=!1}),t[0].isSubmit=!0,t}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(t=>t.Reset())}Reset(){this.SetChunk(Le.Login),this.ResetFields()}GetField(t){return this.GetFields().find(o=>o.id===t)}}class nc{constructor(){d(this,"visible",!1);d(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(t){t&&(this.closable=!0),this.visible=!0}}class Bn{constructor(){d(this,"type",he.Success);d(this,"text","");d(this,"title","")}static ToQuasarColor(t){switch(t){case he.Success:return"positive";case he.Warning:return"warning";case he.Error:return"negative";case he.Info:return"info";default:return"primary"}}static ContainsHtml(t){return/<[a-z][\s\S]*>/i.test(t)}showMessage(t,o){this.type=o,typeof t=="string"?(this.text=t,this.title=""):(this.text=t.text,this.title=t.title??"")}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}GetQuasarColor(){return Bn.ToQuasarColor(this.type)}Info(t){this.showMessage(t,he.Info)}Success(t){this.showMessage(t,he.Success)}Error(t){this.showMessage(t,he.Error)}Warning(t){this.showMessage(t,he.Warning)}FormMessage(t){let o="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const i of Object.keys(t))t[i][0]&&t[i][0].message&&(o+=`<li>${t[i][0].message}</li>`);return o+="</ul>",o}}class Si{static Get(t,o,i="-"){return!t||!o?"":`${t}${i}${o}`}static In(t,o,i){return t>=o&&t<=i}static Intersects(t,o,i,r){return t===i||o===r||t>i&&t<r||o>i&&o<r||o>r&&t<i}}const es=1e3,ts=60*es,ki=60*ts;var Qn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Qn||{});const Vo={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(t){return es*t}static M(t){return ts*t}static H(t){return ki*t}static D(t){return ki*t}static W(t){return ki*t}static NormalizeTime(t){return String(t).padStart(2,"0")}static HMtoM(t){const o=ie.SplitHM(t);return o.length>1?ie.HtoM(o[0])+o[1]:ie.HtoM(o[0])}static HtoM(t){return Number(t)*60}static SplitHM(t){if(!t)return[];const o=t.split(":");return[Number(o[0]),Number(o[1])]}static HmsToHm(t){const o=ie.SplitHM(t);return ie.ConcatHM(o[0],o[1])}static AddMtoHM(t,o){const i=new Date,r=ie.SplitHM(t);i.setHours(r[0],r[1],0,0);const s=new Date(i.getTime()+o*6e4),a=s.getHours(),c=s.getMinutes();return ie.ConcatHM(a,c)}static ConcatHM(t,o){return`${t}:${ie.NormalizeTime(o)}`}static DiffM(t,o){return ie.Gt(o,t)?ie.HMtoM(o)-ie.HMtoM(t):ie.HMtoM(t)-ie.HMtoM(o)}static GetPeriod(t,o){return Si.Get(t,o)}static Gt(t,o){return ie.HMtoM(t)>ie.HMtoM(o)}static GtOrEq(t,o){return ie.Gt(t,o)||ie.Eq(t,o)}static Eq(t,o){return ie.HMtoM(t)===ie.HMtoM(o)}static PeriodInPeriod(t,o,i,r){return ie.HMtoM(t)>=ie.HMtoM(i)&&ie.HMtoM(o)<=ie.HMtoM(r)}static PeriodsIntersects(t,o,i,r){return Si.Intersects(ie.HMtoM(t),ie.HMtoM(o),ie.HMtoM(i),ie.HMtoM(r))}}const oc="top";class ic extends Bn{constructor(){super(...arguments);d(this,"duration",ie.S(3))}showMessage(o,i){if(super.showMessage(o,i),typeof x.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 o=="string"?{}:o;x.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:Bn.ContainsHtml(this.text),position:oc})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",he.Warning)}Save(){this.showMessage("Изменения успешно сохранены",he.Success)}}const Nn=new ic;class xt{static Get(t){const o=localStorage.getItem(t);if(o)return JSON.parse(o)}static Set(t,o){o&&localStorage.setItem(t,JSON.stringify(o))}static Remove(t){localStorage.removeItem(t)}}var ut=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(ut||{});class rc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return xt.Get(ut.AccessToken)}getRefreshToken(){return xt.Get(ut.RefreshToken)}setAccessToken(t){xt.Set(ut.AccessToken,t)}setRefreshToken(t){xt.Set(ut.RefreshToken,t)}reset(){xt.Remove(ut.AccessToken),xt.Remove(ut.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class sc{constructor(){d(this,"user");d(this,"userConstructor")}AssignTo(t){t.user=this.get()}setUserConstructor(t){this.userConstructor=t}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(t){this.userConstructor&&(this.user=new this.userConstructor(t),xt.Set(ut.User,this.user))}reset(){this.user=void 0,xt.Remove(ut.User)}actualize(){const t=xt.Get(ut.User);t&&this.set(t)}}class ac{constructor(){d(this,"isAuth",!1);d(this,"user",new sc);d(this,"tokens",new rc);d(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(t){this.user.setUserConstructor(t)}SetUser(t){this.user.set(t)}SetState(t){this.SetUser(t.user),this.tokens.set(t.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){Nn.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 lc=(Ht=class{constructor(){d(this,"form",e.reactive(new tc));d(this,"status",e.reactive(new ac));d(this,"modal",e.reactive(new nc));if(Ht.instance)return Ht.instance;Ht.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},d(Ht,"instance"),Ht);const _e=new lc;var ns=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
1
+ (function(O,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("quasar"),require("vue"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","quasar","vue","vuedraggable","vue-router"],x):(O=typeof globalThis<"u"?globalThis:O||self,x(O.sprof={},O.Quasar,O.Vue,O.draggable,O.VueRouter))})(this,function(O,x,e,wi,Xl){"use strict";var Bw=Object.defineProperty;var Vw=(O,x,e)=>x in O?Bw(O,x,{enumerable:!0,configurable:!0,writable:!0,value:e}):O[x]=e;var d=(O,x,e)=>Vw(O,typeof x!="symbol"?x+"":x,e);var _t,Ht,ot,Wn,re,at,Xt;var En=typeof document<"u"?document.currentScript:null,Fe=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Fe||{}),pe=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(pe||{});class on{constructor(t,o,i,r){d(this,"text","Сохранить");d(this,"type",pe.Success);d(this,"condition",!0);d(this,"action");d(this,"id","button");d(this,"disabled",!1);this.text=t,this.type=i,this.action=o,r!==void 0&&(this.condition=r)}static Primary(t,o,i){return new on(t,o,pe.Primary,i)}static Success(t,o,i){return new on(t,o,pe.Success,i)}static Warning(t,o,i){return new on(t,o,pe.Warning,i)}static Error(t,o,i){return new on(t,o,pe.Error,i)}}class Eo extends on{constructor(){super();d(this,"id","auth-button");d(this,"chunk",Fe.Login);d(this,"text","");d(this,"isSubmit",!1);d(this,"isLink",!0)}GetChunk(){return this.chunk}}let bi=class extends Eo{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"chunk",Fe.Login)}};class Xr extends Eo{constructor(){super(...arguments);d(this,"id","auth-button-refresh");d(this,"text","Обновить пароль");d(this,"isSubmit",!1);d(this,"chunk",Fe.Refresh)}}class Ci extends Eo{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"chunk",Fe.Register)}}class Bo extends Eo{constructor(){super(...arguments);d(this,"id","auth-button-restore");d(this,"text","Забыли пароль?");d(this,"isSubmit",!1);d(this,"chunk",Fe.Restore)}}class Zr{constructor(){d(this,"value","");d(this,"label","");d(this,"placeholder","");d(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var zt=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(zt||{});class Vo extends Zr{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}get IsPassword(){return this.id===zt.Password||this.id===zt.PasswordRepeat}}var Bn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(Bn||{});const Zl=/\S+@\S+\.\S+/;class Jr{constructor(){d(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),Zl.test(t)||this.errors.push("Некорректный email"),this.errors}}let Jl=class extends Vo{constructor(){super(...arguments);d(this,"id",zt.Email);d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new Jr);d(this,"method",Bn.Email)}};const No=new Jl;class Kl{constructor(){d(this,"errors",[]);d(this,"length",3)}validate(t){return t===""||!t?(this.errors.push("Введите пароль"),this.errors):(t.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let ec=class extends Vo{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new Kl);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id",zt.Password)}};const $o=new ec;let tc=class extends Vo{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id",zt.PasswordRepeat)}};const Kr=new tc,es={allowRestore:!1,[Fe.Login]:{methods:[Bn.Email],title:"Вход в систему",action:"login",buttons:[new bi,new Ci,new Bo],fields:[No,$o],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Fe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Ci,new bi,new Bo],fields:[No,$o,Kr],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Fe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Bo],fields:[No]},[Fe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Xr],fields:[$o]}};class nc{constructor(){d(this,"block",!1);d(this,"settings",es);d(this,"chunk",Fe.Login);d(this,"selectedMethod",Bn.Email)}async Block(t){this.block=!0,await t(),this.block=!1}get IsBlock(){return this.block}GetValues(){const t=this.GetFields(),o=new Map;return t.forEach(i=>{i.value&&o.set(i.name,i.value)}),Object.fromEntries(o)}Validate(){if(this.IsRegister){const t=this.GetField(zt.Password),o=this.GetField(zt.PasswordRepeat);if((t==null?void 0:t.value)!==(o==null?void 0:o.value))return["Пароли не совпадают"]}return this.GetFields().map(t=>t.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(t=>!t.method||t.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===Fe.Login}get IsRegister(){return this.chunk===Fe.Register}get IsRestore(){return this.chunk===Fe.Restore}get IsRefresh(){return this.chunk===Fe.Refresh}SetChunk(t){this.chunk=t}GetTitle(){return this.GetCurSet().title}GetButtons(){const t=this.GetCurSet().buttons;return t.forEach(o=>{o.isSubmit=!1}),t[0].isSubmit=!0,t}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(t=>t.Reset())}Reset(){this.SetChunk(Fe.Login),this.ResetFields()}GetField(t){return this.GetFields().find(o=>o.id===t)}}class oc{constructor(){d(this,"visible",!1);d(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(t){t&&(this.closable=!0),this.visible=!0}}class Vn{constructor(){d(this,"type",pe.Success);d(this,"text","");d(this,"title","")}static ToQuasarColor(t){switch(t){case pe.Success:return"positive";case pe.Warning:return"warning";case pe.Error:return"negative";case pe.Info:return"info";default:return"primary"}}static ContainsHtml(t){return/<[a-z][\s\S]*>/i.test(t)}showMessage(t,o){this.type=o,typeof t=="string"?(this.text=t,this.title=""):(this.text=t.text,this.title=t.title??"")}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}GetQuasarColor(){return Vn.ToQuasarColor(this.type)}Info(t){this.showMessage(t,pe.Info)}Success(t){this.showMessage(t,pe.Success)}Error(t){this.showMessage(t,pe.Error)}Warning(t){this.showMessage(t,pe.Warning)}FormMessage(t){let o="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const i of Object.keys(t))t[i][0]&&t[i][0].message&&(o+=`<li>${t[i][0].message}</li>`);return o+="</ul>",o}}class Si{static Get(t,o,i="-"){return!t||!o?"":`${t}${i}${o}`}static In(t,o,i){return t>=o&&t<=i}static Intersects(t,o,i,r){return t===i||o===r||t>i&&t<r||o>i&&o<r||o>r&&t<i}}const ts=1e3,ns=60*ts,ki=60*ns;var Xn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Xn||{});const To={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(t){return ts*t}static M(t){return ns*t}static H(t){return ki*t}static D(t){return ki*t}static W(t){return ki*t}static NormalizeTime(t){return String(t).padStart(2,"0")}static HMtoM(t){const o=ie.SplitHM(t);return o.length>1?ie.HtoM(o[0])+o[1]:ie.HtoM(o[0])}static HtoM(t){return Number(t)*60}static SplitHM(t){if(!t)return[];const o=t.split(":");return[Number(o[0]),Number(o[1])]}static HmsToHm(t){const o=ie.SplitHM(t);return ie.ConcatHM(o[0],o[1])}static AddMtoHM(t,o){const i=new Date,r=ie.SplitHM(t);i.setHours(r[0],r[1],0,0);const s=new Date(i.getTime()+o*6e4),a=s.getHours(),c=s.getMinutes();return ie.ConcatHM(a,c)}static ConcatHM(t,o){return`${t}:${ie.NormalizeTime(o)}`}static DiffM(t,o){return ie.Gt(o,t)?ie.HMtoM(o)-ie.HMtoM(t):ie.HMtoM(t)-ie.HMtoM(o)}static GetPeriod(t,o){return Si.Get(t,o)}static Gt(t,o){return ie.HMtoM(t)>ie.HMtoM(o)}static GtOrEq(t,o){return ie.Gt(t,o)||ie.Eq(t,o)}static Eq(t,o){return ie.HMtoM(t)===ie.HMtoM(o)}static PeriodInPeriod(t,o,i,r){return ie.HMtoM(t)>=ie.HMtoM(i)&&ie.HMtoM(o)<=ie.HMtoM(r)}static PeriodsIntersects(t,o,i,r){return Si.Intersects(ie.HMtoM(t),ie.HMtoM(o),ie.HMtoM(i),ie.HMtoM(r))}}const ic="top";class rc extends Vn{constructor(){super(...arguments);d(this,"duration",ie.S(3))}showMessage(o,i){if(super.showMessage(o,i),typeof x.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 o=="string"?{}:o;x.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:Vn.ContainsHtml(this.text),position:ic})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",pe.Warning)}Save(){this.showMessage("Изменения успешно сохранены",pe.Success)}}const Nn=new rc;class kt{static Get(t){const o=localStorage.getItem(t);if(o)return JSON.parse(o)}static Set(t,o){o&&localStorage.setItem(t,JSON.stringify(o))}static Remove(t){localStorage.removeItem(t)}}var ct=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(ct||{});class sc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return kt.Get(ct.AccessToken)}getRefreshToken(){return kt.Get(ct.RefreshToken)}setAccessToken(t){kt.Set(ct.AccessToken,t)}setRefreshToken(t){kt.Set(ct.RefreshToken,t)}reset(){kt.Remove(ct.AccessToken),kt.Remove(ct.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class ac{constructor(){d(this,"user");d(this,"userConstructor")}AssignTo(t){t.user=this.get()}setUserConstructor(t){this.userConstructor=t}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(t){this.userConstructor&&(this.user=new this.userConstructor(t),kt.Set(ct.User,this.user))}reset(){this.user=void 0,kt.Remove(ct.User)}actualize(){const t=kt.Get(ct.User);t&&this.set(t)}}class lc{constructor(){d(this,"isAuth",!1);d(this,"user",new ac);d(this,"tokens",new sc);d(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(t){this.user.setUserConstructor(t)}SetUser(t){this.user.set(t)}SetState(t){this.SetUser(t.user),this.tokens.set(t.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){Nn.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 cc=(_t=class{constructor(){d(this,"form",e.reactive(new nc));d(this,"status",e.reactive(new lc));d(this,"modal",e.reactive(new oc));if(_t.instance)return _t.instance;_t.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},d(_t,"instance"),_t);const Oe=new cc;var os=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 os;(function(n){(function(t){var o=typeof globalThis=="object"?globalThis:typeof ns=="object"?ns:typeof self=="object"?self:typeof this=="object"?this:c(),i=r(n);typeof o.Reflect<"u"&&(i=r(o.Reflect,i)),t(i,o),typeof o.Reflect>"u"&&(o.Reflect=n);function r(l,u){return function(f,h){Object.defineProperty(l,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 c(){return s()||a()}})(function(t,o){var i=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",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,f={create:c?function(){return bo(Object.create(null))}:l?function(){return bo({__proto__:null})}:function(){return bo({})},has:u?function(B,V){return i.call(B,V)}:function(B,V){return V in B},get:u?function(B,V){return i.call(B,V)?B[V]:void 0}:function(B,V){return B[V]}},h=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Hr(),k=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Wn(),C=typeof WeakMap=="function"?WeakMap:Ur(),N=r?Symbol.for("@reflect-metadata:registry"):void 0,E=fi(),y=mi(E);function M(B,V,I,O){if(Q(I)){if(!Kt(B))throw new TypeError;if(!Rt(V))throw new TypeError;return Me(B,V)}else{if(!Kt(B))throw new TypeError;if(!ye(V))throw new TypeError;if(!ye(O)&&!Q(O)&&!Ze(O))throw new TypeError;return Ze(O)&&(O=void 0),I=rt(I),ge(B,V,I,O)}}t("decorate",M);function b(B,V){function I(O,Y){if(!ye(O))throw new TypeError;if(!Q(Y)&&!Cn(Y))throw new TypeError;bn(B,V,O,Y)}return I}t("metadata",b);function $(B,V,I,O){if(!ye(I))throw new TypeError;return Q(O)||(O=rt(O)),bn(B,V,I,O)}t("defineMetadata",$);function P(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),Be(B,V,I)}t("hasMetadata",P);function A(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),Pt(B,V,I)}t("hasOwnMetadata",A);function G(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),It(B,V,I)}t("getMetadata",G);function de(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),Jt(B,V,I)}t("getOwnMetadata",de);function $e(B,V){if(!ye(B))throw new TypeError;return Q(V)||(V=rt(V)),lt(B,V)}t("getMetadataKeys",$e);function Ee(B,V){if(!ye(B))throw new TypeError;return Q(V)||(V=rt(V)),je(B,V)}t("getOwnMetadataKeys",Ee);function De(B,V,I){if(!ye(V))throw new TypeError;if(Q(I)||(I=rt(I)),!ye(V))throw new TypeError;Q(I)||(I=rt(I));var O=kn(V,I,!1);return Q(O)?!1:O.OrdinaryDeleteMetadata(B,V,I)}t("deleteMetadata",De);function Me(B,V){for(var I=B.length-1;I>=0;--I){var O=B[I],Y=O(V);if(!Q(Y)&&!Ze(Y)){if(!Rt(Y))throw new TypeError;V=Y}}return V}function ge(B,V,I,O){for(var Y=B.length-1;Y>=0;--Y){var Pe=B[Y],Ne=Pe(V,I,O);if(!Q(Ne)&&!Ze(Ne)){if(!ye(Ne))throw new TypeError;O=Ne}}return O}function Be(B,V,I){var O=Pt(B,V,I);if(O)return!0;var Y=Sn(V);return Ze(Y)?!1:Be(B,Y,I)}function Pt(B,V,I){var O=kn(V,I,!1);return Q(O)?!1:vt(O.OrdinaryHasOwnMetadata(B,V,I))}function It(B,V,I){var O=Pt(B,V,I);if(O)return Jt(B,V,I);var Y=Sn(V);if(!Ze(Y))return It(B,Y,I)}function Jt(B,V,I){var O=kn(V,I,!1);if(!Q(O))return O.OrdinaryGetOwnMetadata(B,V,I)}function bn(B,V,I,O){var Y=kn(I,O,!0);Y.OrdinaryDefineOwnMetadata(B,V,I,O)}function lt(B,V){var I=je(B,V),O=Sn(B);if(O===null)return I;var Y=lt(O,V);if(Y.length<=0)return I;if(I.length<=0)return Y;for(var Pe=new k,Ne=[],te=0,H=I;te<H.length;te++){var U=H[te],v=Pe.has(U);v||(Pe.add(U),Ne.push(U))}for(var q=0,ne=Y;q<ne.length;q++){var U=ne[q],v=Pe.has(U);v||(Pe.add(U),Ne.push(U))}return Ne}function je(B,V){var I=kn(B,V,!1);return I?I.OrdinaryOwnMetadataKeys(B,V):[]}function be(B){if(B===null)return 1;switch(typeof B){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return B===null?1:6;default:return 6}}function Q(B){return B===void 0}function Ze(B){return B===null}function St(B){return typeof B=="symbol"}function ye(B){return typeof B=="object"?B!==null:typeof B=="function"}function se(B,V){switch(be(B)){case 0:return B;case 1:return B;case 2:return B;case 3:return B;case 4:return B;case 5:return B}var I="string",O=ee(B,s);if(O!==void 0){var Y=O.call(B,I);if(ye(Y))throw new TypeError;return Y}return We(B)}function We(B,V){var I,O;{var Y=B.toString;if(Fe(Y)){var O=Y.call(B);if(!ye(O))return O}var I=B.valueOf;if(Fe(I)){var O=I.call(B);if(!ye(O))return O}}throw new TypeError}function vt(B){return!!B}function ct(B){return""+B}function rt(B){var V=se(B);return St(V)?V:ct(V)}function Kt(B){return Array.isArray?Array.isArray(B):B instanceof Object?B instanceof Array:Object.prototype.toString.call(B)==="[object Array]"}function Fe(B){return typeof B=="function"}function Rt(B){return typeof B=="function"}function Cn(B){switch(be(B)){case 3:return!0;case 4:return!0;default:return!1}}function ue(B,V){return B===V||B!==B&&V!==V}function ee(B,V){var I=B[V];if(I!=null){if(!Fe(I))throw new TypeError;return I}}function Oe(B){var V=ee(B,a);if(!Fe(V))throw new TypeError;var I=V.call(B);if(!ye(I))throw new TypeError;return I}function st(B){return B.value}function gt(B){var V=B.next();return V.done?!1:V}function en(B){var V=B.return;V&&V.call(B)}function Sn(B){var V=Object.getPrototypeOf(B);if(typeof B!="function"||B===h||V!==h)return V;var I=B.prototype,O=I&&Object.getPrototypeOf(I);if(O==null||O===Object.prototype)return V;var Y=O.constructor;return typeof Y!="function"||Y===B?V:Y}function dt(){var B;!Q(N)&&typeof o.Reflect<"u"&&!(N in o.Reflect)&&typeof o.Reflect.defineMetadata=="function"&&(B=_r(o.Reflect));var V,I,O,Y=new C,Pe={registerProvider:Ne,getProvider:H,setProvider:v};return Pe;function Ne(q){if(!Object.isExtensible(Pe))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case B===q:break;case Q(V):V=q;break;case V===q:break;case Q(I):I=q;break;case I===q:break;default:O===void 0&&(O=new k),O.add(q);break}}function te(q,ne){if(!Q(V)){if(V.isProviderFor(q,ne))return V;if(!Q(I)){if(I.isProviderFor(q,ne))return V;if(!Q(O))for(var me=Oe(O);;){var we=gt(me);if(!we)return;var Je=st(we);if(Je.isProviderFor(q,ne))return en(me),Je}}}if(!Q(B)&&B.isProviderFor(q,ne))return B}function H(q,ne){var me=Y.get(q),we;return Q(me)||(we=me.get(ne)),Q(we)&&(we=te(q,ne),Q(we)||(Q(me)&&(me=new p,Y.set(q,me)),me.set(ne,we))),we}function U(q){if(Q(q))throw new TypeError;return V===q||I===q||!Q(O)&&O.has(q)}function v(q,ne,me){if(!U(me))throw new Error("Metadata provider not registered.");var we=H(q,ne);if(we!==me){if(!Q(we))return!1;var Je=Y.get(q);Q(Je)&&(Je=new p,Y.set(q,Je)),Je.set(ne,me)}return!0}}function fi(){var B;return!Q(N)&&ye(o.Reflect)&&Object.isExtensible(o.Reflect)&&(B=o.Reflect[N]),Q(B)&&(B=dt()),!Q(N)&&ye(o.Reflect)&&Object.isExtensible(o.Reflect)&&Object.defineProperty(o.Reflect,N,{enumerable:!1,configurable:!1,writable:!1,value:B}),B}function mi(B){var V=new C,I={isProviderFor:function(U,v){var q=V.get(U);return Q(q)?!1:q.has(v)},OrdinaryDefineOwnMetadata:Ne,OrdinaryHasOwnMetadata:Y,OrdinaryGetOwnMetadata:Pe,OrdinaryOwnMetadataKeys:te,OrdinaryDeleteMetadata:H};return E.registerProvider(I),I;function O(U,v,q){var ne=V.get(U),me=!1;if(Q(ne)){if(!q)return;ne=new p,V.set(U,ne),me=!0}var we=ne.get(v);if(Q(we)){if(!q)return;if(we=new p,ne.set(v,we),!B.setProvider(U,v,I))throw ne.delete(v),me&&V.delete(U),new Error("Wrong provider for target.")}return we}function Y(U,v,q){var ne=O(v,q,!1);return Q(ne)?!1:vt(ne.has(U))}function Pe(U,v,q){var ne=O(v,q,!1);if(!Q(ne))return ne.get(U)}function Ne(U,v,q,ne){var me=O(q,ne,!0);me.set(U,v)}function te(U,v){var q=[],ne=O(U,v,!1);if(Q(ne))return q;for(var me=ne.keys(),we=Oe(me),Je=0;;){var hi=gt(we);if(!hi)return q.length=Je,q;var vr=st(hi);try{q[Je]=vr}catch(yt){try{en(we)}finally{throw yt}}Je++}}function H(U,v,q){var ne=O(v,q,!1);if(Q(ne)||!ne.delete(U))return!1;if(ne.size===0){var me=V.get(v);Q(me)||(me.delete(q),me.size===0&&V.delete(me))}return!0}}function _r(B){var V=B.defineMetadata,I=B.hasOwnMetadata,O=B.getOwnMetadata,Y=B.getOwnMetadataKeys,Pe=B.deleteMetadata,Ne=new C,te={isProviderFor:function(H,U){var v=Ne.get(H);return!Q(v)&&v.has(U)?!0:Y(H,U).length?(Q(v)&&(v=new k,Ne.set(H,v)),v.add(U),!0):!1},OrdinaryDefineOwnMetadata:V,OrdinaryHasOwnMetadata:I,OrdinaryGetOwnMetadata:O,OrdinaryOwnMetadataKeys:Y,OrdinaryDeleteMetadata:Pe};return te}function kn(B,V,I){var O=E.getProvider(B,V);if(!Q(O))return O;if(I){if(E.setProvider(B,V,y))return y;throw new Error("Illegal state.")}}function Hr(){var B={},V=[],I=function(){function te(H,U,v){this._index=0,this._keys=H,this._values=U,this._selector=v}return te.prototype["@@iterator"]=function(){return this},te.prototype[a]=function(){return this},te.prototype.next=function(){var H=this._index;if(H>=0&&H<this._keys.length){var U=this._selector(this._keys[H],this._values[H]);return H+1>=this._keys.length?(this._index=-1,this._keys=V,this._values=V):this._index++,{value:U,done:!1}}return{value:void 0,done:!0}},te.prototype.throw=function(H){throw this._index>=0&&(this._index=-1,this._keys=V,this._values=V),H},te.prototype.return=function(H){return this._index>=0&&(this._index=-1,this._keys=V,this._values=V),{value:H,done:!0}},te}(),O=function(){function te(){this._keys=[],this._values=[],this._cacheKey=B,this._cacheIndex=-2}return Object.defineProperty(te.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),te.prototype.has=function(H){return this._find(H,!1)>=0},te.prototype.get=function(H){var U=this._find(H,!1);return U>=0?this._values[U]:void 0},te.prototype.set=function(H,U){var v=this._find(H,!0);return this._values[v]=U,this},te.prototype.delete=function(H){var U=this._find(H,!1);if(U>=0){for(var v=this._keys.length,q=U+1;q<v;q++)this._keys[q-1]=this._keys[q],this._values[q-1]=this._values[q];return this._keys.length--,this._values.length--,ue(H,this._cacheKey)&&(this._cacheKey=B,this._cacheIndex=-2),!0}return!1},te.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=B,this._cacheIndex=-2},te.prototype.keys=function(){return new I(this._keys,this._values,Y)},te.prototype.values=function(){return new I(this._keys,this._values,Pe)},te.prototype.entries=function(){return new I(this._keys,this._values,Ne)},te.prototype["@@iterator"]=function(){return this.entries()},te.prototype[a]=function(){return this.entries()},te.prototype._find=function(H,U){if(!ue(this._cacheKey,H)){this._cacheIndex=-1;for(var v=0;v<this._keys.length;v++)if(ue(this._keys[v],H)){this._cacheIndex=v;break}}return this._cacheIndex<0&&U&&(this._cacheIndex=this._keys.length,this._keys.push(H),this._values.push(void 0)),this._cacheIndex},te}();return O;function Y(te,H){return te}function Pe(te,H){return H}function Ne(te,H){return[te,H]}}function Wn(){var B=function(){function V(){this._map=new p}return Object.defineProperty(V.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),V.prototype.has=function(I){return this._map.has(I)},V.prototype.add=function(I){return this._map.set(I,I),this},V.prototype.delete=function(I){return this._map.delete(I)},V.prototype.clear=function(){this._map.clear()},V.prototype.keys=function(){return this._map.keys()},V.prototype.values=function(){return this._map.keys()},V.prototype.entries=function(){return this._map.entries()},V.prototype["@@iterator"]=function(){return this.keys()},V.prototype[a]=function(){return this.keys()},V}();return B}function Ur(){var B=16,V=f.create(),I=O();return function(){function H(){this._key=O()}return H.prototype.has=function(U){var v=Y(U,!1);return v!==void 0?f.has(v,this._key):!1},H.prototype.get=function(U){var v=Y(U,!1);return v!==void 0?f.get(v,this._key):void 0},H.prototype.set=function(U,v){var q=Y(U,!0);return q[this._key]=v,this},H.prototype.delete=function(U){var v=Y(U,!1);return v!==void 0?delete v[this._key]:!1},H.prototype.clear=function(){this._key=O()},H}();function O(){var H;do H="@@WeakMap@@"+te();while(f.has(V,H));return V[H]=!0,H}function Y(H,U){if(!i.call(H,I)){if(!U)return;Object.defineProperty(H,I,{value:f.create()})}return H[I]}function Pe(H,U){for(var v=0;v<U;++v)H[v]=Math.random()*255|0;return H}function Ne(H){if(typeof Uint8Array=="function"){var U=new Uint8Array(H);return typeof crypto<"u"?crypto.getRandomValues(U):typeof msCrypto<"u"?msCrypto.getRandomValues(U):Pe(U,H),U}return Pe(new Array(H),H)}function te(){var H=Ne(B);H[6]=H[6]&79|64,H[8]=H[8]&191|128;for(var U="",v=0;v<B;++v){var q=H[v];(v===4||v===6||v===8)&&(U+="-"),q<16&&(U+="0"),U+=q.toString(16).toLowerCase()}return U}}function bo(B){return B.__=void 0,delete B.__,B}})})(os||(os={}));const He=[];for(let n=0;n<256;++n)He.push((n+256).toString(16).slice(1));function cc(n,t=0){return(He[n[t+0]]+He[n[t+1]]+He[n[t+2]]+He[n[t+3]]+"-"+He[n[t+4]]+He[n[t+5]]+"-"+He[n[t+6]]+He[n[t+7]]+"-"+He[n[t+8]]+He[n[t+9]]+"-"+He[n[t+10]]+He[n[t+11]]+He[n[t+12]]+He[n[t+13]]+He[n[t+14]]+He[n[t+15]]).toLowerCase()}const dc=new Uint8Array(16);function uc(){return crypto.getRandomValues(dc)}function jt(n,t,o){return crypto.randomUUID?crypto.randomUUID():fc(n)}function fc(n,t,o){var r;n=n||{};const i=n.random??((r=n.rng)==null?void 0:r.call(n))??uc();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,cc(i)}class Ke{static UUID(){return jt()}static GUID(){const t=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}function mc(n){var t=[];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 o=n.shift();n[0]=o+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i<n.length;i++){var r=n[i];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(i>0&&(r=r.replace(/^[\/]+/,"")),i<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),t.push(r))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function xi(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),mc(n)}class Ce{static Capitalize(t){return t?t[0].toUpperCase()+t.slice(1):""}static BuildSafeUrl(t,o,i){try{const r=new URL(t);return o&&(r.port=o.toString()),xi(r.toString(),i)}catch{throw new Error(`Invalid host URL: ${t}`)}}static ToCamelCase(t){const o=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return t.match(o).map((r,s)=>s===0?r.toLowerCase():Ce.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(t,o,i){return t.substring(t.indexOf(o)+2,t.lastIndexOf(i))}static Translit(t,o){const i={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 o&&/[а-яА-Я]/g.test(t)?t.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(i).find(c=>i[c]===r);return a||""}const s=Object.keys(i).find(a=>i[a]===r.toLowerCase());return s?s.toUpperCase():""}):t.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?i[r]:i[r.toLowerCase()].toUpperCase())}static RemoveEmoji(t){const o=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return t.replace(o,"")}static CanBeTranslited(t){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(t)}static StringsEquals(t,o){const i=t.toLowerCase().replaceAll(/\s/g,""),r=o.toLowerCase().replaceAll(/\s/g,""),s=Ce.Translit(i),a=Ce.Translit(r);return i.includes(r)||s.includes(r)||i.includes(a)}static SearchIn(t,o){return Ce.StringsEquals(t,o)}static SearchInFields(t,o){let i=!1;for(let r=0;r<o.length;r++)if(Ce.SearchIn(o[r],t)){i=!0;break}return i}static FormatToPercentage(t){return`${t}%`}static ApplyClassToSubStr(t,o,i){const r=i??"highlight-text",s=new RegExp(Ce.GetVariants(o).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const o=Ce.Translit(t);return[t,Ce.Capitalize(t),t.toLowerCase(),t.toUpperCase(),o,Ce.Capitalize(o),o.toLowerCase(),o.toUpperCase()]}static ContainsNum(t){return/\d/.test(t)}static JoinSnake(...t){return t.join("_")}static GetDynamicCountName(t,o){const i=[2,0,1,1,1,2];return t.length+" "+o[t.length%100>4&&t.length%100<20?2:i[t.length%10<5?t.length%10:5]]}static TrimText(t){return typeof t=="string"?t.trim():t}}const Xt=class Xt{static BuildClass(t,o){o&&Object.keys(o).forEach(i=>{const r=o[i];if(this.isPrimitive(r))t[i]instanceof Date?t[i]=new Date(r):t[i]=r;else if(r!=null&&!Array.isArray(r))if(t[i]&&t[i].constructor)t[i]=new t[i].constructor(r);else{const s=Reflect.getMetadata(i,t);s&&(t[i]=new s[i](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(i,t);r.length!==0&&!s&&(t[i]=r),s&&(t[i]=r.map(a=>new s[i](a)))}})}static isPrimitive(t){return t!==null&&typeof t<"u"&&t!==Object(t)}static RemoveFromClassByIndex(t,o,i){Xt.RemoveFromClass(t,o,i)}static RemoveFromClassById(t,o,i){if(!t)return;const r=o.findIndex(s=>s.id===t);if(!(r<0))return Xt.RemoveFromClass(r,o,i),t}static RemoveFromClass(t,o,i){if(t<0)return;const r=o[t].id;r&&i&&i.push(r),o.splice(t,1)}static GetPropertyName(t){const o=new t;return new Proxy(o,{get(i,r){return r}})}static InitClassInstance(t,o){const i=t.constructor(o);return Xt.BuildClass(i),i.id=Ke.UUID(),i}static ExistsWithId(t,o){return t.some(i=>i.id===o)}static DeepMap(t){return o=>Array.isArray(o)?o.map(Xt.DeepMap(t)):Object(o)===o?Object.fromEntries(Object.entries(o).map(([i,r])=>[i,Xt.DeepMap(t)(r)])):t(o)}static DeepTrim(t){return this.DeepMap(Ce.TrimText)(t)}};d(Xt,"GetClassConstructor",t=>(o,i)=>{const r=Reflect.getMetadata(`property:${i}`,o)||{};r[i]=t,Reflect.defineMetadata(i,r,o)});let K=Xt,Yn=class Ol{constructor(t){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");K.BuildClass(this,t)}static Create(){const t=new Ol;return t.id=Ke.UUID(),t}};class Ei{static Setup(t="http://localhost",o="9000",i="api"){this.staticUrl=Ce.BuildSafeUrl(t,o,i),this.staticUrl=xi(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}d(Ei,"staticUrl","");class Et{constructor(t){d(this,"name","");d(this,"url","");d(this,"src","");d(this,"raw");d(this,"blob");d(this,"file");d(this,"type","");d(this,"id");d(this,"originalName","");d(this,"fileSystemPath","");d(this,"itemId");d(this,"itemOneId");d(this,"description","");d(this,"order",0);K.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${Ei.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:xn&&xn.tagName.toUpperCase()==="SCRIPT"&&xn.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,o){const i=new Et;return i.id=o??Ke.UUID(),i.originalName=t.name,i.file=t.blob,i.fileSystemPath=Ke.UUID(),i}setFile(t){this.id||(this.id=Ke.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=Ke.UUID(),this.url=t.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(t,o){if(t.target){let i="";return o&&(i=`@/assets/img/${o}`),new URL(i,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:xn&&xn.tagName.toUpperCase()==="SCRIPT"&&xn.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(t){const o=t.split(".");return o[o.length-1]}}class is{constructor(t){d(this,"id");d(this,"name","");d(this,"surname","");d(this,"patronymic","");d(this,"isMale",!0);d(this,"dateBirth",new Date);d(this,"contactId");d(this,"slug","");d(this,"postIndex","");d(this,"address","");d(this,"editNameMode",!1);K.BuildClass(this,t)}setEditNameMode(t){this.editNameMode=t}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(t){return t?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=Ce.Capitalize(this.name),this.surname=Ce.Capitalize(this.surname),this.patronymic=Ce.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(t){this.surname=t.surname,this.name=t.name,this.patronymic=t.patronymic}}class on{constructor(t){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");K.BuildClass(this,t)}static Create(){const t=new on;return t.id=Ke.UUID(),t}}class $o{constructor(t){d(this,"id");d(this,"address");d(this,"description");K.BuildClass(this,t)}}class To{constructor(t){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");K.BuildClass(this,t)}static Create(){const t=new To;return t.id=Ke.UUID(),t}}class Bi{constructor(t){d(this,"id");d(this,"address");d(this,"description");K.BuildClass(this,t)}}let hc=(Ut=class{},d(Ut,"Phone",on),d(Ut,"FileInfo",Et),d(Ut,"Website",Bi),d(Ut,"Email",Yn),d(Ut,"Human",is),d(Ut,"PostAddress",$o),d(Ut,"UserAccount",To),Ut);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 Mo{constructor(t){d(this,"field","");d(this,"operator",Se.Eq);d(this,"value","");K.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,o){return new Mo({operator:o,field:t})}eq(t){return this.field===t.field&&this.operator===t.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 Ni{constructor(t){d(this,"model","");d(this,"field","");d(this,"value","");d(this,"wheres",[]);K.BuildClass(this,t)}static Create(t){const o=new Ni;return o.model=t.GetClassName(),o}eq(t){return t.model===this.model&&t.field===this.field}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Mo.Create(t,o);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(o=>o.eq(t))}}let rs=class Ll{constructor(t){d(this,"id");d(this,"model","");d(this,"wheres",[]);d(this,"joins",[]);K.BuildClass(this,t)}static Create(t){const o=new Ll;return o.model=t.GetClassName(),o}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Mo.Create(t,o);return this.wheres.push(r),r}removeWhere(t){const o=this.wheres.findIndex(i=>i.eq(t));o>-1&&this.wheres.splice(o,1)}addJoin(t){const o=this.findJoin({model:t.GetClassName()});if(o)return o;const i=Ni.Create(t);return this.joins.push(i),i}findJoin(t){return this.joins.find(o=>o.eq(t))}findWhere(t){return this.wheres.find(o=>o.eq(t))}toRef(){return e.ref(this)}};class Dt{static Shuffle(t){for(let o=t.length-1;o>0;o--){const i=Math.floor(Math.random()*(o+1));[t[o],t[i]]=[t[i],t[o]]}}static GenerateNumsRange(t,o,i=1){return Array.from({length:(o-t)/i+1},(r,s)=>t+s*i)}static GetLast(t){return t[t.length-1]}static GetFirst(t){return t[0]}static GetRandEL(t){return t[Math.floor(Math.random()*t.length)]}static Sort(t){t.forEach((o,i)=>o.order=i)}static Refill(t,o){t.splice(0,t.length),t.push(...o)}static Eq(t,o){return t.length===o.length&&(t==null?void 0:t.every((i,r)=>t[r]==o[r]))}static SwipeById(t,o,i){const r=t.findIndex(a=>o.id===a.id),s=t.findIndex(a=>i.id===a.id);r<0||s<0||([t[r],t[s]]=[t[s],t[r]])}static Swap(t,o,i){if(o<0||o>=t.length||i<0||i>=t.length)return;const r=t[o];t[o]=t[i],t[i]=r}static MoveUp(t,o){t[o].order=o-1,t[o-1]&&(t[o-1].order=o),[t[o],t[o-1]]=[t[o-1],t[o]]}static MoveDown(t,o){t[o].order=o+1,t[o+1]&&(t[o+1].order=o),[t[o],t[o+1]]=[t[o+1],t[o]]}}var Ae=(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))(Ae||{}),pc=Object.defineProperty,gc=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&pc(t,o,r),r};const ss=class So{constructor(t){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",Se.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",Ae.String);d(this,"set",[]);d(this,"isSet",!1);d(this,"joinTable","");d(this,"joinTableModel","");d(this,"joinTableFk","");d(this,"joinTablePk","");d(this,"joinTableId","");d(this,"joinTableIdCol","");K.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===Ae.Join){const o=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===Se.In?o&&Dt.Eq(this.set,t.set):o}return t.model===this.model&&t.col===this.col&&t.operator===this.operator}valueEq(t){return!this||!t||!this.eq(t)?!1:this.type===Ae.Boolean?this.boolean===(t==null?void 0:t.boolean):this.type===Ae.String?this.value1===(t==null?void 0:t.value1):this.type===Ae.Join&&this.set.length?Dt.Eq(this.set,t.set):!1}toUrlQuery(){const t=this.type?`"type":"${this.type}"`:"",o=this.model?`"model":"${this.model}"`:"",i=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Ae.Boolean?`"boolean":${this.boolean}`:"",c=this.type===Ae.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===Ae.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Ae.Number?`"number":${this.number}`:"",f=this.type===Ae.Set||this.operator===Se.In?`"set":${JSON.stringify(this.set)}`:"",h=this.type===Ae.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,o,i,r,s,a,c,l,u,f,h].filter(p=>p!=="").toString()}fromUrlQuery(t){this.model=t.get("model")??"",this.col=t.get("col")??"",this.label=t.get("label")??"",this.operator=t.get("operator")??"",this.value1=t.get("value1")??"",this.type=t.get("type")??"",this.boolean=!!(t.get("boolean")??""),this.joinTableModel=t.get("joinTableModel")??"",this.joinTableId=t.get("joinTableId")??"",this.joinTableFk=t.get("joinTableFk")??"",this.joinTableIdCol=t.get("joinTableIdCol")??"",this.joinTablePk=t.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(t,o,i){const r=new So;return r.model=t.GetClassName(),r.col=o??"",r.type=i,r.type===Ae.Number&&(r.value1="0"),r.type===Ae.String&&(r.value1=""),r.type===Ae.Boolean&&(r.value1="false",r.operator=Se.Eq),r}static CreateFilterModelWithJoin(t,o,i,r,s,a,c,l){const u=new So;return u.id=jt(),u.joinTable=i,u.joinTablePk=r,u.joinTableFk=s,u.col=o,u.type=a,c&&(u.joinTableId=c),l&&(u.joinTableIdCol=l),u}static CreateFilterModelWithJoinV2(t,o,i,r,s,a,c){const l=new So;return l.model=t,l.joinTableModel=i,l.joinTablePk=r,l.joinTableFk=s,l.col=o,l.type=Ae.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(t,o){const i=new So;return i.id=jt(),i.model=Ce.ToCamelCase(t.GetClassName()),i.joinTableModel=Ce.ToCamelCase(o.GetClassName()),i.type=Ae.Join,i}addToSet(...t){t.forEach(o=>{if(this.set.indexOf(o)===-1){this.set.push(o);return}this.set=this.set.filter(i=>i!==o)})}pushToSet(...t){t.forEach(o=>{this.set.indexOf(o)===-1&&this.set.push(o)})}replaceSet(...t){this.set=t}setBoolean(t){this.boolean=t}toRef(){return e.ref(this)}setDate1(t){this.date1=t}setDate2(t){this.date2=t}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(t,o){if(!t&&!o){this.dropDates();return}if(!o){this.setDate1(t),this.operator=Se.Eq;return}this.setDate2(o),this.operator=Se.Btw}};gc([K.GetClassConstructor(String)],ss.prototype,"set");let Vi=ss;class yc{constructor(){d(this,"operation",Se.Lt);d(this,"column","");d(this,"value");d(this,"initial",!0);d(this,"tableName","");d(this,"version","");d(this,"model","")}toUrlQuery(){const t=this.operation?`"operation":"${this.operation}"`:"",o=this.column?`"column":"${this.column}"`:"",i=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=i?`"value":"${i}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[t,o,r,s,a].filter(c=>c!=="").toString()}fromUrlQuery(t){t.cursvalue&&(this.value=t.cursvalue),t.curscolumn&&(this.column=String(t.curscolumn)),t.cursinitial!==void 0&&(this.initial=!!t.cursinitial),t.curstableName&&(this.tableName=String(t.curstableName)),t.cursoperation&&(this.operation=t.cursoperation)}}class Po{constructor(t){d(this,"page",0);d(this,"rowsPerPage",25);d(this,"rowsNumber",0);d(this,"cursor",new yc);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");K.BuildClass(this,t)}setLoadMore(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=o,this.cursor.tableName=i,this.cursorMode=!0}setLoadMoreV2(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=o,this.cursor.model=i,this.cursorMode=!0,this.version="v2"}setOffset(t){this.page=t}toUrlQuery(){const t=`"offset":${this.offset}`,o=`"limit":${this.limit}`,i=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[t,o,i,r,s,a].toString()}fromUrlQuery(){const t=window.location.search,o=t.substring(t.indexOf("p=")+2,t.lastIndexOf("|")),i=new URLSearchParams(decodeURIComponent(o));this.page=Number(i.get("offset")),this.rowsPerPage=Number(i.get("col"))}setAllLoaded(t){this.allLoaded=!(t>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,K.BuildClass(this)}}var ft=(n=>(n.Asc="asc",n.Desc="desc",n))(ft||{});class Io{constructor(t){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);K.BuildClass(this,t)}static Create(t,o,i=ft.Asc,r,s){const a=new Io;return a.model=t.GetClassName(),a.col=o??"",a.order=i??ft.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===ft.Asc}isDesc(){return this.order===ft.Desc}eq(t){return t.model===this.model&&t.col===this.col&&t.order===this.order}toUrlQuery(){const t=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",i=this.order?`"order":"${this.order}"`:"";return[t,o,i].toString()}async fromUrlQuery(){const t=window.location.search,o=t.substring(t.indexOf("s=")+2,t.indexOf("|")),i=new URLSearchParams(decodeURIComponent(o));this.model=i.get("model")??"",this.col=i.get("col")??"",this.label=i.get("label")??"",this.default=!!i.get("default"),this.order=i.get("order")??""}asc(){this.order=ft.Asc}desc(){this.order=ft.Desc}}class Ro{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(t,o){const i=new Ro;return i.model=t.GetClassName(),i.cols=o,i}}var wc=Object.defineProperty,Xn=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&wc(t,o,r),r};const Vn=(it=class{constructor(t){d(this,"id");d(this,"f",[]);d(this,"f2",[]);d(this,"s",[]);d(this,"p",new Po);d(this,"t",new Ro);K.BuildClass(this,t)}static Get(){return this.instance||(this.instance=e.reactive(new it)),this.instance}createFrom(t){const o=new it(JSON.parse(t));this.f=o.f}clearForHTTP(){const t=new it(this);return t.f=this.f.map(o=>it.EmptyEntiries(o)),t.f2=this.f2.map(o=>it.EmptyEntiries(o)),t.s=this.s.map(o=>it.EmptyEntiries(o)),t.p=it.EmptyEntiries(this.p),t.t=it.EmptyEntiries(this.t),t}static EmptyEntiries(t){if(!t)return;const i=Object.entries(t).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(i)}findFilterModel(t){return this.f.find(o=>t.id===o.id)}getFirstSortModel(){return Dt.GetLast(this.s)}setSortModel(t){t&&(this.s[0]=t)}setS(t){this.s[0]=t}setF(t){this.f.push(t)}setF2(t){this.f2.push(t)}replaceF(t,o){this.removeF(o),t&&this.setF(t)}removeF(t){const o=this.f.findIndex(i=>i.eq(t));K.RemoveFromClassByIndex(o,this.f)}reset(){this.f=[],this.s=[],this.p=new Po}resetF(){this.f=[]}},d(it,"instance"),it);Xn([K.GetClassConstructor(Vi)],Vn.prototype,"f"),Xn([K.GetClassConstructor(rs)],Vn.prototype,"f2"),Xn([K.GetClassConstructor(Io)],Vn.prototype,"s"),Xn([K.GetClassConstructor(Po)],Vn.prototype,"p"),Xn([K.GetClassConstructor(Ro)],Vn.prototype,"t");let Ft=Vn,bc=(jn=class{},d(jn,"SortModel",Io),d(jn,"FilterModel",Vi),d(jn,"FilterModelV2",rs),d(jn,"FTSP",Ft),jn);function as(n,t){return function(){return n.apply(t,arguments)}}const{toString:Cc}=Object.prototype,{getPrototypeOf:$n}=Object,{iterator:Zn,toStringTag:ls}=Symbol,Ao=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),Jn=(n,t)=>{let o=n;const i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),Ao(o,t))return!0;o=$n(o)}return!1},Sc=(n,t)=>n!=null&&Jn(n,t)?n[t]:void 0,$i=(n=>t=>{const o=Cc.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),wt=n=>(n=n.toLowerCase(),t=>$i(t)===n),zo=n=>t=>typeof t===n,{isArray:rn}=Array,Tn=zo("undefined");function Mn(n){return n!==null&&!Tn(n)&&n.constructor!==null&&!Tn(n.constructor)&&tt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const cs=wt("ArrayBuffer");function kc(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&cs(n.buffer),t}const xc=zo("string"),tt=zo("function"),ds=zo("number"),Pn=n=>n!==null&&typeof n=="object",Ec=n=>n===!0||n===!1,Do=n=>{if(!Pn(n))return!1;const t=$n(n);return(t===null||t===Object.prototype||$n(t)===null)&&!Jn(n,ls)&&!Jn(n,Zn)},Bc=n=>{if(!Pn(n)||Mn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Nc=wt("Date"),Vc=wt("File"),$c=n=>!!(n&&typeof n.uri<"u"),Tc=n=>n&&typeof n.getParts<"u",Mc=wt("Blob"),Pc=wt("FileList"),Ic=n=>Pn(n)&&tt(n.pipe);function Rc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const us=Rc(),fs=typeof us.FormData<"u"?us.FormData:void 0,Ac=n=>{if(!n)return!1;if(fs&&n instanceof fs)return!0;const t=$n(n);if(!t||t===Object.prototype||!tt(n.append))return!1;const o=$i(n);return o==="formdata"||o==="object"&&tt(n.toString)&&n.toString()==="[object FormData]"},zc=wt("URLSearchParams"),[Dc,Fc,Oc,Lc]=["ReadableStream","Request","Response","Headers"].map(wt),_c=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Kn(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),rn(n))for(i=0,r=n.length;i<r;i++)t.call(null,n[i],i,n);else{if(Mn(n))return;const s=o?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let c;for(i=0;i<a;i++)c=s[i],t.call(null,n[c],c,n)}}function ms(n,t){if(Mn(n))return null;t=t.toLowerCase();const o=Object.keys(n);let i=o.length,r;for(;i-- >0;)if(r=o[i],t===r.toLowerCase())return r;return null}const sn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hs=n=>!Tn(n)&&n!==sn;function Ti(...n){const{caseless:t,skipUndefined:o}=hs(this)&&this||{},i={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&ms(i,a)||a,l=Ao(i,c)?i[c]:void 0;Do(l)&&Do(s)?i[c]=Ti(l,s):Do(s)?i[c]=Ti({},s):rn(s)?i[c]=s.slice():(!o||!Tn(s))&&(i[c]=s)};for(let s=0,a=n.length;s<a;s++){const c=n[s];if(!c||Mn(c)||(Kn(c,r),typeof c!="object"||rn(c)))continue;const l=Object.getOwnPropertySymbols(c);for(let u=0;u<l.length;u++){const f=l[u];Jc.call(c,f)&&r(c[f],f)}}return i}const Hc=(n,t,o,{allOwnKeys:i}={})=>(Kn(t,(r,s)=>{o&&tt(r)?Object.defineProperty(n,s,{__proto__:null,value:as(r,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),Uc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),vc=(n,t,o,i)=>{n.prototype=Object.create(t.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),o&&Object.assign(n.prototype,o)},qc=(n,t,o,i)=>{let r,s,a;const c={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!i||i(a,n,t))&&!c[a]&&(t[a]=n[a],c[a]=!0);n=o!==!1&&$n(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},jc=(n,t,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=t.length;const i=n.indexOf(t,o);return i!==-1&&i===o},Wc=n=>{if(!n)return null;if(rn(n))return n;let t=n.length;if(!ds(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},Gc=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&$n(Uint8Array)),Qc=(n,t)=>{const i=(n&&n[Zn]).call(n);let r;for(;(r=i.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},Yc=(n,t)=>{let o;const i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},Xc=wt("HTMLFormElement"),Zc=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,r){return i.toUpperCase()+r}),{propertyIsEnumerable:Jc}=Object.prototype,Kc=wt("RegExp"),ps=(n,t)=>{const o=Object.getOwnPropertyDescriptors(n),i={};Kn(o,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(i[s]=a||r)}),Object.defineProperties(n,i)},ed=n=>{ps(n,(t,o)=>{if(tt(n)&&["arguments","caller","callee"].includes(o))return!1;const i=n[o];if(tt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},td=(n,t)=>{const o={},i=r=>{r.forEach(s=>{o[s]=!0})};return rn(n)?i(n):i(String(n).split(t)),o},nd=()=>{},od=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function id(n){return!!(n&&tt(n.append)&&n[ls]==="FormData"&&n[Zn])}const rd=n=>{const t=new WeakSet,o=i=>{if(Pn(i)){if(t.has(i))return;if(Mn(i))return i;if(!("toJSON"in i)){t.add(i);const r=rn(i)?[]:{};return Kn(i,(s,a)=>{const c=o(s);!Tn(c)&&(r[a]=c)}),t.delete(i),r}}return i};return o(n)},sd=wt("AsyncFunction"),ad=n=>n&&(Pn(n)||tt(n))&&tt(n.then)&&tt(n.catch),gs=((n,t)=>n?setImmediate:t?((o,i)=>(sn.addEventListener("message",({source:r,data:s})=>{r===sn&&s===o&&i.length&&i.shift()()},!1),r=>{i.push(r),sn.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",tt(sn.postMessage)),ld=typeof queueMicrotask<"u"?queueMicrotask.bind(sn):typeof process<"u"&&process.nextTick||gs,ys=n=>n!=null&&tt(n[Zn]),S={isArray:rn,isArrayBuffer:cs,isBuffer:Mn,isFormData:Ac,isArrayBufferView:kc,isString:xc,isNumber:ds,isBoolean:Ec,isObject:Pn,isPlainObject:Do,isEmptyObject:Bc,isReadableStream:Dc,isRequest:Fc,isResponse:Oc,isHeaders:Lc,isUndefined:Tn,isDate:Nc,isFile:Vc,isReactNativeBlob:$c,isReactNative:Tc,isBlob:Mc,isRegExp:Kc,isFunction:tt,isStream:Ic,isURLSearchParams:zc,isTypedArray:Gc,isFileList:Pc,forEach:Kn,merge:Ti,extend:Hc,trim:_c,stripBOM:Uc,inherits:vc,toFlatObject:qc,kindOf:$i,kindOfTest:wt,endsWith:jc,toArray:Wc,forEachEntry:Qc,matchAll:Yc,isHTMLForm:Xc,hasOwnProperty:Ao,hasOwnProp:Ao,hasOwnInPrototypeChain:Jn,getSafeProp:Sc,reduceDescriptors:ps,freezeMethods:ed,toObjectSet:td,toCamelCase:Zc,noop:nd,toFiniteNumber:od,findKey:ms,global:sn,isContextDefined:hs,isSpecCompliantForm:id,toJSONObject:rd,isAsyncFn:sd,isThenable:ad,setImmediate:gs,asap:ld,isIterable:ys,isSafeIterable:n=>n!=null&&Jn(n,Zn)&&ys(n)},cd=S.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"]),dd=n=>{const t={};let o,i,r;return n&&n.split(`
15
- `).forEach(function(a){r=a.indexOf(":"),o=a.substring(0,r).trim().toLowerCase(),i=a.substring(r+1).trim(),!(!o||t[o]&&cd[o])&&(o==="set-cookie"?t[o]?t[o].push(i):t[o]=[i]:t[o]=t[o]?t[o]+", "+i:i)}),t};function ud(n){let t=0,o=n.length;for(;t<o;){const i=n.charCodeAt(t);if(i!==9&&i!==32)break;t+=1}for(;o>t;){const i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}const fd=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),md=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Mi(n,t){return S.isArray(n)?n.map(o=>Mi(o,t)):ud(String(n).replace(t,""))}const hd=n=>Mi(n,fd),pd=n=>Mi(n,md);function ws(n){const t=Object.create(null);return S.forEach(n.toJSON(),(o,i)=>{t[i]=pd(o)}),t}const bs=Symbol("internals");function eo(n){return n&&String(n).trim().toLowerCase()}function Fo(n){return n===!1||n==null?n:S.isArray(n)?n.map(Fo):hd(String(n))}function gd(n){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=o.exec(n);)t[i[1]]=i[2];return t}const yd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Pi(n,t,o,i,r){if(S.isFunction(i))return i.call(this,t,o);if(r&&(t=o),!!S.isString(t)){if(S.isString(i))return t.indexOf(i)!==-1;if(S.isRegExp(i))return i.test(t)}}function wd(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,i)=>o.toUpperCase()+i)}function bd(n,t){const o=S.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+o,{__proto__:null,value:function(r,s,a){return this[i].call(this,t,r,s,a)},configurable:!0})})}let Ge=class{constructor(t){t&&this.set(t)}set(t,o,i){const r=this;function s(c,l,u){const f=eo(l);if(!f)return;const h=S.findKey(r,f);(!h||r[h]===void 0||u===!0||u===void 0&&r[h]!==!1)&&(r[h||l]=Fo(c))}const a=(c,l)=>S.forEach(c,(u,f)=>s(u,f,l));if(S.isPlainObject(t)||t instanceof this.constructor)a(t,o);else if(S.isString(t)&&(t=t.trim())&&!yd(t))a(dd(t),o);else if(S.isObject(t)&&S.isSafeIterable(t)){let c=Object.create(null),l,u;for(const f of t){if(!S.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],S.hasOwnProp(c,u)?(l=c[u],c[u]=S.isArray(l)?[...l,f[1]]:[l,f[1]]):c[u]=f[1]}a(c,o)}else t!=null&&s(o,t,i);return this}get(t,o){if(t=eo(t),t){const i=S.findKey(this,t);if(i){const r=this[i];if(!o)return r;if(o===!0)return gd(r);if(S.isFunction(o))return o.call(this,r,i);if(S.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=eo(t),t){const i=S.findKey(this,t);return!!(i&&this[i]!==void 0&&(!o||Pi(this,this[i],i,o)))}return!1}delete(t,o){const i=this;let r=!1;function s(a){if(a=eo(a),a){const c=S.findKey(i,a);c&&(!o||Pi(i,i[c],c,o))&&(delete i[c],r=!0)}}return S.isArray(t)?t.forEach(s):s(t),r}clear(t){const o=Object.keys(this);let i=o.length,r=!1;for(;i--;){const s=o[i];(!t||Pi(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const o=this,i={};return S.forEach(this,(r,s)=>{const a=S.findKey(i,s);if(a){o[a]=Fo(r),delete o[s];return}const c=t?wd(s):String(s).trim();c!==s&&delete o[s],o[c]=Fo(r),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return S.forEach(this,(i,r)=>{i!=null&&i!==!1&&(o[r]=t&&S.isArray(i)?i.join(", "):i)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(`
16
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const i=new this(t);return o.forEach(r=>i.set(r)),i}static accessor(t){const i=(this[bs]=this[bs]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=eo(a);i[c]||(bd(r,a),i[c]=!0)}return S.isArray(t)?t.forEach(s):s(t),this}};Ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),S.reduceDescriptors(Ge.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}}),S.freezeMethods(Ge);const Cd="[REDACTED ****]";function Sd(n){if(S.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(S.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function kd(n,t){const o=new Set(t.map(s=>String(s).toLowerCase())),i=[],r=s=>{if(s===null||typeof s!="object"||S.isBuffer(s))return s;if(i.indexOf(s)!==-1)return;s instanceof Ge&&(s=s.toJSON()),i.push(s);let a;if(S.isArray(s))a=[],s.forEach((c,l)=>{const u=r(c);S.isUndefined(u)||(a[l]=u)});else{if(!S.isPlainObject(s)&&Sd(s))return i.pop(),s;a=Object.create(null);for(const[c,l]of Object.entries(s)){const u=o.has(c.toLowerCase())?Cd:r(l);S.isUndefined(u)||(a[c]=u)}}return i.pop(),a};return r(n)}let _=class _l extends Error{static from(t,o,i,r,s,a){const c=new _l(t.message,o||t.code,i,r,s);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,o,i,r,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),i&&(this.config=i),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,o=t&&S.hasOwnProp(t,"redact")?t.redact:void 0,i=S.isArray(o)&&o.length>0?kd(t,o):S.toJSONObject(t);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:i,code:this.code,status:this.status}}};_.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",_.ERR_BAD_OPTION="ERR_BAD_OPTION",_.ECONNABORTED="ECONNABORTED",_.ETIMEDOUT="ETIMEDOUT",_.ECONNREFUSED="ECONNREFUSED",_.ERR_NETWORK="ERR_NETWORK",_.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",_.ERR_DEPRECATED="ERR_DEPRECATED",_.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",_.ERR_BAD_REQUEST="ERR_BAD_REQUEST",_.ERR_CANCELED="ERR_CANCELED",_.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",_.ERR_INVALID_URL="ERR_INVALID_URL",_.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const xd=null,Cs=100;function Ii(n){return S.isPlainObject(n)||S.isArray(n)}function Ss(n){return S.endsWith(n,"[]")?n.slice(0,-2):n}function Ri(n,t,o){return n?n.concat(t).map(function(r,s){return r=Ss(r),!o&&s?"["+r+"]":r}).join(o?".":""):t}function Ed(n){return S.isArray(n)&&!n.some(Ii)}const Bd=S.toFlatObject(S,{},null,function(t){return/^is[A-Z]/.test(t)});function Oo(n,t,o){if(!S.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,o=S.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(M,b){return!S.isUndefined(b[M])});const i=o.metaTokens,r=o.visitor||C,s=o.dots,a=o.indexes,c=o.Blob||typeof Blob<"u"&&Blob,l=o.maxDepth===void 0?Cs:o.maxDepth,u=c&&S.isSpecCompliantForm(t),f=[];if(!S.isFunction(r))throw new TypeError("visitor must be a function");function h(y){if(y===null)return"";if(S.isDate(y))return y.toISOString();if(S.isBoolean(y))return y.toString();if(!u&&S.isBlob(y))throw new _("Blob is not supported. Use a Buffer instead.");if(S.isArrayBuffer(y)||S.isTypedArray(y)){if(u&&typeof c=="function")return new c([y]);if(typeof Buffer<"u")return Buffer.from(y);throw new _("Blob is not supported. Use a Buffer instead.",_.ERR_NOT_SUPPORT)}return y}function p(y){if(y>l)throw new _("Object is too deeply nested ("+y+" levels). Max depth: "+l,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function k(y,M){if(l===1/0)return JSON.stringify(y);const b=[];return JSON.stringify(y,function(P,A){if(!S.isObject(A))return A;for(;b.length&&b[b.length-1]!==this;)b.pop();return b.push(A),p(M+b.length-1),A})}function C(y,M,b){let $=y;if(S.isReactNative(t)&&S.isReactNativeBlob(y))return t.append(Ri(b,M,s),h(y)),!1;if(y&&!b&&typeof y=="object"){if(S.endsWith(M,"{}"))M=i?M:M.slice(0,-2),y=k(y,1);else if(S.isArray(y)&&Ed(y)||(S.isFileList(y)||S.endsWith(M,"[]"))&&($=S.toArray(y)))return M=Ss(M),$.forEach(function(A,G){!(S.isUndefined(A)||A===null)&&t.append(a===!0?Ri([M],G,s):a===null?M:M+"[]",h(A))}),!1}return Ii(y)?!0:(t.append(Ri(b,M,s),h(y)),!1)}const N=Object.assign(Bd,{defaultVisitor:C,convertValue:h,isVisitable:Ii});function E(y,M,b=0){if(!S.isUndefined(y)){if(p(b),f.indexOf(y)!==-1)throw new Error("Circular reference detected in "+M.join("."));f.push(y),S.forEach(y,function(P,A){(!(S.isUndefined(P)||P===null)&&r.call(t,P,S.isString(A)?A.trim():A,M,N))===!0&&E(P,M?M.concat(A):[A],b+1)}),f.pop()}}if(!S.isObject(n))throw new TypeError("data must be an object");return E(n),t}function ks(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function Ai(n,t){this._pairs=[],n&&Oo(n,this,t)}const xs=Ai.prototype;xs.append=function(t,o){this._pairs.push([t,o])},xs.toString=function(t){const o=t?i=>t.call(this,i,ks):ks;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};function Nd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Es(n,t,o){if(!t)return n;n=n||"";const i=S.isFunction(o)?{serialize:o}:o,r=S.getSafeProp(i,"encode")||Nd,s=S.getSafeProp(i,"serialize");let a;if(s?a=s(t,i):a=S.isURLSearchParams(t)?t.toString():new Ai(t,i).toString(r),a){const c=n.indexOf("#");c!==-1&&(n=n.slice(0,c)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Bs{constructor(){this.handlers=[]}use(t,o,i){return this.handlers.push({fulfilled:t,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){S.forEach(this.handlers,function(i){i!==null&&t(i)})}}const zi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Vd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ai,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Di=typeof window<"u"&&typeof document<"u",Fi=typeof navigator=="object"&&navigator||void 0,$d=Di&&(!Fi||["ReactNative","NativeScript","NS"].indexOf(Fi.product)<0),Td=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Md=Di&&window.location.href||"http://localhost",Ue={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Di,hasStandardBrowserEnv:$d,hasStandardBrowserWebWorkerEnv:Td,navigator:Fi,origin:Md},Symbol.toStringTag,{value:"Module"})),...Vd};function Pd(n,t){return Oo(n,new Ue.classes.URLSearchParams,{visitor:function(o,i,r,s){return Ue.isNode&&S.isBuffer(o)?(this.append(i,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Ns=Cs;function Vs(n){if(n>Ns)throw new _("FormData field is too deeply nested ("+n+" levels). Max depth: "+Ns,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Id(n){const t=[],o=/\w+|\[(\w*)]/g;let i;for(;(i=o.exec(n))!==null;)Vs(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function Rd(n){const t={},o=Object.keys(n);let i;const r=o.length;let s;for(i=0;i<r;i++)s=o[i],t[s]=n[s];return t}function $s(n){function t(o,i,r,s){Vs(s);let a=o[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=o.length;return a=!a&&S.isArray(r)?r.length:a,l?(S.hasOwnProp(r,a)?r[a]=S.isArray(r[a])?r[a].concat(i):[r[a],i]:r[a]=i,!c):((!S.hasOwnProp(r,a)||!S.isObject(r[a]))&&(r[a]=[]),t(o,i,r[a],s)&&S.isArray(r[a])&&(r[a]=Rd(r[a])),!c)}if(S.isFormData(n)&&S.isFunction(n.entries)){const o={};return S.forEachEntry(n,(i,r)=>{t(Id(i),r,o,0)}),o}return null}const In=(n,t)=>n!=null&&S.hasOwnProp(n,t)?n[t]:void 0;function Ad(n,t,o){if(S.isString(n))try{return(t||JSON.parse)(n),S.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}const to={transitional:zi,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const i=o.getContentType()||"",r=i.indexOf("application/json")>-1,s=S.isObject(t);if(s&&S.isHTMLForm(t)&&(t=new FormData(t)),S.isFormData(t))return r?JSON.stringify($s(t)):t;if(S.isArrayBuffer(t)||S.isBuffer(t)||S.isStream(t)||S.isFile(t)||S.isBlob(t)||S.isReadableStream(t))return t;if(S.isArrayBufferView(t))return t.buffer;if(S.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){const l=In(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return Pd(t,l).toString();if((c=S.isFileList(t))||i.indexOf("multipart/form-data")>-1){const u=In(this,"env"),f=u&&u.FormData;return Oo(c?{"files[]":t}:t,f&&new f,l)}}return s||r?(o.setContentType("application/json",!1),Ad(t)):t}],transformResponse:[function(t){const o=In(this,"transitional")||to.transitional,i=o&&o.forcedJSONParsing,r=In(this,"responseType"),s=r==="json";if(S.isResponse(t)||S.isReadableStream(t))return t;if(t&&S.isString(t)&&(i&&!r||s)){const c=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t,In(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?_.from(l,_.ERR_BAD_RESPONSE,this,null,In(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ue.classes.FormData,Blob:Ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};S.forEach(["delete","get","head","post","put","patch","query"],n=>{to.headers[n]={}});function Oi(n,t){const o=this||to,i=t||o,r=Ge.from(i.headers);let s=i.data;return S.forEach(n,function(c){s=c.call(o,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Ts(n){return!!(n&&n.__CANCEL__)}let no=class extends _{constructor(t,o,i){super(t??"canceled",_.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}};function Ms(n,t,o){const i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):t(new _("Request failed with status code "+o.status,o.status>=400&&o.status<500?_.ERR_BAD_REQUEST:_.ERR_BAD_RESPONSE,o.config,o.request,o))}function zd(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Dd(n,t){n=n||10;const o=new Array(n),i=new Array(n);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=i[s];a||(a=u),o[r]=l,i[r]=u;let h=s,p=0;for(;h!==r;)p+=o[h++],h=h%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<t)return;const k=f&&u-f;return k?Math.round(p*1e3/k):void 0}}function Fd(n,t){let o=0,i=1e3/t,r,s;const a=(u,f=Date.now())=>{o=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),h=f-o;h>=i?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},i-h)))},()=>r&&a(r)]}const Lo=(n,t,o=3)=>{let i=0;const r=Dd(50,250);return Fd(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=c!=null?Math.min(a,c):a,u=Math.max(0,l-i),f=r(u);i=Math.max(i,l);const h={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:f||void 0,estimated:f&&c?(c-l)/f:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};n(h)},o)},Ps=(n,t)=>{const o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},Is=n=>(...t)=>S.asap(()=>n(...t)),Od=Ue.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,Ue.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(Ue.origin),Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent)):()=>!0,Ld=Ue.hasStandardBrowserEnv?{write(n,t,o,i,r,s,a){if(typeof document>"u")return;const c=[`${n}=${encodeURIComponent(t)}`];S.isNumber(o)&&c.push(`expires=${new Date(o).toUTCString()}`),S.isString(i)&&c.push(`path=${i}`),S.isString(r)&&c.push(`domain=${r}`),s===!0&&c.push("secure"),S.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let o=0;o<t.length;o++){const i=t[o].replace(/^\s+/,""),r=i.indexOf("=");if(r!==-1&&i.slice(0,r)===n)try{return decodeURIComponent(i.slice(r+1))}catch{return i.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _d(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Hd(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const Ud=/^https?:(?!\/\/)/i,vd=/[\t\n\r]/g;function qd(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function jd(n){return qd(n).replace(vd,"")}function Rs(n,t){if(typeof n=="string"&&Ud.test(jd(n)))throw new _('Invalid URL: missing "//" after protocol',_.ERR_INVALID_URL,t)}function As(n,t,o,i){Rs(t,i);let r=!_d(t);return n&&(r||o===!1)?(Rs(n,i),Hd(n,t)):t}const zs=n=>n instanceof Ge?{...n}:n;function an(n,t){n=n||{},t=t||{};const o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(f,h,p,k){return S.isPlainObject(f)&&S.isPlainObject(h)?S.merge.call({caseless:k},f,h):S.isPlainObject(h)?S.merge({},h):S.isArray(h)?h.slice():h}function r(f,h,p,k){if(S.isUndefined(h)){if(!S.isUndefined(f))return i(void 0,f,p,k)}else return i(f,h,p,k)}function s(f,h){if(!S.isUndefined(h))return i(void 0,h)}function a(f,h){if(S.isUndefined(h)){if(!S.isUndefined(f))return i(void 0,f)}else return i(void 0,h)}function c(f){const h=S.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!S.isUndefined(h))if(S.isPlainObject(h)){if(S.hasOwnProp(h,f))return h[f]}else return;const p=S.hasOwnProp(n,"transitional")?n.transitional:void 0;if(S.isPlainObject(p)&&S.hasOwnProp(p,f))return p[f]}function l(f,h,p){if(S.hasOwnProp(t,p))return i(f,h);if(S.hasOwnProp(n,p))return i(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:l,headers:(f,h,p)=>r(zs(f),zs(h),p,!0)};return S.forEach(Object.keys({...n,...t}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const p=S.hasOwnProp(u,h)?u[h]:r,k=S.hasOwnProp(n,h)?n[h]:void 0,C=S.hasOwnProp(t,h)?t[h]:void 0,N=p(k,C,h);S.isUndefined(N)&&p!==l||(o[h]=N)}),S.hasOwnProp(t,"validateStatus")&&S.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(S.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}const Wd=["content-type","content-length"];function Gd(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,r])=>{Wd.includes(i.toLowerCase())&&n.set(i,r)})}const Qd=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function Ds(n){const t=an({},n),o=p=>S.hasOwnProp(t,p)?t[p]:void 0,i=o("data");let r=o("withXSRFToken");const s=o("xsrfHeaderName"),a=o("xsrfCookieName");let c=o("headers");const l=o("auth"),u=o("baseURL"),f=o("allowAbsoluteUrls"),h=o("url");if(t.headers=c=Ge.from(c),t.url=Es(As(u,h,f,t),o("params"),o("paramsSerializer")),l){const p=S.getSafeProp(l,"username")||"",k=S.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(p+":"+(k?Qd(k):"")))}catch(C){throw _.from(C,_.ERR_BAD_OPTION_VALUE,n)}}if(S.isFormData(i)&&(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv||S.isReactNative(i)?c.setContentType(void 0):S.isFunction(i.getHeaders)&&Gd(c,i.getHeaders(),o("formDataHeaderPolicy"))),Ue.hasStandardBrowserEnv&&(S.isFunction(r)&&(r=r(t)),r===!0||r==null&&Od(t.url))){const k=s&&a&&Ld.read(a);k&&c.set(s,k)}return t}const Yd=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(o,i){const r=Ds(n);let s=r.data;const a=Ge.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,f,h,p,k,C;function N(){k&&k(),C&&C(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function y(){if(!E)return;const b=Ge.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),P={data:!c||c==="text"||c==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:b,config:n,request:E};Ms(function(G){o(G),N()},function(G){i(G),N()},P),E=null}"onloadend"in E?E.onloadend=y:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.startsWith("file:"))||setTimeout(y)},E.onabort=function(){E&&(i(new _("Request aborted",_.ECONNABORTED,n,E)),N(),E=null)},E.onerror=function($){const P=$&&$.message?$.message:"Network Error",A=new _(P,_.ERR_NETWORK,n,E);A.event=$||null,i(A),N(),E=null},E.ontimeout=function(){let $=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const P=r.transitional||zi;r.timeoutErrorMessage&&($=r.timeoutErrorMessage),i(new _($,P.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,n,E)),N(),E=null},s===void 0&&a.setContentType(null),"setRequestHeader"in E&&S.forEach(ws(a),function($,P){E.setRequestHeader(P,$)}),S.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),c&&c!=="json"&&(E.responseType=r.responseType),u&&([p,C]=Lo(u,!0),E.addEventListener("progress",p)),l&&E.upload&&([h,k]=Lo(l),E.upload.addEventListener("progress",h),E.upload.addEventListener("loadend",k)),(r.cancelToken||r.signal)&&(f=b=>{E&&(i(!b||b.type?new no(null,n,E):b),E.abort(),N(),E=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const M=zd(r.url);if(M&&!Ue.protocols.includes(M)){i(new _("Unsupported protocol "+M+":",_.ERR_BAD_REQUEST,n)),N();return}E.send(s||null)})},Xd=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const o=new AbortController;let i=!1;const r=function(l){if(!i){i=!0,a();const u=l instanceof Error?l:this.reason;o.abort(u instanceof _?u:new no(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,r(new _(`timeout of ${t}ms exceeded`,_.ETIMEDOUT))},t);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(l=>{l.unsubscribe?l.unsubscribe(r):l.removeEventListener("abort",r)}),n=null)};n.forEach(l=>l.addEventListener("abort",r,{once:!0}));const{signal:c}=o;return c.unsubscribe=()=>S.asap(a),c},Zd=function*(n,t){let o=n.byteLength;if(o<t){yield n;return}let i=0,r;for(;i<o;)r=i+t,yield n.slice(i,r),i=r},Jd=async function*(n,t){for await(const o of Kd(n))yield*Zd(o,t)},Kd=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:o,value:i}=await t.read();if(o)break;yield i}}finally{await t.cancel()}},Fs=(n,t,o,i)=>{const r=Jd(n,t);let s=0,a,c=l=>{a||(a=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:u,value:f}=await r.next();if(u){c(),l.close();return}let h=f.byteLength;if(o){let p=s+=h;o(p)}l.enqueue(new Uint8Array(f))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},_o=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,eu=(n,t,o)=>t+2<o&&_o(n.charCodeAt(t+1))&&_o(n.charCodeAt(t+2));function tu(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const o=n.slice(5,t),i=n.slice(t+1);if(/;base64/i.test(o)){let a=i.length;const c=i.length;for(let k=0;k<c;k++)if(i.charCodeAt(k)===37&&k+2<c){const C=i.charCodeAt(k+1),N=i.charCodeAt(k+2);_o(C)&&_o(N)&&(a-=2,k+=2)}let l=0,u=c-1;const f=k=>k>=2&&i.charCodeAt(k-2)===37&&i.charCodeAt(k-1)===51&&(i.charCodeAt(k)===68||i.charCodeAt(k)===100);u>=0&&(i.charCodeAt(u)===61?(l++,u--):f(u)&&(l++,u-=3)),l===1&&u>=0&&(i.charCodeAt(u)===61||f(u))&&l++;const p=Math.floor(a/4)*3-(l||0);return p>0?p:0}let s=0;for(let a=0,c=i.length;a<c;a++){const l=i.charCodeAt(a);if(l===37&&eu(i,a,c))s+=1,a+=2;else if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&a+1<c){const u=i.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Li="1.18.1",Os=64*1024,{isFunction:Ho}=S,nu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),Ls=n=>{if(!S.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},_s=(n,...t)=>{try{return!!n(...t)}catch{return!1}},ou=n=>{const t=n.indexOf("://");let o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},iu=n=>{const t=S.global!==void 0&&S.global!==null?S.global:globalThis,{ReadableStream:o,TextEncoder:i}=t;n=S.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,c=r?Ho(r):typeof fetch=="function",l=Ho(s),u=Ho(a);if(!c)return!1;const f=c&&Ho(o),h=c&&(typeof i=="function"?(y=>M=>y.encode(M))(new i):async y=>new Uint8Array(await new s(y).arrayBuffer())),p=l&&f&&_s(()=>{let y=!1;const M=new s(Ue.origin,{body:new o,method:"POST",get duplex(){return y=!0,"half"}}),b=M.headers.has("Content-Type");return M.body!=null&&M.body.cancel(),y&&!b}),k=u&&f&&_s(()=>S.isReadableStream(new a("").body)),C={stream:k&&(y=>y.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!C[y]&&(C[y]=(M,b)=>{let $=M&&M[y];if($)return $.call(M);throw new _(`Response type '${y}' is not supported`,_.ERR_NOT_SUPPORT,b)})});const N=async y=>{if(y==null)return 0;if(S.isBlob(y))return y.size;if(S.isSpecCompliantForm(y))return(await new s(Ue.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(S.isArrayBufferView(y)||S.isArrayBuffer(y))return y.byteLength;if(S.isURLSearchParams(y)&&(y=y+""),S.isString(y))return(await h(y)).byteLength},E=async(y,M)=>{const b=S.toFiniteNumber(y.getContentLength());return b??N(M)};return async y=>{let{url:M,method:b,data:$,signal:P,cancelToken:A,timeout:G,onDownloadProgress:de,onUploadProgress:$e,responseType:Ee,headers:De,withCredentials:Me="same-origin",fetchOptions:ge,maxContentLength:Be,maxBodyLength:Pt}=Ds(y);const It=S.isNumber(Be)&&Be>-1,Jt=S.isNumber(Pt)&&Pt>-1,bn=se=>S.hasOwnProp(y,se)?y[se]:void 0;let lt=r||fetch;Ee=Ee?(Ee+"").toLowerCase():"text";let je=Xd([P,A&&A.toAbortSignal()],G),be=null;const Q=je&&je.unsubscribe&&(()=>{je.unsubscribe()});let Ze,St=null;const ye=()=>new _("Request body larger than maxBodyLength limit",_.ERR_BAD_REQUEST,y,be);try{let se;const We=bn("auth");if(We){const ee=S.getSafeProp(We,"username")||"",Oe=S.getSafeProp(We,"password")||"";se={username:ee,password:Oe}}if(ou(M)){const ee=new URL(M,Ue.origin);if(!se&&(ee.username||ee.password)){const Oe=Ls(ee.username),st=Ls(ee.password);se={username:Oe,password:st}}(ee.username||ee.password)&&(ee.username="",ee.password="",M=ee.href)}if(se&&(De.delete("authorization"),De.set("Authorization","Basic "+btoa(nu((se.username||"")+":"+(se.password||""))))),It&&typeof M=="string"&&M.startsWith("data:")&&tu(M)>Be)throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,y,be);if(Jt&&b!=="get"&&b!=="head"){const ee=await N($);if(typeof ee=="number"&&isFinite(ee)&&(Ze=ee,ee>Pt))throw ye()}const vt=Jt&&(S.isReadableStream($)||S.isStream($)),ct=(ee,Oe,st)=>Fs(ee,Os,gt=>{if(Jt&&gt>Pt)throw St=ye();Oe&&Oe(gt)},st);if(p&&b!=="get"&&b!=="head"&&($e||vt)){if(Ze=Ze??await E(De,$),Ze!==0||vt){let ee=new s(M,{method:"POST",body:$,duplex:"half"}),Oe;if(S.isFormData($)&&(Oe=ee.headers.get("content-type"))&&De.setContentType(Oe),ee.body){const[st,gt]=$e&&Ps(Ze,Lo(Is($e)))||[];$=ct(ee.body,st,gt)}}}else if(vt&&!l&&f&&b!=="get"&&b!=="head")$=ct($);else if(vt&&l&&!p&&b!=="get"&&b!=="head")throw new _("Stream request bodies are not supported by the current fetch implementation",_.ERR_NOT_SUPPORT,y,be);S.isString(Me)||(Me=Me?"include":"omit");const rt=l&&"credentials"in s.prototype;if(S.isFormData($)){const ee=De.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&De.delete("content-type")}De.set("User-Agent","axios/"+Li,!1);const Kt={...ge,signal:je,method:b.toUpperCase(),headers:ws(De.normalize()),body:$,duplex:"half",credentials:rt?Me:void 0};be=l&&new s(M,Kt);let Fe=await(l?lt(be,ge):lt(M,Kt));const Rt=Ge.from(Fe.headers);if(It){const ee=S.toFiniteNumber(Rt.getContentLength());if(ee!=null&&ee>Be)throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,y,be)}const Cn=k&&(Ee==="stream"||Ee==="response");if(k&&Fe.body&&(de||It||Cn&&Q)){const ee={};["status","statusText","headers"].forEach(dt=>{ee[dt]=Fe[dt]});const Oe=S.toFiniteNumber(Rt.getContentLength()),[st,gt]=de&&Ps(Oe,Lo(Is(de),!0))||[];let en=0;const Sn=dt=>{if(It&&(en=dt,en>Be))throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,y,be);st&&st(dt)};Fe=new a(Fs(Fe.body,Os,Sn,()=>{gt&&gt(),Q&&Q()}),ee)}Ee=Ee||"text";let ue=await C[S.findKey(C,Ee)||"text"](Fe,y);if(It&&!k&&!Cn){let ee;if(ue!=null&&(typeof ue.byteLength=="number"?ee=ue.byteLength:typeof ue.size=="number"?ee=ue.size:typeof ue=="string"&&(ee=typeof i=="function"?new i().encode(ue).byteLength:ue.length)),typeof ee=="number"&&ee>Be)throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,y,be)}return!Cn&&Q&&Q(),await new Promise((ee,Oe)=>{Ms(ee,Oe,{data:ue,headers:Ge.from(Fe.headers),status:Fe.status,statusText:Fe.statusText,config:y,request:be})})}catch(se){if(Q&&Q(),je&&je.aborted&&je.reason instanceof _){const We=je.reason;throw We.config=y,be&&(We.request=be),se!==We&&Object.defineProperty(We,"cause",{__proto__:null,value:se,writable:!0,enumerable:!1,configurable:!0}),We}if(St)throw be&&!St.request&&(St.request=be),St;if(se instanceof _)throw be&&!se.request&&(se.request=be),se;if(se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)){const We=new _("Network Error",_.ERR_NETWORK,y,be,se&&se.response);throw Object.defineProperty(We,"cause",{__proto__:null,value:se.cause||se,writable:!0,enumerable:!1,configurable:!0}),We}throw _.from(se,se&&se.code,y,be,se&&se.response)}}},ru=new Map,Hs=n=>{let t=n&&n.env||{};const{fetch:o,Request:i,Response:r}=t,s=[i,r,o];let a=s.length,c=a,l,u,f=ru;for(;c--;)l=s[c],u=f.get(l),u===void 0&&f.set(l,u=c?new Map:iu(t)),f=u;return u};Hs();const _i={http:xd,xhr:Yd,fetch:{get:Hs}};S.forEach(_i,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Us=n=>`- ${n}`,su=n=>S.isFunction(n)||n===null||n===!1;function au(n,t){n=S.isArray(n)?n:[n];const{length:o}=n;let i,r;const s={};for(let a=0;a<o;a++){i=n[a];let c;if(r=i,!su(i)&&(r=_i[(c=String(i)).toLowerCase()],r===void 0))throw new _(`Unknown adapter '${c}'`);if(r&&(S.isFunction(r)||(r=r.get(t))))break;s[c||"#"+a]=r}if(!r){const a=Object.entries(s).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let c=o?a.length>1?`since :
17
- `+a.map(Us).join(`
18
- `):" "+Us(a[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+c,_.ERR_NOT_SUPPORT)}return r}const vs={getAdapter:au,adapters:_i};function Hi(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new no(null,n)}function qs(n){return Hi(n),n.headers=Ge.from(n.headers),n.data=Oi.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),vs.getAdapter(n.adapter||to.adapter,n)(n).then(function(i){Hi(n),n.response=i;try{i.data=Oi.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=Ge.from(i.headers),i},function(i){if(!Ts(i)&&(Hi(n),i&&i.response)){n.response=i.response;try{i.response.data=Oi.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=Ge.from(i.response.headers)}return Promise.reject(i)})}const Uo={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Uo[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const js={};Uo.transitional=function(t,o,i){function r(s,a){return"[Axios v"+Li+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return(s,a,c)=>{if(t===!1)throw new _(r(a," has been removed"+(o?" in "+o:"")),_.ERR_DEPRECATED);return o&&!js[a]&&(js[a]=!0,console.warn(r(a," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(s,a,c):!0}},Uo.spelling=function(t){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function lu(n,t,o){if(typeof n!="object"||n===null)throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let r=i.length;for(;r-- >0;){const s=i[r],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const c=n[s],l=c===void 0||a(c,s,n);if(l!==!0)throw new _("option "+s+" must be "+l,_.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new _("Unknown option "+s,_.ERR_BAD_OPTION)}}const vo={assertOptions:lu,validators:Uo},Qe=vo.validators;let ln=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Bs,response:new Bs}}async request(t,o){try{return await this._request(t,o)}catch(i){if(i 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 is;(function(n){(function(t){var o=typeof globalThis=="object"?globalThis:typeof os=="object"?os:typeof self=="object"?self:typeof this=="object"?this:c(),i=r(n);typeof o.Reflect<"u"&&(i=r(o.Reflect,i)),t(i,o),typeof o.Reflect>"u"&&(o.Reflect=n);function r(l,u){return function(f,m){Object.defineProperty(l,f,{configurable:!0,writable:!0,value:m}),u&&u(f,m)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return s()||a()}})(function(t,o){var i=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",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,f={create:c?function(){return tn(Object.create(null))}:l?function(){return tn({__proto__:null})}:function(){return tn({})},has:u?function(B,P){return i.call(B,P)}:function(B,P){return P in B},get:u?function(B,P){return i.call(B,P)?B[P]:void 0}:function(B,P){return B[P]}},m=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Hr(),k=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Ur(),E=typeof WeakMap=="function"?WeakMap:vr(),V=r?Symbol.for("@reflect-metadata:registry"):void 0,N=_r(),C=xn(N);function T(B,P,I,L){if(G(I)){if(!st(B))throw new TypeError;if(!Jt(P))throw new TypeError;return Je(B,P)}else{if(!st(B))throw new TypeError;if(!we(P))throw new TypeError;if(!we(L)&&!G(L)&&!Qe(L))throw new TypeError;return Qe(L)&&(L=void 0),I=rt(I),pt(B,P,I,L)}}t("decorate",T);function y(B,P){function I(L,Z){if(!we(L))throw new TypeError;if(!G(Z)&&!Ut(Z))throw new TypeError;Gn(B,P,L,Z)}return I}t("metadata",y);function b(B,P,I,L){if(!we(I))throw new TypeError;return G(L)||(L=rt(L)),Gn(B,P,I,L)}t("defineMetadata",b);function $(B,P,I){if(!we(P))throw new TypeError;return G(I)||(I=rt(I)),ye(B,P,I)}t("hasMetadata",$);function R(B,P,I){if(!we(P))throw new TypeError;return G(I)||(I=rt(I)),Ce(B,P,I)}t("hasOwnMetadata",R);function j(B,P,I){if(!we(P))throw new TypeError;return G(I)||(I=rt(I)),Ct(B,P,I)}t("getMetadata",j);function se(B,P,I){if(!we(P))throw new TypeError;return G(I)||(I=rt(I)),Zt(B,P,I)}t("getOwnMetadata",se);function ze(B,P){if(!we(B))throw new TypeError;return G(P)||(P=rt(P)),Cn(B,P)}t("getMetadataKeys",ze);function Te(B,P){if(!we(B))throw new TypeError;return G(P)||(P=rt(P)),it(B,P)}t("getOwnMetadataKeys",Te);function Ne(B,P,I){if(!we(P))throw new TypeError;if(G(I)||(I=rt(I)),!we(P))throw new TypeError;G(I)||(I=rt(I));var L=en(P,I,!1);return G(L)?!1:L.OrdinaryDeleteMetadata(B,P,I)}t("deleteMetadata",Ne);function Je(B,P){for(var I=B.length-1;I>=0;--I){var L=B[I],Z=L(P);if(!G(Z)&&!Qe(Z)){if(!Jt(Z))throw new TypeError;P=Z}}return P}function pt(B,P,I,L){for(var Z=B.length-1;Z>=0;--Z){var Se=B[Z],be=Se(P,I,L);if(!G(be)&&!Qe(be)){if(!we(be))throw new TypeError;L=be}}return L}function ye(B,P,I){var L=Ce(B,P,I);if(L)return!0;var Z=kn(P);return Qe(Z)?!1:ye(B,Z,I)}function Ce(B,P,I){var L=en(P,I,!1);return G(L)?!1:Mt(L.OrdinaryHasOwnMetadata(B,P,I))}function Ct(B,P,I){var L=Ce(B,P,I);if(L)return Zt(B,P,I);var Z=kn(P);if(!Qe(Z))return Ct(B,Z,I)}function Zt(B,P,I){var L=en(P,I,!1);if(!G(L))return L.OrdinaryGetOwnMetadata(B,P,I)}function Gn(B,P,I,L){var Z=en(I,L,!0);Z.OrdinaryDefineOwnMetadata(B,P,I,L)}function Cn(B,P){var I=it(B,P),L=kn(B);if(L===null)return I;var Z=Cn(L,P);if(Z.length<=0)return I;if(I.length<=0)return Z;for(var Se=new k,be=[],te=0,H=I;te<H.length;te++){var U=H[te],v=Se.has(U);v||(Se.add(U),be.push(U))}for(var q=0,oe=Z;q<oe.length;q++){var U=oe[q],v=Se.has(U);v||(Se.add(U),be.push(U))}return be}function it(B,P){var I=en(B,P,!1);return I?I.OrdinaryOwnMetadataKeys(B,P):[]}function he(B){if(B===null)return 1;switch(typeof B){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return B===null?1:6;default:return 6}}function G(B){return B===void 0}function Qe(B){return B===null}function Pt(B){return typeof B=="symbol"}function we(B){return typeof B=="object"?B!==null:typeof B=="function"}function ae(B,P){switch(he(B)){case 0:return B;case 1:return B;case 2:return B;case 3:return B;case 4:return B;case 5:return B}var I="string",L=ee(B,s);if(L!==void 0){var Z=L.call(B,I);if(we(Z))throw new TypeError;return Z}return ve(B)}function ve(B,P){var I,L;{var Z=B.toString;if(Ye(Z)){var L=Z.call(B);if(!we(L))return L}var I=B.valueOf;if(Ye(I)){var L=I.call(B);if(!we(L))return L}}throw new TypeError}function Mt(B){return!!B}function Sn(B){return""+B}function rt(B){var P=ae(B);return Pt(P)?P:Sn(P)}function st(B){return Array.isArray?Array.isArray(B):B instanceof Object?B instanceof Array:Object.prototype.toString.call(B)==="[object Array]"}function Ye(B){return typeof B=="function"}function Jt(B){return typeof B=="function"}function Ut(B){switch(he(B)){case 3:return!0;case 4:return!0;default:return!1}}function De(B,P){return B===P||B!==B&&P!==P}function ee(B,P){var I=B[P];if(I!=null){if(!Ye(I))throw new TypeError;return I}}function le(B){var P=ee(B,a);if(!Ye(P))throw new TypeError;var I=P.call(B);if(!we(I))throw new TypeError;return I}function lt(B){return B.value}function gt(B){var P=B.next();return P.done?!1:P}function Kt(B){var P=B.return;P&&P.call(B)}function kn(B){var P=Object.getPrototypeOf(B);if(typeof B!="function"||B===m||P!==m)return P;var I=B.prototype,L=I&&Object.getPrototypeOf(I);if(L==null||L===Object.prototype)return P;var Z=L.constructor;return typeof Z!="function"||Z===B?P:Z}function It(){var B;!G(V)&&typeof o.Reflect<"u"&&!(V in o.Reflect)&&typeof o.Reflect.defineMetadata=="function"&&(B=hi(o.Reflect));var P,I,L,Z=new E,Se={registerProvider:be,getProvider:H,setProvider:v};return Se;function be(q){if(!Object.isExtensible(Se))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case B===q:break;case G(P):P=q;break;case P===q:break;case G(I):I=q;break;case I===q:break;default:L===void 0&&(L=new k),L.add(q);break}}function te(q,oe){if(!G(P)){if(P.isProviderFor(q,oe))return P;if(!G(I)){if(I.isProviderFor(q,oe))return P;if(!G(L))for(var me=le(L);;){var ke=gt(me);if(!ke)return;var Ke=lt(ke);if(Ke.isProviderFor(q,oe))return Kt(me),Ke}}}if(!G(B)&&B.isProviderFor(q,oe))return B}function H(q,oe){var me=Z.get(q),ke;return G(me)||(ke=me.get(oe)),G(ke)&&(ke=te(q,oe),G(ke)||(G(me)&&(me=new p,Z.set(q,me)),me.set(oe,ke))),ke}function U(q){if(G(q))throw new TypeError;return P===q||I===q||!G(L)&&L.has(q)}function v(q,oe,me){if(!U(me))throw new Error("Metadata provider not registered.");var ke=H(q,oe);if(ke!==me){if(!G(ke))return!1;var Ke=Z.get(q);G(Ke)&&(Ke=new p,Z.set(q,Ke)),Ke.set(oe,me)}return!0}}function _r(){var B;return!G(V)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&(B=o.Reflect[V]),G(B)&&(B=It()),!G(V)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&Object.defineProperty(o.Reflect,V,{enumerable:!1,configurable:!1,writable:!1,value:B}),B}function xn(B){var P=new E,I={isProviderFor:function(U,v){var q=P.get(U);return G(q)?!1:q.has(v)},OrdinaryDefineOwnMetadata:be,OrdinaryHasOwnMetadata:Z,OrdinaryGetOwnMetadata:Se,OrdinaryOwnMetadataKeys:te,OrdinaryDeleteMetadata:H};return N.registerProvider(I),I;function L(U,v,q){var oe=P.get(U),me=!1;if(G(oe)){if(!q)return;oe=new p,P.set(U,oe),me=!0}var ke=oe.get(v);if(G(ke)){if(!q)return;if(ke=new p,oe.set(v,ke),!B.setProvider(U,v,I))throw oe.delete(v),me&&P.delete(U),new Error("Wrong provider for target.")}return ke}function Z(U,v,q){var oe=L(v,q,!1);return G(oe)?!1:Mt(oe.has(U))}function Se(U,v,q){var oe=L(v,q,!1);if(!G(oe))return oe.get(U)}function be(U,v,q,oe){var me=L(q,oe,!0);me.set(U,v)}function te(U,v){var q=[],oe=L(U,v,!1);if(G(oe))return q;for(var me=oe.keys(),ke=le(me),Ke=0;;){var So=gt(ke);if(!So)return q.length=Ke,q;var Qn=lt(So);try{q[Ke]=Qn}catch(qr){try{Kt(ke)}finally{throw qr}}Ke++}}function H(U,v,q){var oe=L(v,q,!1);if(G(oe)||!oe.delete(U))return!1;if(oe.size===0){var me=P.get(v);G(me)||(me.delete(q),me.size===0&&P.delete(me))}return!0}}function hi(B){var P=B.defineMetadata,I=B.hasOwnMetadata,L=B.getOwnMetadata,Z=B.getOwnMetadataKeys,Se=B.deleteMetadata,be=new E,te={isProviderFor:function(H,U){var v=be.get(H);return!G(v)&&v.has(U)?!0:Z(H,U).length?(G(v)&&(v=new k,be.set(H,v)),v.add(U),!0):!1},OrdinaryDefineOwnMetadata:P,OrdinaryHasOwnMetadata:I,OrdinaryGetOwnMetadata:L,OrdinaryOwnMetadataKeys:Z,OrdinaryDeleteMetadata:Se};return te}function en(B,P,I){var L=N.getProvider(B,P);if(!G(L))return L;if(I){if(N.setProvider(B,P,C))return C;throw new Error("Illegal state.")}}function Hr(){var B={},P=[],I=function(){function te(H,U,v){this._index=0,this._keys=H,this._values=U,this._selector=v}return te.prototype["@@iterator"]=function(){return this},te.prototype[a]=function(){return this},te.prototype.next=function(){var H=this._index;if(H>=0&&H<this._keys.length){var U=this._selector(this._keys[H],this._values[H]);return H+1>=this._keys.length?(this._index=-1,this._keys=P,this._values=P):this._index++,{value:U,done:!1}}return{value:void 0,done:!0}},te.prototype.throw=function(H){throw this._index>=0&&(this._index=-1,this._keys=P,this._values=P),H},te.prototype.return=function(H){return this._index>=0&&(this._index=-1,this._keys=P,this._values=P),{value:H,done:!0}},te}(),L=function(){function te(){this._keys=[],this._values=[],this._cacheKey=B,this._cacheIndex=-2}return Object.defineProperty(te.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),te.prototype.has=function(H){return this._find(H,!1)>=0},te.prototype.get=function(H){var U=this._find(H,!1);return U>=0?this._values[U]:void 0},te.prototype.set=function(H,U){var v=this._find(H,!0);return this._values[v]=U,this},te.prototype.delete=function(H){var U=this._find(H,!1);if(U>=0){for(var v=this._keys.length,q=U+1;q<v;q++)this._keys[q-1]=this._keys[q],this._values[q-1]=this._values[q];return this._keys.length--,this._values.length--,De(H,this._cacheKey)&&(this._cacheKey=B,this._cacheIndex=-2),!0}return!1},te.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=B,this._cacheIndex=-2},te.prototype.keys=function(){return new I(this._keys,this._values,Z)},te.prototype.values=function(){return new I(this._keys,this._values,Se)},te.prototype.entries=function(){return new I(this._keys,this._values,be)},te.prototype["@@iterator"]=function(){return this.entries()},te.prototype[a]=function(){return this.entries()},te.prototype._find=function(H,U){if(!De(this._cacheKey,H)){this._cacheIndex=-1;for(var v=0;v<this._keys.length;v++)if(De(this._keys[v],H)){this._cacheIndex=v;break}}return this._cacheIndex<0&&U&&(this._cacheIndex=this._keys.length,this._keys.push(H),this._values.push(void 0)),this._cacheIndex},te}();return L;function Z(te,H){return te}function Se(te,H){return H}function be(te,H){return[te,H]}}function Ur(){var B=function(){function P(){this._map=new p}return Object.defineProperty(P.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),P.prototype.has=function(I){return this._map.has(I)},P.prototype.add=function(I){return this._map.set(I,I),this},P.prototype.delete=function(I){return this._map.delete(I)},P.prototype.clear=function(){this._map.clear()},P.prototype.keys=function(){return this._map.keys()},P.prototype.values=function(){return this._map.keys()},P.prototype.entries=function(){return this._map.entries()},P.prototype["@@iterator"]=function(){return this.keys()},P.prototype[a]=function(){return this.keys()},P}();return B}function vr(){var B=16,P=f.create(),I=L();return function(){function H(){this._key=L()}return H.prototype.has=function(U){var v=Z(U,!1);return v!==void 0?f.has(v,this._key):!1},H.prototype.get=function(U){var v=Z(U,!1);return v!==void 0?f.get(v,this._key):void 0},H.prototype.set=function(U,v){var q=Z(U,!0);return q[this._key]=v,this},H.prototype.delete=function(U){var v=Z(U,!1);return v!==void 0?delete v[this._key]:!1},H.prototype.clear=function(){this._key=L()},H}();function L(){var H;do H="@@WeakMap@@"+te();while(f.has(P,H));return P[H]=!0,H}function Z(H,U){if(!i.call(H,I)){if(!U)return;Object.defineProperty(H,I,{value:f.create()})}return H[I]}function Se(H,U){for(var v=0;v<U;++v)H[v]=Math.random()*255|0;return H}function be(H){if(typeof Uint8Array=="function"){var U=new Uint8Array(H);return typeof crypto<"u"?crypto.getRandomValues(U):typeof msCrypto<"u"?msCrypto.getRandomValues(U):Se(U,H),U}return Se(new Array(H),H)}function te(){var H=be(B);H[6]=H[6]&79|64,H[8]=H[8]&191|128;for(var U="",v=0;v<B;++v){var q=H[v];(v===4||v===6||v===8)&&(U+="-"),q<16&&(U+="0"),U+=q.toString(16).toLowerCase()}return U}}function tn(B){return B.__=void 0,delete B.__,B}})})(is||(is={}));const Le=[];for(let n=0;n<256;++n)Le.push((n+256).toString(16).slice(1));function dc(n,t=0){return(Le[n[t+0]]+Le[n[t+1]]+Le[n[t+2]]+Le[n[t+3]]+"-"+Le[n[t+4]]+Le[n[t+5]]+"-"+Le[n[t+6]]+Le[n[t+7]]+"-"+Le[n[t+8]]+Le[n[t+9]]+"-"+Le[n[t+10]]+Le[n[t+11]]+Le[n[t+12]]+Le[n[t+13]]+Le[n[t+14]]+Le[n[t+15]]).toLowerCase()}const uc=new Uint8Array(16);function fc(){return crypto.getRandomValues(uc)}function qt(n,t,o){return crypto.randomUUID?crypto.randomUUID():mc(n)}function mc(n,t,o){var r;n=n||{};const i=n.random??((r=n.rng)==null?void 0:r.call(n))??fc();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,dc(i)}class Xe{static UUID(){return qt()}static GUID(){const t=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}function hc(n){var t=[];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 o=n.shift();n[0]=o+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i<n.length;i++){var r=n[i];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(i>0&&(r=r.replace(/^[\/]+/,"")),i<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),t.push(r))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function xi(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),hc(n)}class xe{static Capitalize(t){return t?t[0].toUpperCase()+t.slice(1):""}static BuildSafeUrl(t,o,i){try{const r=new URL(t);return o&&(r.port=o.toString()),xi(r.toString(),i)}catch{throw new Error(`Invalid host URL: ${t}`)}}static ToCamelCase(t){const o=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return t.match(o).map((r,s)=>s===0?r.toLowerCase():xe.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(t,o,i){return t.substring(t.indexOf(o)+2,t.lastIndexOf(i))}static Translit(t,o){const i={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 o&&/[а-яА-Я]/g.test(t)?t.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(i).find(c=>i[c]===r);return a||""}const s=Object.keys(i).find(a=>i[a]===r.toLowerCase());return s?s.toUpperCase():""}):t.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?i[r]:i[r.toLowerCase()].toUpperCase())}static RemoveEmoji(t){const o=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return t.replace(o,"")}static CanBeTranslited(t){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(t)}static StringsEquals(t,o){const i=t.toLowerCase().replaceAll(/\s/g,""),r=o.toLowerCase().replaceAll(/\s/g,""),s=xe.Translit(i),a=xe.Translit(r);return i.includes(r)||s.includes(r)||i.includes(a)}static SearchIn(t,o){return xe.StringsEquals(t,o)}static SearchInFields(t,o){let i=!1;for(let r=0;r<o.length;r++)if(xe.SearchIn(o[r],t)){i=!0;break}return i}static FormatToPercentage(t){return`${t}%`}static ApplyClassToSubStr(t,o,i){const r=i??"highlight-text",s=new RegExp(xe.GetVariants(o).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const o=xe.Translit(t);return[t,xe.Capitalize(t),t.toLowerCase(),t.toUpperCase(),o,xe.Capitalize(o),o.toLowerCase(),o.toUpperCase()]}static ContainsNum(t){return/\d/.test(t)}static JoinSnake(...t){return t.join("_")}static GetDynamicCountName(t,o){const i=[2,0,1,1,1,2];return t.length+" "+o[t.length%100>4&&t.length%100<20?2:i[t.length%10<5?t.length%10:5]]}static TrimText(t){return typeof t=="string"?t.trim():t}}const Yt=class Yt{static BuildClass(t,o){o&&Object.keys(o).forEach(i=>{const r=o[i];if(this.isPrimitive(r))t[i]instanceof Date?t[i]=new Date(r):t[i]=r;else if(r!=null&&!Array.isArray(r))if(t[i]&&t[i].constructor)t[i]=new t[i].constructor(r);else{const s=Reflect.getMetadata(i,t);s&&(t[i]=new s[i](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(i,t);r.length!==0&&!s&&(t[i]=r),s&&(t[i]=r.map(a=>new s[i](a)))}})}static isPrimitive(t){return t!==null&&typeof t<"u"&&t!==Object(t)}static RemoveFromClassByIndex(t,o,i){Yt.RemoveFromClass(t,o,i)}static RemoveFromClassById(t,o,i){if(!t)return;const r=o.findIndex(s=>s.id===t);if(!(r<0))return Yt.RemoveFromClass(r,o,i),t}static RemoveFromClass(t,o,i){if(t<0)return;const r=o[t].id;r&&i&&i.push(r),o.splice(t,1)}static GetPropertyName(t){const o=new t;return new Proxy(o,{get(i,r){return r}})}static InitClassInstance(t,o){const i=t.constructor(o);return Yt.BuildClass(i),i.id=Xe.UUID(),i}static ExistsWithId(t,o){return t.some(i=>i.id===o)}static DeepMap(t){return o=>Array.isArray(o)?o.map(Yt.DeepMap(t)):Object(o)===o?Object.fromEntries(Object.entries(o).map(([i,r])=>[i,Yt.DeepMap(t)(r)])):t(o)}static DeepTrim(t){return this.DeepMap(xe.TrimText)(t)}};d(Yt,"GetClassConstructor",t=>(o,i)=>{const r=Reflect.getMetadata(`property:${i}`,o)||{};r[i]=t,Reflect.defineMetadata(i,r,o)});let K=Yt,Zn=class Ll{constructor(t){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");K.BuildClass(this,t)}static Create(){const t=new Ll;return t.id=Xe.UUID(),t}};class Ei{static Setup(t="http://localhost",o="9000",i="api"){this.staticUrl=xe.BuildSafeUrl(t,o,i),this.staticUrl=xi(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}d(Ei,"staticUrl","");class xt{constructor(t){d(this,"name","");d(this,"url","");d(this,"src","");d(this,"raw");d(this,"blob");d(this,"file");d(this,"type","");d(this,"id");d(this,"originalName","");d(this,"fileSystemPath","");d(this,"itemId");d(this,"itemOneId");d(this,"description","");d(this,"order",0);K.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${Ei.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,o){const i=new xt;return i.id=o??Xe.UUID(),i.originalName=t.name,i.file=t.blob,i.fileSystemPath=Xe.UUID(),i}setFile(t){this.id||(this.id=Xe.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=Xe.UUID(),this.url=t.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(t,o){if(t.target){let i="";return o&&(i=`@/assets/img/${o}`),new URL(i,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(t){const o=t.split(".");return o[o.length-1]}}class rs{constructor(t){d(this,"id");d(this,"name","");d(this,"surname","");d(this,"patronymic","");d(this,"isMale",!0);d(this,"dateBirth",new Date);d(this,"contactId");d(this,"slug","");d(this,"postIndex","");d(this,"address","");d(this,"editNameMode",!1);K.BuildClass(this,t)}setEditNameMode(t){this.editNameMode=t}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(t){return t?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=xe.Capitalize(this.name),this.surname=xe.Capitalize(this.surname),this.patronymic=xe.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(t){this.surname=t.surname,this.name=t.name,this.patronymic=t.patronymic}}class rn{constructor(t){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");K.BuildClass(this,t)}static Create(){const t=new rn;return t.id=Xe.UUID(),t}}class Po{constructor(t){d(this,"id");d(this,"address");d(this,"description");K.BuildClass(this,t)}}class Mo{constructor(t){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");K.BuildClass(this,t)}static Create(){const t=new Mo;return t.id=Xe.UUID(),t}}class Bi{constructor(t){d(this,"id");d(this,"address");d(this,"description");K.BuildClass(this,t)}}let pc=(Ht=class{},d(Ht,"Phone",rn),d(Ht,"FileInfo",xt),d(Ht,"Website",Bi),d(Ht,"Email",Zn),d(Ht,"Human",rs),d(Ht,"PostAddress",Po),d(Ht,"UserAccount",Mo),Ht);var Ee=(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))(Ee||{});class Io{constructor(t){d(this,"field","");d(this,"operator",Ee.Eq);d(this,"value","");K.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,o){return new Io({operator:o,field:t})}eq(t){return this.field===t.field&&this.operator===t.operator}isUnary(){return this.operator===Ee.Eq||this.operator===Ee.Gt||this.operator===Ee.Lt}isBetween(){return this.operator===Ee.Btw}isSet(){return this.operator===Ee.In}}class Vi{constructor(t){d(this,"model","");d(this,"field","");d(this,"value","");d(this,"wheres",[]);K.BuildClass(this,t)}static Create(t){const o=new Vi;return o.model=t.GetClassName(),o}eq(t){return t.model===this.model&&t.field===this.field}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Io.Create(t,o);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(o=>o.eq(t))}}let ss=class _l{constructor(t){d(this,"id");d(this,"model","");d(this,"wheres",[]);d(this,"joins",[]);K.BuildClass(this,t)}static Create(t){const o=new _l;return o.model=t.GetClassName(),o}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Io.Create(t,o);return this.wheres.push(r),r}removeWhere(t){const o=this.wheres.findIndex(i=>i.eq(t));o>-1&&this.wheres.splice(o,1)}addJoin(t){const o=this.findJoin({model:t.GetClassName()});if(o)return o;const i=Vi.Create(t);return this.joins.push(i),i}findJoin(t){return this.joins.find(o=>o.eq(t))}findWhere(t){return this.wheres.find(o=>o.eq(t))}toRef(){return e.ref(this)}};class Dt{static Shuffle(t){for(let o=t.length-1;o>0;o--){const i=Math.floor(Math.random()*(o+1));[t[o],t[i]]=[t[i],t[o]]}}static GenerateNumsRange(t,o,i=1){return Array.from({length:(o-t)/i+1},(r,s)=>t+s*i)}static GetLast(t){return t[t.length-1]}static GetFirst(t){return t[0]}static GetRandEL(t){return t[Math.floor(Math.random()*t.length)]}static Sort(t){t.forEach((o,i)=>o.order=i)}static Refill(t,o){t.splice(0,t.length),t.push(...o)}static Eq(t,o){return t.length===o.length&&(t==null?void 0:t.every((i,r)=>t[r]==o[r]))}static SwipeById(t,o,i){const r=t.findIndex(a=>o.id===a.id),s=t.findIndex(a=>i.id===a.id);r<0||s<0||([t[r],t[s]]=[t[s],t[r]])}static Swap(t,o,i){if(o<0||o>=t.length||i<0||i>=t.length)return;const r=t[o];t[o]=t[i],t[i]=r}static MoveUp(t,o){t[o].order=o-1,t[o-1]&&(t[o-1].order=o),[t[o],t[o-1]]=[t[o-1],t[o]]}static MoveDown(t,o){t[o].order=o+1,t[o+1]&&(t[o+1].order=o),[t[o],t[o+1]]=[t[o+1],t[o]]}}var Re=(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))(Re||{}),gc=Object.defineProperty,yc=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&gc(t,o,r),r};const as=class xo{constructor(t){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",Ee.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",Re.String);d(this,"set",[]);d(this,"isSet",!1);d(this,"joinTable","");d(this,"joinTableModel","");d(this,"joinTableFk","");d(this,"joinTablePk","");d(this,"joinTableId","");d(this,"joinTableIdCol","");K.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===Re.Join){const o=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===Ee.In?o&&Dt.Eq(this.set,t.set):o}return t.model===this.model&&t.col===this.col&&t.operator===this.operator}valueEq(t){return!this||!t||!this.eq(t)?!1:this.type===Re.Boolean?this.boolean===(t==null?void 0:t.boolean):this.type===Re.String?this.value1===(t==null?void 0:t.value1):this.type===Re.Join&&this.set.length?Dt.Eq(this.set,t.set):!1}toUrlQuery(){const t=this.type?`"type":"${this.type}"`:"",o=this.model?`"model":"${this.model}"`:"",i=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Re.Boolean?`"boolean":${this.boolean}`:"",c=this.type===Re.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===Re.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Re.Number?`"number":${this.number}`:"",f=this.type===Re.Set||this.operator===Ee.In?`"set":${JSON.stringify(this.set)}`:"",m=this.type===Re.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,o,i,r,s,a,c,l,u,f,m].filter(p=>p!=="").toString()}fromUrlQuery(t){this.model=t.get("model")??"",this.col=t.get("col")??"",this.label=t.get("label")??"",this.operator=t.get("operator")??"",this.value1=t.get("value1")??"",this.type=t.get("type")??"",this.boolean=!!(t.get("boolean")??""),this.joinTableModel=t.get("joinTableModel")??"",this.joinTableId=t.get("joinTableId")??"",this.joinTableFk=t.get("joinTableFk")??"",this.joinTableIdCol=t.get("joinTableIdCol")??"",this.joinTablePk=t.get("joinTablePk")??""}isUnaryFilter(){return this.operator===Ee.Eq||this.operator===Ee.Gt||this.operator===Ee.Lt}isBetweenFilter(){return this.operator===Ee.Btw}isSetFilter(){return this.operator===Ee.In}static Create(t,o,i){const r=new xo;return r.model=t.GetClassName(),r.col=o??"",r.type=i,r.type===Re.Number&&(r.value1="0"),r.type===Re.String&&(r.value1=""),r.type===Re.Boolean&&(r.value1="false",r.operator=Ee.Eq),r}static CreateFilterModelWithJoin(t,o,i,r,s,a,c,l){const u=new xo;return u.id=qt(),u.joinTable=i,u.joinTablePk=r,u.joinTableFk=s,u.col=o,u.type=a,c&&(u.joinTableId=c),l&&(u.joinTableIdCol=l),u}static CreateFilterModelWithJoinV2(t,o,i,r,s,a,c){const l=new xo;return l.model=t,l.joinTableModel=i,l.joinTablePk=r,l.joinTableFk=s,l.col=o,l.type=Re.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(t,o){const i=new xo;return i.id=qt(),i.model=xe.ToCamelCase(t.GetClassName()),i.joinTableModel=xe.ToCamelCase(o.GetClassName()),i.type=Re.Join,i}addToSet(...t){t.forEach(o=>{if(this.set.indexOf(o)===-1){this.set.push(o);return}this.set=this.set.filter(i=>i!==o)})}pushToSet(...t){t.forEach(o=>{this.set.indexOf(o)===-1&&this.set.push(o)})}replaceSet(...t){this.set=t}setBoolean(t){this.boolean=t}toRef(){return e.ref(this)}setDate1(t){this.date1=t}setDate2(t){this.date2=t}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(t,o){if(!t&&!o){this.dropDates();return}if(!o){this.setDate1(t),this.operator=Ee.Eq;return}this.setDate2(o),this.operator=Ee.Btw}};yc([K.GetClassConstructor(String)],as.prototype,"set");let Ni=as;class wc{constructor(){d(this,"operation",Ee.Lt);d(this,"column","");d(this,"value");d(this,"initial",!0);d(this,"tableName","");d(this,"version","");d(this,"model","")}toUrlQuery(){const t=this.operation?`"operation":"${this.operation}"`:"",o=this.column?`"column":"${this.column}"`:"",i=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=i?`"value":"${i}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[t,o,r,s,a].filter(c=>c!=="").toString()}fromUrlQuery(t){t.cursvalue&&(this.value=t.cursvalue),t.curscolumn&&(this.column=String(t.curscolumn)),t.cursinitial!==void 0&&(this.initial=!!t.cursinitial),t.curstableName&&(this.tableName=String(t.curstableName)),t.cursoperation&&(this.operation=t.cursoperation)}}class Ro{constructor(t){d(this,"page",0);d(this,"rowsPerPage",25);d(this,"rowsNumber",0);d(this,"cursor",new wc);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");K.BuildClass(this,t)}setLoadMore(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Ee.Gt,this.cursor.column=o,this.cursor.tableName=i,this.cursorMode=!0}setLoadMoreV2(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Ee.Gt,this.cursor.column=o,this.cursor.model=i,this.cursorMode=!0,this.version="v2"}setOffset(t){this.page=t}toUrlQuery(){const t=`"offset":${this.offset}`,o=`"limit":${this.limit}`,i=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[t,o,i,r,s,a].toString()}fromUrlQuery(){const t=window.location.search,o=t.substring(t.indexOf("p=")+2,t.lastIndexOf("|")),i=new URLSearchParams(decodeURIComponent(o));this.page=Number(i.get("offset")),this.rowsPerPage=Number(i.get("col"))}setAllLoaded(t){this.allLoaded=!(t>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,K.BuildClass(this)}}var dt=(n=>(n.Asc="asc",n.Desc="desc",n))(dt||{});class Ao{constructor(t){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);K.BuildClass(this,t)}static Create(t,o,i=dt.Asc,r,s){const a=new Ao;return a.model=t.GetClassName(),a.col=o??"",a.order=i??dt.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===dt.Asc}isDesc(){return this.order===dt.Desc}eq(t){return t.model===this.model&&t.col===this.col&&t.order===this.order}toUrlQuery(){const t=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",i=this.order?`"order":"${this.order}"`:"";return[t,o,i].toString()}async fromUrlQuery(){const t=window.location.search,o=t.substring(t.indexOf("s=")+2,t.indexOf("|")),i=new URLSearchParams(decodeURIComponent(o));this.model=i.get("model")??"",this.col=i.get("col")??"",this.label=i.get("label")??"",this.default=!!i.get("default"),this.order=i.get("order")??""}asc(){this.order=dt.Asc}desc(){this.order=dt.Desc}}class zo{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(t,o){const i=new zo;return i.model=t.GetClassName(),i.cols=o,i}}var bc=Object.defineProperty,Jn=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&bc(t,o,r),r};const $n=(ot=class{constructor(t){d(this,"id");d(this,"f",[]);d(this,"f2",[]);d(this,"s",[]);d(this,"p",new Ro);d(this,"t",new zo);K.BuildClass(this,t)}static Get(){return this.instance||(this.instance=e.reactive(new ot)),this.instance}createFrom(t){const o=new ot(JSON.parse(t));this.f=o.f}clearForHTTP(){const t=new ot(this);return t.f=this.f.map(o=>ot.EmptyEntiries(o)),t.f2=this.f2.map(o=>ot.EmptyEntiries(o)),t.s=this.s.map(o=>ot.EmptyEntiries(o)),t.p=ot.EmptyEntiries(this.p),t.t=ot.EmptyEntiries(this.t),t}static EmptyEntiries(t){if(!t)return;const i=Object.entries(t).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(i)}findFilterModel(t){return this.f.find(o=>t.id===o.id)}getFirstSortModel(){return Dt.GetLast(this.s)}setSortModel(t){t&&(this.s[0]=t)}setS(t){this.s[0]=t}setF(t){this.f.push(t)}setF2(t){this.f2.push(t)}replaceF(t,o){this.removeF(o),t&&this.setF(t)}removeF(t){const o=this.f.findIndex(i=>i.eq(t));K.RemoveFromClassByIndex(o,this.f)}reset(){this.f=[],this.s=[],this.p=new Ro}resetF(){this.f=[]}},d(ot,"instance"),ot);Jn([K.GetClassConstructor(Ni)],$n.prototype,"f"),Jn([K.GetClassConstructor(ss)],$n.prototype,"f2"),Jn([K.GetClassConstructor(Ao)],$n.prototype,"s"),Jn([K.GetClassConstructor(Ro)],$n.prototype,"p"),Jn([K.GetClassConstructor(zo)],$n.prototype,"t");let ut=$n,Cc=(Wn=class{},d(Wn,"SortModel",Ao),d(Wn,"FilterModel",Ni),d(Wn,"FilterModelV2",ss),d(Wn,"FTSP",ut),Wn);function ls(n,t){return function(){return n.apply(t,arguments)}}const{toString:Sc}=Object.prototype,{getPrototypeOf:Tn}=Object,{iterator:Kn,toStringTag:cs}=Symbol,Do=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),eo=(n,t)=>{let o=n;const i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),Do(o,t))return!0;o=Tn(o)}return!1},kc=(n,t)=>n!=null&&eo(n,t)?n[t]:void 0,$i=(n=>t=>{const o=Sc.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),yt=n=>(n=n.toLowerCase(),t=>$i(t)===n),Fo=n=>t=>typeof t===n,{isArray:sn}=Array,Pn=Fo("undefined");function Mn(n){return n!==null&&!Pn(n)&&n.constructor!==null&&!Pn(n.constructor)&&et(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const ds=yt("ArrayBuffer");function xc(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&ds(n.buffer),t}const Ec=Fo("string"),et=Fo("function"),us=Fo("number"),In=n=>n!==null&&typeof n=="object",Bc=n=>n===!0||n===!1,Oo=n=>{if(!In(n))return!1;const t=Tn(n);return(t===null||t===Object.prototype||Tn(t)===null)&&!eo(n,cs)&&!eo(n,Kn)},Vc=n=>{if(!In(n)||Mn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Nc=yt("Date"),$c=yt("File"),Tc=n=>!!(n&&typeof n.uri<"u"),Pc=n=>n&&typeof n.getParts<"u",Mc=yt("Blob"),Ic=yt("FileList"),Rc=n=>In(n)&&et(n.pipe);function Ac(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const fs=Ac(),ms=typeof fs.FormData<"u"?fs.FormData:void 0,zc=n=>{if(!n)return!1;if(ms&&n instanceof ms)return!0;const t=Tn(n);if(!t||t===Object.prototype||!et(n.append))return!1;const o=$i(n);return o==="formdata"||o==="object"&&et(n.toString)&&n.toString()==="[object FormData]"},Dc=yt("URLSearchParams"),[Fc,Oc,Lc,_c]=["ReadableStream","Request","Response","Headers"].map(yt),Hc=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function to(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),sn(n))for(i=0,r=n.length;i<r;i++)t.call(null,n[i],i,n);else{if(Mn(n))return;const s=o?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let c;for(i=0;i<a;i++)c=s[i],t.call(null,n[c],c,n)}}function hs(n,t){if(Mn(n))return null;t=t.toLowerCase();const o=Object.keys(n);let i=o.length,r;for(;i-- >0;)if(r=o[i],t===r.toLowerCase())return r;return null}const an=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ps=n=>!Pn(n)&&n!==an;function Ti(...n){const{caseless:t,skipUndefined:o}=ps(this)&&this||{},i={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&hs(i,a)||a,l=Do(i,c)?i[c]:void 0;Oo(l)&&Oo(s)?i[c]=Ti(l,s):Oo(s)?i[c]=Ti({},s):sn(s)?i[c]=s.slice():(!o||!Pn(s))&&(i[c]=s)};for(let s=0,a=n.length;s<a;s++){const c=n[s];if(!c||Mn(c)||(to(c,r),typeof c!="object"||sn(c)))continue;const l=Object.getOwnPropertySymbols(c);for(let u=0;u<l.length;u++){const f=l[u];Kc.call(c,f)&&r(c[f],f)}}return i}const Uc=(n,t,o,{allOwnKeys:i}={})=>(to(t,(r,s)=>{o&&et(r)?Object.defineProperty(n,s,{__proto__:null,value:ls(r,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),vc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),qc=(n,t,o,i)=>{n.prototype=Object.create(t.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),o&&Object.assign(n.prototype,o)},jc=(n,t,o,i)=>{let r,s,a;const c={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!i||i(a,n,t))&&!c[a]&&(t[a]=n[a],c[a]=!0);n=o!==!1&&Tn(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},Wc=(n,t,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=t.length;const i=n.indexOf(t,o);return i!==-1&&i===o},Gc=n=>{if(!n)return null;if(sn(n))return n;let t=n.length;if(!us(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},Qc=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Tn(Uint8Array)),Yc=(n,t)=>{const i=(n&&n[Kn]).call(n);let r;for(;(r=i.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},Xc=(n,t)=>{let o;const i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},Zc=yt("HTMLFormElement"),Jc=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,r){return i.toUpperCase()+r}),{propertyIsEnumerable:Kc}=Object.prototype,ed=yt("RegExp"),gs=(n,t)=>{const o=Object.getOwnPropertyDescriptors(n),i={};to(o,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(i[s]=a||r)}),Object.defineProperties(n,i)},td=n=>{gs(n,(t,o)=>{if(et(n)&&["arguments","caller","callee"].includes(o))return!1;const i=n[o];if(et(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},nd=(n,t)=>{const o={},i=r=>{r.forEach(s=>{o[s]=!0})};return sn(n)?i(n):i(String(n).split(t)),o},od=()=>{},id=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function rd(n){return!!(n&&et(n.append)&&n[cs]==="FormData"&&n[Kn])}const sd=n=>{const t=new WeakSet,o=i=>{if(In(i)){if(t.has(i))return;if(Mn(i))return i;if(!("toJSON"in i)){t.add(i);const r=sn(i)?[]:{};return to(i,(s,a)=>{const c=o(s);!Pn(c)&&(r[a]=c)}),t.delete(i),r}}return i};return o(n)},ad=yt("AsyncFunction"),ld=n=>n&&(In(n)||et(n))&&et(n.then)&&et(n.catch),ys=((n,t)=>n?setImmediate:t?((o,i)=>(an.addEventListener("message",({source:r,data:s})=>{r===an&&s===o&&i.length&&i.shift()()},!1),r=>{i.push(r),an.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",et(an.postMessage)),cd=typeof queueMicrotask<"u"?queueMicrotask.bind(an):typeof process<"u"&&process.nextTick||ys,ws=n=>n!=null&&et(n[Kn]),S={isArray:sn,isArrayBuffer:ds,isBuffer:Mn,isFormData:zc,isArrayBufferView:xc,isString:Ec,isNumber:us,isBoolean:Bc,isObject:In,isPlainObject:Oo,isEmptyObject:Vc,isReadableStream:Fc,isRequest:Oc,isResponse:Lc,isHeaders:_c,isUndefined:Pn,isDate:Nc,isFile:$c,isReactNativeBlob:Tc,isReactNative:Pc,isBlob:Mc,isRegExp:ed,isFunction:et,isStream:Rc,isURLSearchParams:Dc,isTypedArray:Qc,isFileList:Ic,forEach:to,merge:Ti,extend:Uc,trim:Hc,stripBOM:vc,inherits:qc,toFlatObject:jc,kindOf:$i,kindOfTest:yt,endsWith:Wc,toArray:Gc,forEachEntry:Yc,matchAll:Xc,isHTMLForm:Zc,hasOwnProperty:Do,hasOwnProp:Do,hasOwnInPrototypeChain:eo,getSafeProp:kc,reduceDescriptors:gs,freezeMethods:td,toObjectSet:nd,toCamelCase:Jc,noop:od,toFiniteNumber:id,findKey:hs,global:an,isContextDefined:ps,isSpecCompliantForm:rd,toJSONObject:sd,isAsyncFn:ad,isThenable:ld,setImmediate:ys,asap:cd,isIterable:ws,isSafeIterable:n=>n!=null&&eo(n,Kn)&&ws(n)},dd=S.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"]),ud=n=>{const t={};let o,i,r;return n&&n.split(`
15
+ `).forEach(function(a){r=a.indexOf(":"),o=a.substring(0,r).trim().toLowerCase(),i=a.substring(r+1).trim(),!(!o||t[o]&&dd[o])&&(o==="set-cookie"?t[o]?t[o].push(i):t[o]=[i]:t[o]=t[o]?t[o]+", "+i:i)}),t};function fd(n){let t=0,o=n.length;for(;t<o;){const i=n.charCodeAt(t);if(i!==9&&i!==32)break;t+=1}for(;o>t;){const i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}const md=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),hd=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Pi(n,t){return S.isArray(n)?n.map(o=>Pi(o,t)):fd(String(n).replace(t,""))}const pd=n=>Pi(n,md),gd=n=>Pi(n,hd);function bs(n){const t=Object.create(null);return S.forEach(n.toJSON(),(o,i)=>{t[i]=gd(o)}),t}const Cs=Symbol("internals");function no(n){return n&&String(n).trim().toLowerCase()}function Lo(n){return n===!1||n==null?n:S.isArray(n)?n.map(Lo):pd(String(n))}function yd(n){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=o.exec(n);)t[i[1]]=i[2];return t}const wd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Mi(n,t,o,i,r){if(S.isFunction(i))return i.call(this,t,o);if(r&&(t=o),!!S.isString(t)){if(S.isString(i))return t.indexOf(i)!==-1;if(S.isRegExp(i))return i.test(t)}}function bd(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,i)=>o.toUpperCase()+i)}function Cd(n,t){const o=S.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+o,{__proto__:null,value:function(r,s,a){return this[i].call(this,t,r,s,a)},configurable:!0})})}let qe=class{constructor(t){t&&this.set(t)}set(t,o,i){const r=this;function s(c,l,u){const f=no(l);if(!f)return;const m=S.findKey(r,f);(!m||r[m]===void 0||u===!0||u===void 0&&r[m]!==!1)&&(r[m||l]=Lo(c))}const a=(c,l)=>S.forEach(c,(u,f)=>s(u,f,l));if(S.isPlainObject(t)||t instanceof this.constructor)a(t,o);else if(S.isString(t)&&(t=t.trim())&&!wd(t))a(ud(t),o);else if(S.isObject(t)&&S.isSafeIterable(t)){let c=Object.create(null),l,u;for(const f of t){if(!S.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],S.hasOwnProp(c,u)?(l=c[u],c[u]=S.isArray(l)?[...l,f[1]]:[l,f[1]]):c[u]=f[1]}a(c,o)}else t!=null&&s(o,t,i);return this}get(t,o){if(t=no(t),t){const i=S.findKey(this,t);if(i){const r=this[i];if(!o)return r;if(o===!0)return yd(r);if(S.isFunction(o))return o.call(this,r,i);if(S.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=no(t),t){const i=S.findKey(this,t);return!!(i&&this[i]!==void 0&&(!o||Mi(this,this[i],i,o)))}return!1}delete(t,o){const i=this;let r=!1;function s(a){if(a=no(a),a){const c=S.findKey(i,a);c&&(!o||Mi(i,i[c],c,o))&&(delete i[c],r=!0)}}return S.isArray(t)?t.forEach(s):s(t),r}clear(t){const o=Object.keys(this);let i=o.length,r=!1;for(;i--;){const s=o[i];(!t||Mi(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const o=this,i={};return S.forEach(this,(r,s)=>{const a=S.findKey(i,s);if(a){o[a]=Lo(r),delete o[s];return}const c=t?bd(s):String(s).trim();c!==s&&delete o[s],o[c]=Lo(r),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return S.forEach(this,(i,r)=>{i!=null&&i!==!1&&(o[r]=t&&S.isArray(i)?i.join(", "):i)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(`
16
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const i=new this(t);return o.forEach(r=>i.set(r)),i}static accessor(t){const i=(this[Cs]=this[Cs]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=no(a);i[c]||(Cd(r,a),i[c]=!0)}return S.isArray(t)?t.forEach(s):s(t),this}};qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),S.reduceDescriptors(qe.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}}),S.freezeMethods(qe);const Sd="[REDACTED ****]";function kd(n){if(S.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(S.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function xd(n,t){const o=new Set(t.map(s=>String(s).toLowerCase())),i=[],r=s=>{if(s===null||typeof s!="object"||S.isBuffer(s))return s;if(i.indexOf(s)!==-1)return;s instanceof qe&&(s=s.toJSON()),i.push(s);let a;if(S.isArray(s))a=[],s.forEach((c,l)=>{const u=r(c);S.isUndefined(u)||(a[l]=u)});else{if(!S.isPlainObject(s)&&kd(s))return i.pop(),s;a=Object.create(null);for(const[c,l]of Object.entries(s)){const u=o.has(c.toLowerCase())?Sd:r(l);S.isUndefined(u)||(a[c]=u)}}return i.pop(),a};return r(n)}let _=class Hl extends Error{static from(t,o,i,r,s,a){const c=new Hl(t.message,o||t.code,i,r,s);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,o,i,r,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),i&&(this.config=i),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,o=t&&S.hasOwnProp(t,"redact")?t.redact:void 0,i=S.isArray(o)&&o.length>0?xd(t,o):S.toJSONObject(t);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:i,code:this.code,status:this.status}}};_.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",_.ERR_BAD_OPTION="ERR_BAD_OPTION",_.ECONNABORTED="ECONNABORTED",_.ETIMEDOUT="ETIMEDOUT",_.ECONNREFUSED="ECONNREFUSED",_.ERR_NETWORK="ERR_NETWORK",_.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",_.ERR_DEPRECATED="ERR_DEPRECATED",_.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",_.ERR_BAD_REQUEST="ERR_BAD_REQUEST",_.ERR_CANCELED="ERR_CANCELED",_.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",_.ERR_INVALID_URL="ERR_INVALID_URL",_.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Ed=null,Ss=100;function Ii(n){return S.isPlainObject(n)||S.isArray(n)}function ks(n){return S.endsWith(n,"[]")?n.slice(0,-2):n}function Ri(n,t,o){return n?n.concat(t).map(function(r,s){return r=ks(r),!o&&s?"["+r+"]":r}).join(o?".":""):t}function Bd(n){return S.isArray(n)&&!n.some(Ii)}const Vd=S.toFlatObject(S,{},null,function(t){return/^is[A-Z]/.test(t)});function _o(n,t,o){if(!S.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,o=S.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,y){return!S.isUndefined(y[T])});const i=o.metaTokens,r=o.visitor||E,s=o.dots,a=o.indexes,c=o.Blob||typeof Blob<"u"&&Blob,l=o.maxDepth===void 0?Ss:o.maxDepth,u=c&&S.isSpecCompliantForm(t),f=[];if(!S.isFunction(r))throw new TypeError("visitor must be a function");function m(C){if(C===null)return"";if(S.isDate(C))return C.toISOString();if(S.isBoolean(C))return C.toString();if(!u&&S.isBlob(C))throw new _("Blob is not supported. Use a Buffer instead.");if(S.isArrayBuffer(C)||S.isTypedArray(C)){if(u&&typeof c=="function")return new c([C]);if(typeof Buffer<"u")return Buffer.from(C);throw new _("Blob is not supported. Use a Buffer instead.",_.ERR_NOT_SUPPORT)}return C}function p(C){if(C>l)throw new _("Object is too deeply nested ("+C+" levels). Max depth: "+l,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function k(C,T){if(l===1/0)return JSON.stringify(C);const y=[];return JSON.stringify(C,function($,R){if(!S.isObject(R))return R;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(R),p(T+y.length-1),R})}function E(C,T,y){let b=C;if(S.isReactNative(t)&&S.isReactNativeBlob(C))return t.append(Ri(y,T,s),m(C)),!1;if(C&&!y&&typeof C=="object"){if(S.endsWith(T,"{}"))T=i?T:T.slice(0,-2),C=k(C,1);else if(S.isArray(C)&&Bd(C)||(S.isFileList(C)||S.endsWith(T,"[]"))&&(b=S.toArray(C)))return T=ks(T),b.forEach(function(R,j){!(S.isUndefined(R)||R===null)&&t.append(a===!0?Ri([T],j,s):a===null?T:T+"[]",m(R))}),!1}return Ii(C)?!0:(t.append(Ri(y,T,s),m(C)),!1)}const V=Object.assign(Vd,{defaultVisitor:E,convertValue:m,isVisitable:Ii});function N(C,T,y=0){if(!S.isUndefined(C)){if(p(y),f.indexOf(C)!==-1)throw new Error("Circular reference detected in "+T.join("."));f.push(C),S.forEach(C,function($,R){(!(S.isUndefined($)||$===null)&&r.call(t,$,S.isString(R)?R.trim():R,T,V))===!0&&N($,T?T.concat(R):[R],y+1)}),f.pop()}}if(!S.isObject(n))throw new TypeError("data must be an object");return N(n),t}function xs(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function Ai(n,t){this._pairs=[],n&&_o(n,this,t)}const Es=Ai.prototype;Es.append=function(t,o){this._pairs.push([t,o])},Es.toString=function(t){const o=t?i=>t.call(this,i,xs):xs;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};function Nd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Bs(n,t,o){if(!t)return n;n=n||"";const i=S.isFunction(o)?{serialize:o}:o,r=S.getSafeProp(i,"encode")||Nd,s=S.getSafeProp(i,"serialize");let a;if(s?a=s(t,i):a=S.isURLSearchParams(t)?t.toString():new Ai(t,i).toString(r),a){const c=n.indexOf("#");c!==-1&&(n=n.slice(0,c)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Vs{constructor(){this.handlers=[]}use(t,o,i){return this.handlers.push({fulfilled:t,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){S.forEach(this.handlers,function(i){i!==null&&t(i)})}}const zi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},$d={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ai,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Di=typeof window<"u"&&typeof document<"u",Fi=typeof navigator=="object"&&navigator||void 0,Td=Di&&(!Fi||["ReactNative","NativeScript","NS"].indexOf(Fi.product)<0),Pd=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Md=Di&&window.location.href||"http://localhost",_e={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Di,hasStandardBrowserEnv:Td,hasStandardBrowserWebWorkerEnv:Pd,navigator:Fi,origin:Md},Symbol.toStringTag,{value:"Module"})),...$d};function Id(n,t){return _o(n,new _e.classes.URLSearchParams,{visitor:function(o,i,r,s){return _e.isNode&&S.isBuffer(o)?(this.append(i,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Ns=Ss;function $s(n){if(n>Ns)throw new _("FormData field is too deeply nested ("+n+" levels). Max depth: "+Ns,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Rd(n){const t=[],o=/\w+|\[(\w*)]/g;let i;for(;(i=o.exec(n))!==null;)$s(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function Ad(n){const t={},o=Object.keys(n);let i;const r=o.length;let s;for(i=0;i<r;i++)s=o[i],t[s]=n[s];return t}function Ts(n){function t(o,i,r,s){$s(s);let a=o[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=o.length;return a=!a&&S.isArray(r)?r.length:a,l?(S.hasOwnProp(r,a)?r[a]=S.isArray(r[a])?r[a].concat(i):[r[a],i]:r[a]=i,!c):((!S.hasOwnProp(r,a)||!S.isObject(r[a]))&&(r[a]=[]),t(o,i,r[a],s)&&S.isArray(r[a])&&(r[a]=Ad(r[a])),!c)}if(S.isFormData(n)&&S.isFunction(n.entries)){const o={};return S.forEachEntry(n,(i,r)=>{t(Rd(i),r,o,0)}),o}return null}const Rn=(n,t)=>n!=null&&S.hasOwnProp(n,t)?n[t]:void 0;function zd(n,t,o){if(S.isString(n))try{return(t||JSON.parse)(n),S.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}const oo={transitional:zi,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const i=o.getContentType()||"",r=i.indexOf("application/json")>-1,s=S.isObject(t);if(s&&S.isHTMLForm(t)&&(t=new FormData(t)),S.isFormData(t))return r?JSON.stringify(Ts(t)):t;if(S.isArrayBuffer(t)||S.isBuffer(t)||S.isStream(t)||S.isFile(t)||S.isBlob(t)||S.isReadableStream(t))return t;if(S.isArrayBufferView(t))return t.buffer;if(S.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){const l=Rn(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return Id(t,l).toString();if((c=S.isFileList(t))||i.indexOf("multipart/form-data")>-1){const u=Rn(this,"env"),f=u&&u.FormData;return _o(c?{"files[]":t}:t,f&&new f,l)}}return s||r?(o.setContentType("application/json",!1),zd(t)):t}],transformResponse:[function(t){const o=Rn(this,"transitional")||oo.transitional,i=o&&o.forcedJSONParsing,r=Rn(this,"responseType"),s=r==="json";if(S.isResponse(t)||S.isReadableStream(t))return t;if(t&&S.isString(t)&&(i&&!r||s)){const c=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t,Rn(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?_.from(l,_.ERR_BAD_RESPONSE,this,null,Rn(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_e.classes.FormData,Blob:_e.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};S.forEach(["delete","get","head","post","put","patch","query"],n=>{oo.headers[n]={}});function Oi(n,t){const o=this||oo,i=t||o,r=qe.from(i.headers);let s=i.data;return S.forEach(n,function(c){s=c.call(o,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Ps(n){return!!(n&&n.__CANCEL__)}let io=class extends _{constructor(t,o,i){super(t??"canceled",_.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}};function Ms(n,t,o){const i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):t(new _("Request failed with status code "+o.status,o.status>=400&&o.status<500?_.ERR_BAD_REQUEST:_.ERR_BAD_RESPONSE,o.config,o.request,o))}function Dd(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Fd(n,t){n=n||10;const o=new Array(n),i=new Array(n);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=i[s];a||(a=u),o[r]=l,i[r]=u;let m=s,p=0;for(;m!==r;)p+=o[m++],m=m%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<t)return;const k=f&&u-f;return k?Math.round(p*1e3/k):void 0}}function Od(n,t){let o=0,i=1e3/t,r,s;const a=(u,f=Date.now())=>{o=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),m=f-o;m>=i?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},i-m)))},()=>r&&a(r)]}const Ho=(n,t,o=3)=>{let i=0;const r=Fd(50,250);return Od(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=c!=null?Math.min(a,c):a,u=Math.max(0,l-i),f=r(u);i=Math.max(i,l);const m={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:f||void 0,estimated:f&&c?(c-l)/f:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};n(m)},o)},Is=(n,t)=>{const o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},Rs=n=>(...t)=>S.asap(()=>n(...t)),Ld=_e.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,_e.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(_e.origin),_e.navigator&&/(msie|trident)/i.test(_e.navigator.userAgent)):()=>!0,_d=_e.hasStandardBrowserEnv?{write(n,t,o,i,r,s,a){if(typeof document>"u")return;const c=[`${n}=${encodeURIComponent(t)}`];S.isNumber(o)&&c.push(`expires=${new Date(o).toUTCString()}`),S.isString(i)&&c.push(`path=${i}`),S.isString(r)&&c.push(`domain=${r}`),s===!0&&c.push("secure"),S.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let o=0;o<t.length;o++){const i=t[o].replace(/^\s+/,""),r=i.indexOf("=");if(r!==-1&&i.slice(0,r)===n)try{return decodeURIComponent(i.slice(r+1))}catch{return i.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Hd(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Ud(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const vd=/^https?:(?!\/\/)/i,qd=/[\t\n\r]/g;function jd(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function Wd(n){return jd(n).replace(qd,"")}function As(n,t){if(typeof n=="string"&&vd.test(Wd(n)))throw new _('Invalid URL: missing "//" after protocol',_.ERR_INVALID_URL,t)}function zs(n,t,o,i){As(t,i);let r=!Hd(t);return n&&(r||o===!1)?(As(n,i),Ud(n,t)):t}const Ds=n=>n instanceof qe?{...n}:n;function ln(n,t){n=n||{},t=t||{};const o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(f,m,p,k){return S.isPlainObject(f)&&S.isPlainObject(m)?S.merge.call({caseless:k},f,m):S.isPlainObject(m)?S.merge({},m):S.isArray(m)?m.slice():m}function r(f,m,p,k){if(S.isUndefined(m)){if(!S.isUndefined(f))return i(void 0,f,p,k)}else return i(f,m,p,k)}function s(f,m){if(!S.isUndefined(m))return i(void 0,m)}function a(f,m){if(S.isUndefined(m)){if(!S.isUndefined(f))return i(void 0,f)}else return i(void 0,m)}function c(f){const m=S.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!S.isUndefined(m))if(S.isPlainObject(m)){if(S.hasOwnProp(m,f))return m[f]}else return;const p=S.hasOwnProp(n,"transitional")?n.transitional:void 0;if(S.isPlainObject(p)&&S.hasOwnProp(p,f))return p[f]}function l(f,m,p){if(S.hasOwnProp(t,p))return i(f,m);if(S.hasOwnProp(n,p))return i(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:l,headers:(f,m,p)=>r(Ds(f),Ds(m),p,!0)};return S.forEach(Object.keys({...n,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const p=S.hasOwnProp(u,m)?u[m]:r,k=S.hasOwnProp(n,m)?n[m]:void 0,E=S.hasOwnProp(t,m)?t[m]:void 0,V=p(k,E,m);S.isUndefined(V)&&p!==l||(o[m]=V)}),S.hasOwnProp(t,"validateStatus")&&S.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(S.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}const Gd=["content-type","content-length"];function Qd(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,r])=>{Gd.includes(i.toLowerCase())&&n.set(i,r)})}const Yd=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function Fs(n){const t=ln({},n),o=p=>S.hasOwnProp(t,p)?t[p]:void 0,i=o("data");let r=o("withXSRFToken");const s=o("xsrfHeaderName"),a=o("xsrfCookieName");let c=o("headers");const l=o("auth"),u=o("baseURL"),f=o("allowAbsoluteUrls"),m=o("url");if(t.headers=c=qe.from(c),t.url=Bs(zs(u,m,f,t),o("params"),o("paramsSerializer")),l){const p=S.getSafeProp(l,"username")||"",k=S.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(p+":"+(k?Yd(k):"")))}catch(E){throw _.from(E,_.ERR_BAD_OPTION_VALUE,n)}}if(S.isFormData(i)&&(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv||S.isReactNative(i)?c.setContentType(void 0):S.isFunction(i.getHeaders)&&Qd(c,i.getHeaders(),o("formDataHeaderPolicy"))),_e.hasStandardBrowserEnv&&(S.isFunction(r)&&(r=r(t)),r===!0||r==null&&Ld(t.url))){const k=s&&a&&_d.read(a);k&&c.set(s,k)}return t}const Xd=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(o,i){const r=Fs(n);let s=r.data;const a=qe.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,f,m,p,k,E;function V(){k&&k(),E&&E(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let N=new XMLHttpRequest;N.open(r.method.toUpperCase(),r.url,!0),N.timeout=r.timeout;function C(){if(!N)return;const y=qe.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),$={data:!c||c==="text"||c==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:y,config:n,request:N};Ms(function(j){o(j),V()},function(j){i(j),V()},$),N=null}"onloadend"in N?N.onloadend=C:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.startsWith("file:"))||setTimeout(C)},N.onabort=function(){N&&(i(new _("Request aborted",_.ECONNABORTED,n,N)),V(),N=null)},N.onerror=function(b){const $=b&&b.message?b.message:"Network Error",R=new _($,_.ERR_NETWORK,n,N);R.event=b||null,i(R),V(),N=null},N.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const $=r.transitional||zi;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),i(new _(b,$.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,n,N)),V(),N=null},s===void 0&&a.setContentType(null),"setRequestHeader"in N&&S.forEach(bs(a),function(b,$){N.setRequestHeader($,b)}),S.isUndefined(r.withCredentials)||(N.withCredentials=!!r.withCredentials),c&&c!=="json"&&(N.responseType=r.responseType),u&&([p,E]=Ho(u,!0),N.addEventListener("progress",p)),l&&N.upload&&([m,k]=Ho(l),N.upload.addEventListener("progress",m),N.upload.addEventListener("loadend",k)),(r.cancelToken||r.signal)&&(f=y=>{N&&(i(!y||y.type?new io(null,n,N):y),N.abort(),V(),N=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const T=Dd(r.url);if(T&&!_e.protocols.includes(T)){i(new _("Unsupported protocol "+T+":",_.ERR_BAD_REQUEST,n)),V();return}N.send(s||null)})},Zd=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const o=new AbortController;let i=!1;const r=function(l){if(!i){i=!0,a();const u=l instanceof Error?l:this.reason;o.abort(u instanceof _?u:new io(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,r(new _(`timeout of ${t}ms exceeded`,_.ETIMEDOUT))},t);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(l=>{l.unsubscribe?l.unsubscribe(r):l.removeEventListener("abort",r)}),n=null)};n.forEach(l=>l.addEventListener("abort",r,{once:!0}));const{signal:c}=o;return c.unsubscribe=()=>S.asap(a),c},Jd=function*(n,t){let o=n.byteLength;if(o<t){yield n;return}let i=0,r;for(;i<o;)r=i+t,yield n.slice(i,r),i=r},Kd=async function*(n,t){for await(const o of eu(n))yield*Jd(o,t)},eu=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:o,value:i}=await t.read();if(o)break;yield i}}finally{await t.cancel()}},Os=(n,t,o,i)=>{const r=Kd(n,t);let s=0,a,c=l=>{a||(a=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:u,value:f}=await r.next();if(u){c(),l.close();return}let m=f.byteLength;if(o){let p=s+=m;o(p)}l.enqueue(new Uint8Array(f))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},Uo=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,tu=(n,t,o)=>t+2<o&&Uo(n.charCodeAt(t+1))&&Uo(n.charCodeAt(t+2));function nu(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const o=n.slice(5,t),i=n.slice(t+1);if(/;base64/i.test(o)){let a=i.length;const c=i.length;for(let k=0;k<c;k++)if(i.charCodeAt(k)===37&&k+2<c){const E=i.charCodeAt(k+1),V=i.charCodeAt(k+2);Uo(E)&&Uo(V)&&(a-=2,k+=2)}let l=0,u=c-1;const f=k=>k>=2&&i.charCodeAt(k-2)===37&&i.charCodeAt(k-1)===51&&(i.charCodeAt(k)===68||i.charCodeAt(k)===100);u>=0&&(i.charCodeAt(u)===61?(l++,u--):f(u)&&(l++,u-=3)),l===1&&u>=0&&(i.charCodeAt(u)===61||f(u))&&l++;const p=Math.floor(a/4)*3-(l||0);return p>0?p:0}let s=0;for(let a=0,c=i.length;a<c;a++){const l=i.charCodeAt(a);if(l===37&&tu(i,a,c))s+=1,a+=2;else if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&a+1<c){const u=i.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Li="1.18.1",Ls=64*1024,{isFunction:vo}=S,ou=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),_s=n=>{if(!S.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Hs=(n,...t)=>{try{return!!n(...t)}catch{return!1}},iu=n=>{const t=n.indexOf("://");let o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},ru=n=>{const t=S.global!==void 0&&S.global!==null?S.global:globalThis,{ReadableStream:o,TextEncoder:i}=t;n=S.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,c=r?vo(r):typeof fetch=="function",l=vo(s),u=vo(a);if(!c)return!1;const f=c&&vo(o),m=c&&(typeof i=="function"?(C=>T=>C.encode(T))(new i):async C=>new Uint8Array(await new s(C).arrayBuffer())),p=l&&f&&Hs(()=>{let C=!1;const T=new s(_e.origin,{body:new o,method:"POST",get duplex(){return C=!0,"half"}}),y=T.headers.has("Content-Type");return T.body!=null&&T.body.cancel(),C&&!y}),k=u&&f&&Hs(()=>S.isReadableStream(new a("").body)),E={stream:k&&(C=>C.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!E[C]&&(E[C]=(T,y)=>{let b=T&&T[C];if(b)return b.call(T);throw new _(`Response type '${C}' is not supported`,_.ERR_NOT_SUPPORT,y)})});const V=async C=>{if(C==null)return 0;if(S.isBlob(C))return C.size;if(S.isSpecCompliantForm(C))return(await new s(_e.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(S.isArrayBufferView(C)||S.isArrayBuffer(C))return C.byteLength;if(S.isURLSearchParams(C)&&(C=C+""),S.isString(C))return(await m(C)).byteLength},N=async(C,T)=>{const y=S.toFiniteNumber(C.getContentLength());return y??V(T)};return async C=>{let{url:T,method:y,data:b,signal:$,cancelToken:R,timeout:j,onDownloadProgress:se,onUploadProgress:ze,responseType:Te,headers:Ne,withCredentials:Je="same-origin",fetchOptions:pt,maxContentLength:ye,maxBodyLength:Ce}=Fs(C);const Ct=S.isNumber(ye)&&ye>-1,Zt=S.isNumber(Ce)&&Ce>-1,Gn=ae=>S.hasOwnProp(C,ae)?C[ae]:void 0;let Cn=r||fetch;Te=Te?(Te+"").toLowerCase():"text";let it=Zd([$,R&&R.toAbortSignal()],j),he=null;const G=it&&it.unsubscribe&&(()=>{it.unsubscribe()});let Qe,Pt=null;const we=()=>new _("Request body larger than maxBodyLength limit",_.ERR_BAD_REQUEST,C,he);try{let ae;const ve=Gn("auth");if(ve){const ee=S.getSafeProp(ve,"username")||"",le=S.getSafeProp(ve,"password")||"";ae={username:ee,password:le}}if(iu(T)){const ee=new URL(T,_e.origin);if(!ae&&(ee.username||ee.password)){const le=_s(ee.username),lt=_s(ee.password);ae={username:le,password:lt}}(ee.username||ee.password)&&(ee.username="",ee.password="",T=ee.href)}if(ae&&(Ne.delete("authorization"),Ne.set("Authorization","Basic "+btoa(ou((ae.username||"")+":"+(ae.password||""))))),Ct&&typeof T=="string"&&T.startsWith("data:")&&nu(T)>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,C,he);if(Zt&&y!=="get"&&y!=="head"){const ee=await V(b);if(typeof ee=="number"&&isFinite(ee)&&(Qe=ee,ee>Ce))throw we()}const Mt=Zt&&(S.isReadableStream(b)||S.isStream(b)),Sn=(ee,le,lt)=>Os(ee,Ls,gt=>{if(Zt&&gt>Ce)throw Pt=we();le&&le(gt)},lt);if(p&&y!=="get"&&y!=="head"&&(ze||Mt)){if(Qe=Qe??await N(Ne,b),Qe!==0||Mt){let ee=new s(T,{method:"POST",body:b,duplex:"half"}),le;if(S.isFormData(b)&&(le=ee.headers.get("content-type"))&&Ne.setContentType(le),ee.body){const[lt,gt]=ze&&Is(Qe,Ho(Rs(ze)))||[];b=Sn(ee.body,lt,gt)}}}else if(Mt&&!l&&f&&y!=="get"&&y!=="head")b=Sn(b);else if(Mt&&l&&!p&&y!=="get"&&y!=="head")throw new _("Stream request bodies are not supported by the current fetch implementation",_.ERR_NOT_SUPPORT,C,he);S.isString(Je)||(Je=Je?"include":"omit");const rt=l&&"credentials"in s.prototype;if(S.isFormData(b)){const ee=Ne.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Ne.delete("content-type")}Ne.set("User-Agent","axios/"+Li,!1);const st={...pt,signal:it,method:y.toUpperCase(),headers:bs(Ne.normalize()),body:b,duplex:"half",credentials:rt?Je:void 0};he=l&&new s(T,st);let Ye=await(l?Cn(he,pt):Cn(T,st));const Jt=qe.from(Ye.headers);if(Ct){const ee=S.toFiniteNumber(Jt.getContentLength());if(ee!=null&&ee>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,C,he)}const Ut=k&&(Te==="stream"||Te==="response");if(k&&Ye.body&&(se||Ct||Ut&&G)){const ee={};["status","statusText","headers"].forEach(It=>{ee[It]=Ye[It]});const le=S.toFiniteNumber(Jt.getContentLength()),[lt,gt]=se&&Is(le,Ho(Rs(se),!0))||[];let Kt=0;const kn=It=>{if(Ct&&(Kt=It,Kt>ye))throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,C,he);lt&&lt(It)};Ye=new a(Os(Ye.body,Ls,kn,()=>{gt&&gt(),G&&G()}),ee)}Te=Te||"text";let De=await E[S.findKey(E,Te)||"text"](Ye,C);if(Ct&&!k&&!Ut){let ee;if(De!=null&&(typeof De.byteLength=="number"?ee=De.byteLength:typeof De.size=="number"?ee=De.size:typeof De=="string"&&(ee=typeof i=="function"?new i().encode(De).byteLength:De.length)),typeof ee=="number"&&ee>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,C,he)}return!Ut&&G&&G(),await new Promise((ee,le)=>{Ms(ee,le,{data:De,headers:qe.from(Ye.headers),status:Ye.status,statusText:Ye.statusText,config:C,request:he})})}catch(ae){if(G&&G(),it&&it.aborted&&it.reason instanceof _){const ve=it.reason;throw ve.config=C,he&&(ve.request=he),ae!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:ae,writable:!0,enumerable:!1,configurable:!0}),ve}if(Pt)throw he&&!Pt.request&&(Pt.request=he),Pt;if(ae instanceof _)throw he&&!ae.request&&(ae.request=he),ae;if(ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)){const ve=new _("Network Error",_.ERR_NETWORK,C,he,ae&&ae.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:ae.cause||ae,writable:!0,enumerable:!1,configurable:!0}),ve}throw _.from(ae,ae&&ae.code,C,he,ae&&ae.response)}}},su=new Map,Us=n=>{let t=n&&n.env||{};const{fetch:o,Request:i,Response:r}=t,s=[i,r,o];let a=s.length,c=a,l,u,f=su;for(;c--;)l=s[c],u=f.get(l),u===void 0&&f.set(l,u=c?new Map:ru(t)),f=u;return u};Us();const _i={http:Ed,xhr:Xd,fetch:{get:Us}};S.forEach(_i,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const vs=n=>`- ${n}`,au=n=>S.isFunction(n)||n===null||n===!1;function lu(n,t){n=S.isArray(n)?n:[n];const{length:o}=n;let i,r;const s={};for(let a=0;a<o;a++){i=n[a];let c;if(r=i,!au(i)&&(r=_i[(c=String(i)).toLowerCase()],r===void 0))throw new _(`Unknown adapter '${c}'`);if(r&&(S.isFunction(r)||(r=r.get(t))))break;s[c||"#"+a]=r}if(!r){const a=Object.entries(s).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let c=o?a.length>1?`since :
17
+ `+a.map(vs).join(`
18
+ `):" "+vs(a[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+c,_.ERR_NOT_SUPPORT)}return r}const qs={getAdapter:lu,adapters:_i};function Hi(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new io(null,n)}function js(n){return Hi(n),n.headers=qe.from(n.headers),n.data=Oi.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),qs.getAdapter(n.adapter||oo.adapter,n)(n).then(function(i){Hi(n),n.response=i;try{i.data=Oi.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=qe.from(i.headers),i},function(i){if(!Ps(i)&&(Hi(n),i&&i.response)){n.response=i.response;try{i.response.data=Oi.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=qe.from(i.response.headers)}return Promise.reject(i)})}const qo={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{qo[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const Ws={};qo.transitional=function(t,o,i){function r(s,a){return"[Axios v"+Li+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return(s,a,c)=>{if(t===!1)throw new _(r(a," has been removed"+(o?" in "+o:"")),_.ERR_DEPRECATED);return o&&!Ws[a]&&(Ws[a]=!0,console.warn(r(a," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(s,a,c):!0}},qo.spelling=function(t){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function cu(n,t,o){if(typeof n!="object"||n===null)throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let r=i.length;for(;r-- >0;){const s=i[r],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const c=n[s],l=c===void 0||a(c,s,n);if(l!==!0)throw new _("option "+s+" must be "+l,_.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new _("Unknown option "+s,_.ERR_BAD_OPTION)}}const jo={assertOptions:cu,validators:qo},je=jo.validators;let cn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Vs,response:new Vs}}async request(t,o){try{return await this._request(t,o)}catch(i){if(i 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(!i.stack)i.stack=s;else if(s){const a=s.indexOf(`
20
20
  `),c=a===-1?-1:s.indexOf(`
21
21
  `,a+1),l=c===-1?"":s.slice(c+1);String(i.stack).endsWith(l)||(i.stack+=`
22
- `+s)}}catch{}}throw i}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=an(this.defaults,o);const{transitional:i,paramsSerializer:r,headers:s}=o;i!==void 0&&vo.assertOptions(i,{silentJSONParsing:Qe.transitional(Qe.boolean),forcedJSONParsing:Qe.transitional(Qe.boolean),clarifyTimeoutError:Qe.transitional(Qe.boolean),legacyInterceptorReqResOrdering:Qe.transitional(Qe.boolean),advertiseZstdAcceptEncoding:Qe.transitional(Qe.boolean),validateStatusUndefinedResolves:Qe.transitional(Qe.boolean)},!1),r!=null&&(S.isFunction(r)?o.paramsSerializer={serialize:r}:vo.assertOptions(r,{encode:Qe.function,serialize:Qe.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),vo.assertOptions(o,{baseUrl:Qe.spelling("baseURL"),withXsrfToken:Qe.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&S.merge(s.common,s[o.method]);s&&S.forEach(["delete","get","head","post","put","patch","query","common"],C=>{delete s[C]}),o.headers=Ge.concat(a,s);const c=[];let l=!0;this.interceptors.request.forEach(function(N){if(typeof N.runWhen=="function"&&N.runWhen(o)===!1)return;l=l&&N.synchronous;const E=o.transitional||zi;E&&E.legacyInterceptorReqResOrdering?c.unshift(N.fulfilled,N.rejected):c.push(N.fulfilled,N.rejected)});const u=[];this.interceptors.response.forEach(function(N){u.push(N.fulfilled,N.rejected)});let f,h=0,p;if(!l){const C=[qs.bind(this),void 0];for(C.unshift(...c),C.push(...u),p=C.length,f=Promise.resolve(o);h<p;)f=f.then(C[h++],C[h++]);return f}p=c.length;let k=o;for(;h<p;){const C=c[h++],N=c[h++];try{k=C(k)}catch(E){N.call(this,E);break}}try{f=qs.call(this,k)}catch(C){return Promise.reject(C)}for(h=0,p=u.length;h<p;)f=f.then(u[h++],u[h++]);return f}getUri(t){t=an(this.defaults,t);const o=As(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Es(o,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){ln.prototype[t]=function(o,i){return this.request(an(i||{},{method:t,url:o,data:i&&S.hasOwnProp(i,"data")?i.data:void 0}))}}),S.forEach(["post","put","patch","query"],function(t){function o(i){return function(s,a,c){return this.request(an(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}ln.prototype[t]=o(),t!=="query"&&(ln.prototype[t+"Form"]=o(!0))});let cu=class Hl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(c=>{i.subscribe(c),s=c}).then(r);return a.cancel=function(){i.unsubscribe(s)},a},t(function(s,a,c){i.reason||(i.reason=new no(s,a,c),o(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const t=new AbortController,o=i=>{t.abort(i)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new Hl(function(r){t=r}),cancel:t}}};function du(n){return function(o){return n.apply(null,o)}}function uu(n){return S.isObject(n)&&n.isAxiosError===!0}const Ui={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(Ui).forEach(([n,t])=>{Ui[t]=n});function Ws(n){const t=new ln(n),o=as(ln.prototype.request,t);return S.extend(o,ln.prototype,t,{allOwnKeys:!0}),S.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return Ws(an(n,r))},o}const Ve=Ws(to);Ve.Axios=ln,Ve.CanceledError=no,Ve.CancelToken=cu,Ve.isCancel=Ts,Ve.VERSION=Li,Ve.toFormData=Oo,Ve.AxiosError=_,Ve.Cancel=Ve.CanceledError,Ve.all=function(t){return Promise.all(t)},Ve.spread=du,Ve.isAxiosError=uu,Ve.mergeConfig=an,Ve.AxiosHeaders=Ge,Ve.formToJSON=n=>$s(S.isHTMLForm(n)?new FormData(n):n),Ve.getAdapter=vs.getAdapter,Ve.HttpStatusCode=Ui,Ve.default=Ve;const{Axios:$w,AxiosError:Tw,CanceledError:Mw,isCancel:Pw,CancelToken:Iw,VERSION:Rw,all:Aw,Cancel:zw,isAxiosError:Dw,spread:Fw,toFormData:Ow,AxiosHeaders:Lw,HttpStatusCode:_w,formToJSON:Hw,getAdapter:Uw,mergeConfig:vw,create:qw}=Ve;var oo=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(oo||{});const io=(()=>{function n(){const l=r();return!(!l||l==="undefined")}function t(l){l.accessToken&&localStorage.setItem("access_token",l.accessToken),l.refreshToken&&localStorage.setItem("refresh_token",l.refreshToken)}function o(){const l=localStorage.getItem("user");return l?JSON.parse(l).id:""}function i(){const l=localStorage.getItem("user");if(l)return JSON.parse(l)}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 c(l){if(!n())return;const u=io.getUser();u&&(u.human=l,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:t,getAccessToken:r,getRefreshToken:s,getUserId:o,clearTokens:a,getUser:i,updateHuman:c}})();class vi{constructor(t){d(this,"code",400);d(this,"err","");K.BuildClass(this,t)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(t,o){const i=t.config;if(t.response){if(t.response.status===401&&!i._retry)return i._retry=!0,o.defaults.headers.common.token=io.getAccessToken(),t.config.headers.token=io.getAccessToken(),t.config.baseURL=void 0,o.request(i);if(t.response.status>=500){if(t.response.data==="неверный логин или пароль"){Nn.Error("Неверный логин или пароль");return}Nn.Error("Ошибка на сервере, попробуйте позже")}if(t.response.status>=400&&t.response.status<500){const r=new vi(t.response.data).getErr();r&&Nn.Error(r)}return Promise.reject(t)}}}const Rn=Ve.create();Rn.interceptors.response.use(n=>n,async n=>await vi.Handle(n,Rn));class ro{static async Get(t,o,i){return await Rn({method:oo.GET,url:t,headers:o,responseType:i})}static async Post(t,o,i,r){return o["Content-Type"]="multipart/form-data",await Rn({method:oo.POST,url:t,headers:o,responseType:i,data:r})}static async Put(t,o,i){return o["Content-Type"]="multipart/form-data",await Rn({method:oo.PUT,url:t,headers:o,data:i})}static async Delete(t,o){return await Rn({method:oo.DELETE,url:t,headers:o})}}class qo{constructor(t){d(this,"name","");K.BuildClass(this,t)}static Set(){}static Get(t,o){const i=sessionStorage.getItem(t);if(i){const r=JSON.parse(i),s=new Date,a=new Date(r.time),c=s.getTime()-a.getTime();return Math.round(c/6e4)>(o||10)?null:r.data}else return null}static async TryGet(t,o,i){let r;return r=qo.Get(t,i),r||(r=await o()),r}}var qi=(n=>(n.ContentType="Content-Type",n.Token="token",n))(qi||{}),Gs=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Gs||{});const pe=class pe{static Setup(t="http://localhost",o,i="api"){this.baseUrl=Ce.BuildSafeUrl(t,o,i),this.host=t,this.apiVersion=i}static newWebSocket(t){const o=this.host.replace("http","ws")+"/ws/"+t;return new WebSocket(o)}static download(t,o){const i=pe.getDownloadFileName(t,o.headers);if(!(o.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(o.data),s=document.createElement("a");s.href=r,s.setAttribute("download",i),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(t,o){if(t)return t;const i=o["content-disposition"];if(!i)return"file";const r=i.indexOf('"')+1,s=i.lastIndexOf('"'),a=i.substring(r,s);return a||"file"}static getHeaders(t){const o=xt.Get(ut.AccessToken);return t||(t=pe.headers),o&&(t[qi.Token]=o),t??pe.headers}static returnResponse(t,o){if(o)return t!=null&&t.isBlob?pe.download(t.downloadFileName,o):o.data}static async Get(t){return pe.returnResponse(t,await ro.Get(pe.buildUrl((t==null?void 0:t.query)??""),pe.getHeaders(t==null?void 0:t.headers),pe.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return pe.returnResponse(t,await ro.Post(pe.buildUrl(t==null?void 0:t.query),pe.getHeaders(t==null?void 0:t.headers),pe.getResponseType(t.isBlob),pe.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return pe.returnResponse(t,await ro.Put(pe.buildUrl(t==null?void 0:t.query),pe.getHeaders(t==null?void 0:t.headers),pe.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return pe.returnResponse(t,await ro.Delete(pe.buildUrl(t==null?void 0:t.query),pe.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:o}=t;return new EventSource(pe.buildUrl(o))}static buildUrl(t=""){try{return xi(this.baseUrl,t)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(t){return t?"blob":"json"}static createFormDataPayload(t,o){const i=new FormData;if(i.append("form",JSON.stringify(t)),o)for(const r of o)r.file&&i.append(r.id??"files",r.file,r.originalName);return i}};d(pe,"baseUrl",""),d(pe,"apiVersion","api"),d(pe,"host",""),d(pe,"headers",{[qi.ContentType]:Gs.ApplicationJson});let ke=pe;const D=(n,t)=>{const o=n.__vccOpts||n;for(const[i,r]of t)o[i]=r;return o},fu={},mu={style:{"text-align":"center"}};function hu(n,t){return e.openBlock(),e.createElementBlock("div",mu,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const Qs=D(fu,[["render",hu]]),pu=[{path:"/:pathMatch(.*)*",name:"NotFound",component:Qs}],pt=class pt{static Setup(t,o=""){this.router=t,this.title=o,this.ChangeDocumentTitle(),this.AddRoutes(pu)}static Get(){return this.router}static AddRoutes(t){t.forEach(o=>{this.Get().addRoute(o)})}static async To(t){await this.Get().push(t)}static async ToHome(){}static async Replace(t){await this.Get().replace(t)}static Id(){return pt.GetStringParam("id")}static Slug(){return pt.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return pt.GetStringQueryParam("qid")}static Route(){var t;return(t=this.Get())==null?void 0:t.currentRoute.value}static RouterPushBlank(t){const o=this.Get().resolve({path:t});window.open(o==null?void 0:o.href,"_blank")}static GetPath(){var o;const t=(o=pt.Route())==null?void 0:o.path.split("/");return!t||t.length<=0?"":t[t.length-1]}static async ToAdmin(t){if(!t){await this.Get().push("/admin");return}let o=t;o[0]==="/"&&(o=t.substring(1)),await pt.To(`/admin/${o}`)}static GetStringQueryParam(t){return String(this.Route().query[t])}static GetNumberQueryParam(t){return Number(this.Route().query[t]??0)}static GetStringParam(t){var o;return(o=this.Route())==null?void 0:o.params[t]}static SetQueryParam(t,o){const i=new URL(window.location);i.searchParams.set(t,String(o)),history.replaceState(null,"",i)}static Resolve(t){return this.Get().resolve(t)}};d(pt,"router"),d(pt,"title",""),d(pt,"ChangeDocumentTitle",(t="")=>{let o=pt.Route().meta.title??t;o&&(o=" | "+o),document.title=pt.title+o});let Bt=pt;class xe{constructor(t,o){d(this,"items",e.reactive([]));d(this,"item");d(this,"options",e.reactive([]));d(this,"count",e.ref(0));d(this,"classConstructor");d(this,"url","");d(this,"searchStr",e.ref(""));this.classConstructor=t,this.item=e.reactive(new this.classConstructor),this.url=o}Set(t){Object.assign(this.item,new this.classConstructor(t))}getUrl(t){return t?`${this.url}/${t}`:this.url}async GetOptions(t="name",o="id"){const i=`${this.getUrl()}/options/${t}/${o}`;try{const r=await ke.Get({query:i});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(t){try{let o;const i=ke.Get;t&&t.withCache?o=await qo.TryGet(this.getUrl(),i):o=await i({query:this.getUrl()}),Array.isArray(o)?this.SetAll(o):this.SetAllWithCount(o)}catch(o){console.warn("GetAll failed:",o)}}async Get(t){try{t||(t=Bt.Id()),this.Set(await ke.Get({query:this.getUrl(t)}))}catch(o){console.warn("Get failed:",o)}}async GetBySlug(t){try{t||(t=Bt.Slug()),this.Set(await z.H.HttpClient.Get({query:this.getUrl("by-slug/"+t)}))}catch(o){console.warn("GetBySlug failed:",o)}}async FTSP(t){var o;try{const r=((t==null?void 0:t.ftsp)??Ft.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await ke.Post(s);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(r.p.append){this.AppendToAll((o=a.data)==null?void 0:o.items);return}this.SetAllWithCount(a.data)}}catch(i){console.warn("FTSP failed:",i)}}async Create(t){try{const o=t??this.item,i={payload:o,query:this.getUrl()};return o.getFileInfos&&(i.fileInfos=o.getFileInfos()),await ke.Post(i)}catch(o){console.warn("Create failed:",o)}}async CreateAndSet(t){const o=await this.Create(t);this.Set(o)}async CreateMany(t){if(!t)return;const o=[];t.forEach(i=>{o.push(new Promise(()=>this.Create(i)))}),Promise.all(o)}async Update(t){try{const o=t??this.item,i={query:this.getUrl(`${o.id}`),payload:o};return o.getFileInfos&&(i.fileInfos=o.getFileInfos(),i.fileInfos.forEach(r=>r.url="")),await ke.Put(i)}catch(o){console.warn("Update failed:",o)}}async UpdateAndSet(t){const o=await this.Update(t);this.Set(o)}async UpdateAndReset(t){await this.Update(t??this.item),this.Set()}async Remove(t){if(t)try{await ke.Delete({query:this.getUrl(`${t}`)}),this.RemoveItem(t)}catch(o){console.warn("Remove failed:",o)}}async UpdateMany(t){if(t||(t=this.items),!t)return;const o=[];t.forEach(i=>{o.push(new Promise(()=>this.Update(i)))}),Promise.all(o)}SetAll(t){this.items.splice(0,this.items.length),t&&this.items.push(...t.map(o=>new this.classConstructor(o)))}SetAllWithCount(t){this.SetAll(t.items),this.count.value=t.count}RemoveItem(t){const o=this.items.findIndex(i=>i.id===t);o<0||this.items.splice(o,1)}AppendToAll(t){if(t){if(Array.isArray(t)){const o=t.map(i=>new this.classConstructor(i));this.items.push(...o);return}this.items.push(new this.classConstructor(t))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){K.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(t){if(t){if(Array.isArray(t)){const o=t.map(i=>new this.classConstructor(i));this.items.unshift(...o);return}this.items.unshift(new this.classConstructor(t))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(t=>z.H.Strings.SearchInFields(this.searchStr.value,t.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function gu(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const yu=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class wu{static GetRandColor(t){return Dt.GetRandEL(t??yu)}}function Ys(n,t){const o=[],i=t||ft.Asc,r=i===ft.Asc?ft.Desc:ft.Asc;return Object.values(n).forEach(s=>{o.push(s(i)),o.push(s(r))}),o.length>0&&!o.some(s=>s.default)&&(o[0].default=!0),t&&o.forEach(s=>{s.default&&(s.default=s.order===t)}),o}let bu=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",Qn.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",Vo[Qn.FiveMinutes])}startDrag(t,o){this.draggedStartTime=t,this.draggedEndTime=o,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Vo[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}};const ji=n=>n===8||n===46,Cu=n=>n>46&&n<58,Su=n=>n>34&&n<41,ku=n=>n+".",xu=(n,t,o)=>{ji(t)||Su(t)||(!Cu(t)||o>9)&&n.preventDefault()};function Eu(n,t){if(t>8){let o=n.substring(0,2).replace(".","1");Number(o)>31&&(o="31");let i=n.substring(3,5).replace(".","1");Number(i)>12&&(i="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=o+"."+i+"."+r}return n}function Bu(n){const t=n.keyCode;let o=n.srcElement.value;const i=o.length;xu(n,t,i),!ji(t)&&(i===2||i===5)&&(o=ku(o));const r=n.srcElement.value+String.fromCharCode(n.which);if(ji(t)){n.srcElement.value=o;return}o.length===0&&Number(r)>3&&(o="3",n.preventDefault()),o.length===1&&Number(r)>31&&(o="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(o=o.substring(0,3)+"12",n.preventDefault()),o=Eu(o,i),n.srcElement.value=o}const Nu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Vu="ru-RU";class Wt{constructor(){d(this,"locale","ru-RU")}static Format(t,o){if(!t)return"";const i={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return o&&(i.year=o.year||o.year===void 0?o.year:i.year,i.month=o.month||o.month===void 0?o.month:i.month,i.day=o.day||o.day===void 0?o.day:i.day,i.hour=o.hour??i.hour,i.minute=o.minute??i.minute),Intl.DateTimeFormat(Vu,i).format(new Date(t))}static FormatWithTime(t){return Wt.Format(t,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(t){const o=t.split(".");return new Date(`${o[2]}-${o[1]}-${o[0]}`)}static GetPeriod(t,o,i){return`${this.Format(t,i)}-${this.Format(o,i)}`}static GetShortDayName(t){return t?Nu[t.getDay()]:""}static GetCurrentWeekPeriod(t){const o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate()-o.getDay()+1),r=new Date(o.getFullYear(),o.getMonth(),i.getDate()+7);return this.GetPeriod(i,r,t||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(t,o){const i=new Date,r=new Date,s=Wt.SplitHourTime(t),a=Wt.SplitHourTime(o);return i.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-i.getTime())/1e3/60}static HourTimeinMunutes(t){const o=Wt.SplitHourTime(t);return o[0]*60+o[1]}static SplitHourTime(t){const o=t.split(":");return[Number(o[0]),Number(o[1])]}static AddMinutesToHM(t,o){const i=new Date,r=Wt.SplitHourTime(t);i.setHours(r[0],r[1],0,0);const s=new Date(i.getTime()+o*6e4),a=s.getHours(),c=s.getMinutes();return`${a}:${c}`}static GetMonthsDiff(t,o){return o.getMonth()-t.getMonth()+12*(o.getFullYear()-t.getFullYear())}static StringToDate(t){const o=t.split(".");return new Date(`${o[2]}-${o[1]}-${o[0]}`)}static GetDateOrToday(t){return t?t.date:new Date}static InPeriod(t,o,i){return new Date(t)>=new Date(o)&&new Date(t)<=new Date(i)}static GetDatesFromPeriod(t,o){const i=[new Date(t)];let r=t;for(;r<=o;)r=Wt.AddDays(r,1),i.push(r);return i}static AddDays(t,o){const i=new Date(t);return i.setDate(i.getDate()+o),i}static Eq(t,o){return t.getTime()===o.getTime()}}class $u{constructor(){d(this,"dragged",!1);d(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(t){this.dragged=!0,t&&t.dataTransfer&&t.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Xs{static Get(t){const o=t.split(".");return o[o.length-1]}}const Tu=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function t(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function o(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){n(s,[a]);return}const l=c.split(",");l.push(a),n(s,l)}function i(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const l=c.split(",").filter(u=>u!==a);n(s,l)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:o,removeFromFavourite:i,setFavourite:n,isFavourite:t,clearFavourite:r}})();class Mu{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(t){this.Reset(),t&&(Array.isArray(t)?this.list=t:this.list=Ys(t),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(t=>t.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const cn=new Mu;function Pu(){const n=e.ref(!1),t=e.ref(!1);return{confirmLeave:n,saveButtonClick:t,beforeWindowUnload:s=>{n.value&&s.preventDefault()},formUpdated:()=>{n.value=!0},showConfirmModal:(s,a)=>{n.value&&!t.value?s():a()}}}const Iu=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{z.F.FTSP.Get().reset(),cn.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:o}=Pu(),i=s=>Yl.onBeforeRouteLeave((a,c,l)=>{o((s||r)(),l)}),r=s=>async()=>{t.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:i,submit:r}})();function Zs(n,t){const o=[];if(n)for(let i=0;i<Math.ceil(n.length/t);i++)o[i]=n.slice(i*t,i*t+t);return o}class Wi{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","")}preSelect(){const t=Bt.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select(0);return}const o=this.items.findIndex(i=>i.slug===t);o>-1&&this.Select(o)}static Create(t,o){const i=new Wi;return i.key=t,i.items=o,i.items.length&&i.preSelect(),i}Select(t){if(this.items.length){if(t===void 0)return this.preSelect();this.idx=t,Bt.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 ui=class ui{static Format(t){let o=t;if(!o)t=o;else{(o[0]==="7"||o[0]==="8")&&o.length!==1&&(o=o.slice(1));const i=o.replace(/\+7|[^\d]/g,""),r=i.length;switch(!0){case r===0:t="";break;case(r===1&&o.length===1&&i==="7"):case(r===1&&o.length===1&&i==="8"):t="+7 (";break;case r<4:t=`+7 (${i}`;break;case r<7:t=`+7 (${i.slice(0,3)}) ${i.slice(3)}`;break;case r<9:t=`+7 (${i.slice(0,3)}) ${i.slice(3,6)}-${i.slice(6,8)}`;break;default:t=`+7 (${i.slice(0,3)}) ${i.slice(3,6)}-${i.slice(6,8)}-${i.slice(8,10)}`;break}}return t}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(ui,"validatePhone",(t,o,i)=>{ui.getPhoneRegExp().test(o)||!o?i():i(new Error("Пожалуйста, введите корректный номер телефона"))});let Gi=ui;class Ru{static Count(t){const o=t.filter(s=>s.rating!==0);let i=0;o.forEach(s=>i=i+s.rating);const r=i/o.length;return isNaN(r)?0:Number((i/o.length).toFixed(2))}}class Au{static async Auth(t){t&&t()}static Dev(){}}class zu{constructor(){d(this,"startHour",9);d(this,"startHM",`${this.startHour}:00`);d(this,"endHour",19);d(this,"endHM",`${this.endHour}:00`);d(this,"timelinePxHeight",50);d(this,"timelineStep",Qn.FiveMinutes);d(this,"timelines",Vo[Qn.FiveMinutes])}periodIsCorrect(t,o){return ie.GtOrEq(t,this.startHM)&&ie.GtOrEq(this.endHM,o)}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Vo[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(t,o,i,r){return r.filter(s=>s.id!==i).every(s=>!ie.PeriodsIntersects(t,o,s.startTime,s.endTime))}sortByStartTime(t){t.sort((o,i)=>ie.HMtoM(o.startTime)-ie.HMtoM(i.startTime))}}const Du=-68;function Fu(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const o=document.querySelector(n),i=t??Du;let r=0;o&&(r=o.getBoundingClientRect().top+i+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class Ou{static Sort(t){t.forEach((o,i)=>o.order=i)}}class jo{static Wait(t,o){return new Promise(i=>setTimeout(()=>i(o),t))}static WaitS(t,o){return jo.Wait(ie.S(t),o)}static WaitM(t,o){return jo.Wait(ie.M(t),o)}}const so=n=>n===""||n===null||n===void 0||Array.isArray(n)&&n.length===0,Lu=Object.freeze(Object.defineProperty({__proto__:null,Compose:(...n)=>t=>{for(const o of n){const i=o(t);if(i!==!0)return i}return!0},Email:(n="Некорректный email")=>t=>so(t)||/^\S+@\S+\.\S+$/.test(String(t))?!0:n,MaxLen:(n,t=`Максимум ${n} символов`)=>o=>so(o)||String(o).length<=n?!0:t,MinLen:(n,t=`Минимум ${n} символов`)=>o=>so(o)||String(o).length>=n?!0:t,Regex:(n,t="Некорректное значение")=>o=>so(o)||n.test(String(o))?!0:t,Required:(n="Обязательное поле")=>t=>so(t)?n:!0},Symbol.toStringTag,{value:"Module"})),_u=n=>new Promise(t=>{if(document.querySelector(n))return t(document.querySelector(n));const o=new MutationObserver(()=>{document.querySelector(n)&&(o.disconnect(),t(document.querySelector(n)))});o.observe(document.body,{childList:!0,subtree:!0})});class Wo{constructor(t){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");K.BuildClass(this,t)}static Create(t,o,i,r){const s=new Wo;return s.id=jt(),s.chatId=t,s.message=i,s.userName=r,s}static CreatePingMessage(){const t=new Wo;return t.type="ping",t.id=jt(),t}isMessage(){return this.type==="message"||this.type===""}}const Hu="";class Uu{constructor(t="",o="",i="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);K.BuildClass(this,{endpoint:t,query:o,mutation:i}),this.connect(),this.ping()}send(t){!this.client||this.client.readyState!==1||this.client.send(t)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(Wo.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,Hu.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 vu=(re=class{},d(re,"Arrays",Dt),d(re,"Axios",ro),d(re,"BaseStore",xe),d(re,"Cache",qo),d(re,"Classes",K),d(re,"CarouselSwipe",gu),d(re,"Color",wu),d(re,"CreateSortModels",Ys),d(re,"Cursor",bu),d(re,"DateMask",Bu),d(re,"Dates",Wt),d(re,"Dragger",$u),d(re,"Extension",Xs),d(re,"Favourite",Tu),d(re,"Hooks",Iu),d(re,"HttpClient",ke),d(re,"Id",Ke),d(re,"MakeCarousel",Zs),d(re,"Period",Si),d(re,"PhoneService",Gi),d(re,"Rating",Ru),d(re,"Router",Bt),d(re,"RouterGuard",Au),d(re,"Scheduler",zu),d(re,"Scroll",Fu),d(re,"Sorter",Ou),d(re,"Static",Ei),d(re,"Strings",Ce),d(re,"Time",ie),d(re,"Timer",jo),d(re,"Token",io),d(re,"Menus",Wi),d(re,"Validate",Lu),d(re,"WaitElement",_u),d(re,"WebSocketClient",Uu),re);class qu{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(t){this.curPage=t}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Js=new qu;var Ks=(n=>(n.TableList="tableList",n.Default="",n))(Ks||{}),Nt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Nt||{}),ea=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(ea||{}),ta=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(ta||{}),Qi=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Qi||{});const ju=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:Ks,Animations:Nt,CalendarScale:ea,LocalStoreKeys:ut,SocialTypes:ta,ValueRelation:Qi},Symbol.toStringTag,{value:"Module"}));let Wu=class{async Login(t=_e.Form.GetValues()){const o=await ke.Post({query:"auth/login",payload:t});if(!o)throw"Ошибка авторизации";_e.Status.SetState(o)}async LoginAs(t){await ke.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=_e.Form.GetValues()){const o=await ke.Post({query:"auth/register",payload:t});if(!o)throw o}async RestorePassword(t=_e.Form.GetValues()){await ke.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=_e.Form.GetValues()){t.id=Bt.GetStringParam("userId"),await ke.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await ke.Post({query:"auth/refresh-token",payload:{refreshToken:io.getRefreshToken()}})}async CheckUuid(t){await ke.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await ke.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await ke.Get({query:`auth/email-is-confirm/${t}`})}};const Gu=new Wu;var Qu=Object.defineProperty,Go=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Qu(t,o,r),r};const ao=class Ul{constructor(t){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new $o]);d(this,"phones",[]);d(this,"websites",[]);K.BuildClass(this,t)}addEmail(){const t=Yn.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=on.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new Ul;return t.id=Ke.UUID(),t}removeEmail(t){K.RemoveFromClassById(t,this.emails)}removePhone(t){K.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new $o)}addWebsite(){this.websites.push(new Bi)}pushFirst(){this.emails.length||this.emails.push(new Yn),this.phones.length||this.phones.push(new on)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(t){this.description=t}updateTime(t){this.time=t}updateLatitude(t){this.latitude=t}updateLongitutde(t){this.longitude=t}};Go([K.GetClassConstructor(Yn)],ao.prototype,"emails"),Go([K.GetClassConstructor($o)],ao.prototype,"postAddresses"),Go([K.GetClassConstructor(on)],ao.prototype,"phones"),Go([K.GetClassConstructor(Bi)],ao.prototype,"websites");let Yu=ao,Xu=class extends xe{constructor(){super(Yu,"contacts")}};const Zu=new Xu;let Ju=class extends xe{constructor(){super(Yn,"emails")}};const Ku=new Ju;class Yi{constructor(t){d(this,"id");d(this,"ftsp");d(this,"name","");K.BuildClass(this,t)}static Create(t){const o=new Yi;return o.id=Ke.UUID(),o.ftsp=JSON.stringify(t),o}}let ef=class extends xe{constructor(){super(Yi,"ftsp-presets")}};const tf=new ef;let nf=class extends xe{constructor(){super(is,"humans")}};const of=new nf;let rf=class extends xe{constructor(){super(on,"phones")}};const sf=new rf;class af{constructor(t){d(this,"id");d(this,"nameRus","");K.BuildClass(this,t)}}var lf=Object.defineProperty,cf=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&lf(t,o,r),r};class na{constructor(t){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);K.BuildClass(this,t)}}cf([K.GetClassConstructor(af)],na.prototype,"fields");let df=class extends xe{constructor(){super(na,"schemas")}};const uf=new df;class oa{constructor(t){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);K.BuildClass(this,t)}}class ff{constructor(t){d(this,"id");d(this,"name","");d(this,"label","");K.BuildClass(this,t)}}var mf=Object.defineProperty,ia=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&mf(t,o,r),r};class An{constructor(t){d(this,"id");d(this,"key","");d(this,"label","");d(this,"order",0);d(this,"route","");d(this,"table","");d(this,"active",!0);d(this,"searchColumn","");d(this,"descriptionColumn","");d(this,"labelColumn","");d(this,"valueColumn","");d(this,"options",[]);d(this,"searchGroupMetaColumns",[]);K.BuildClass(this,t)}}ia([K.GetClassConstructor(oa)],An.prototype,"options"),ia([K.GetClassConstructor(ff)],An.prototype,"searchGroupMetaColumns");class Xi{constructor(t){d(this,"query","");d(this,"key","");d(this,"params","");d(this,"suggester",!1);d(this,"mustBeTranslated",!0);d(this,"options",[]);d(this,"searchGroupId","");d(this,"searchGroups",[]);d(this,"searchGroup",new An);d(this,"searchObjects",[]);d(this,"pagination",new Po);d(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(o=>new An(o))),t.searchGroup&&(this.searchGroup=new An(t.searchGroup)),t.options&&(this.options=t.options.map(o=>new oa(o))),this.count=t.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(t){const o=this.searchGroups.find(i=>i.id===t);o?this.searchGroup=o:this.searchGroup=new An}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Bt.Route().query.groupId)}setQuery(){const t=Bt.Route().query.query;t&&(this.query=t)}}let hf=class{constructor(){d(this,"isSearchDrawerOpen",e.ref(!1));d(this,"searchModel",e.reactive(new Xi));d(this,"searchGroups",e.reactive([]));d(this,"count",0)}async Search(t){const o=await ke.Get({query:`search?key=${t.key}&query=${t.query}`});o&&o.searchGroup&&o.searchGroup.options.forEach(i=>{t.searchObjects.push({id:i.id,value:i.value,label:i.label,description:i.description})})}async mainSearch(t){this.SetSearchModel(await ke.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(i=>{i.options=[]});const o=await ke.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(o),o}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new Xi}SetSearchModel(t){t&&(this.searchModel=new Xi(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Zi=new hf;let pf=class extends xe{constructor(){super(To,"users-accounts")}};const gf=new pf;var Ye=(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))(Ye||{});class ra{constructor(t){d(this,"id");d(this,"name",Ye.String);d(this,"valueRelation",Qi.simple);K.BuildClass(this,t)}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===Ye.Radio)return"RadioProp";if(this.name===Ye.Set)return"SetProp";if(this.name===Ye.Number)return"NumberProp";if(this.name===Ye.String)return"StringProp"}}let yf=class extends xe{constructor(){super(ra,"value-types")}};const wf=new yf;let sa=(at=class{},d(at,"Auth",Gu),d(at,"Contacts",Zu),d(at,"Emails",Ku),d(at,"FileInfos",new xe(Et,"file-infos")),d(at,"FTSPPresets",tf),d(at,"Humans",of),d(at,"Phones",sf),d(at,"Schemas",uf),d(at,"UserAccounts",gf),d(at,"ValueTypes",wf),d(at,"Search",Zi),at);var Gt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(Gt||{});let bf=(Zt=class{},d(Zt,"Orders",ft),d(Zt,"Sizes",Gt),d(Zt,"Statuses",he),d(Zt,"DataTypes",Ae),d(Zt,"ValueTypes",Ye),d(Zt,"Operators",Se),Zt);class Cf{constructor(){d(this,"title","");d(this,"buttons",[]);d(this,"editTitle",e.ref(!1));d(this,"showEdit",e.ref(!1))}Set(t="",o){typeof t=="function"?this.title=t():typeof t=="string"?this.title=t:this.title=t.value,this.buttons=o}}const Sf=new Cf;class kf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(t){this.menu=t}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(t=>{var o;return Ce.SearchIn(t.name,this.filterString)||((o=t.children)==null?void 0:o.some(i=>Ce.SearchIn(i.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(t){this.path=t}GetPath(){return this.path}SetFilter(t){this.filterString=t}GetChildren(t){var o;return this.filterString?(o=t.children)==null?void 0:o.filter(i=>Ce.SearchIn(i.name,this.filterString)):t.children}}const xf=new kf;class Ef{constructor(){d(this,"Menu",e.reactive(xf));d(this,"Head",e.reactive(Sf))}}const Bf=new Ef,aa="Да",la="Нет";class Nf extends Bn{constructor(){super(...arguments);d(this,"confirmButtonText",aa);d(this,"cancelButtonText",la);d(this,"persistent",!0);d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(o){const i=typeof o=="string"?{text:o}:o;return this.confirmButtonText=i.confirmButtonText??aa,this.cancelButtonText=i.cancelButtonText??la,this.persistent=i.persistent??!0,super.showMessage(i,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof x.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=x.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 o;return(o=this.resolve)==null?void 0:o.call(this,!0)})}Cancel(){this.Settle(()=>{var o;return(o=this.reject)==null?void 0:o.call(this)})}Settle(o){o==null||o(),this.resolve=void 0,this.reject=void 0}}const Vf=new Nf;class $f{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Tf extends $f{Show(){super.show()}Hide(){super.hide()}}const Mf=new Tf;class Qt{}d(Qt,"Admin",Bf),d(Qt,"Dialog",Vf),d(Qt,"Loading",Mf),d(Qt,"Notify",Nn),d(Qt,"Btn",nn),d(Qt,"Input",Xr);class z{}d(z,"Auth",e.reactive(_e)),d(z,"UI",e.reactive(Qt)),d(z,"Paginator",e.reactive(Js)),d(z,"S",sa),d(z,"H",vu),d(z,"C",hc),d(z,"T",bf),d(z,"I",ju),d(z,"F",bc);const lo=e.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 t=e.useAttrs(),o=e.computed(()=>{const i={};for(const r of Object.keys(t))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(i[r]=t[r]);return i});return(i,r)=>(e.openBlock(),e.createBlock(e.unref(x.QBadge),e.mergeProps(e.unref(o),{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:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},16,["label","color","text-color","outline","rounded","floating","multi-line","transparent"]))}}),oe=e.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:Gt.M,required:!1},type:{type:String,default:he.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const t=n,o=e.useAttrs(),i=e.computed(()=>{const y={};for(const M of Object.keys(o))["disable","color","size","flat","outline","unelevated","type"].includes(M)||(y[M]=o[M]);return y}),r=["submit","button","reset"],s=e.computed(()=>r.includes(t.type)),a=e.computed(()=>s.value?t.type:void 0),c=e.computed(()=>s.value?he.Primary:t.type),l=e.computed(()=>{const y={};return t.margin&&(y.margin=t.margin),t.padding&&(y.padding=t.padding),t.width&&(y.maxWidth=t.width,y.minWidth=t.width),t.height&&(y.minHeight=t.height,y.maxHeight=t.height),t.fontSize&&(y.fontSize=t.fontSize),y}),u={[he.Primary]:"primary",[he.Success]:"positive",[he.Warning]:"warning",[he.Error]:"negative",[he.Info]:"info"},f=e.computed(()=>o.color!==void 0?o.color:u[c.value]??"primary"),h={[Gt.XS]:"xs",[Gt.S]:"sm",[Gt.M]:"md",[Gt.L]:"lg",[Gt.XL]:"xl"},p=e.computed(()=>o.size!==void 0?o.size:["xs","sm","md","lg","xl"].includes(t.size)?t.size:h[t.size]??"md"),k=e.computed(()=>o.flat!==void 0?o.flat:["text","pag","text_ano"].includes(t.skin)),C=e.computed(()=>o.outline!==void 0?o.outline:t.skin==="invert"),N=e.computed(()=>o.unelevated!==void 0?o.unelevated:t.skin==="base"),E=e.computed(()=>o.disable??t.disabled);return(y,M)=>(e.openBlock(),e.createBlock(e.unref(x.QBtn),e.mergeProps(e.unref(i),{style:e.unref(l),color:e.unref(f),size:e.unref(p),flat:e.unref(k),outline:e.unref(C),unelevated:e.unref(N),disable:e.unref(E),type:e.unref(a),"no-wrap":""}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default"),e.createTextVNode(" "+e.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),Pf=["innerHTML"],If={key:1},Ji=D(e.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 t=n,o={color:t.color||void 0,fontSize:t.fontSize||void 0,fontWeight:t.fontWeight||void 0,background:t.background||void 0,padding:t.padding||void 0,width:t.width||void 0,maxWidth:t.width||void 0,minWidth:t.minWidth||void 0,margin:t.margin||void 0,justifyContent:t.justifyContent||void 0};return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["string",n.customClass]),style:o,onClick:r[0]||(r[0]=s=>i.$emit("click"))},[e.createVNode(e.unref(x.QItemLabel),null,{default:e.withCtx(()=>[n.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.string},null,8,Pf)):(e.openBlock(),e.createElementBlock("span",If,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),nt=D(e.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 t=n,o=e.useAttrs(),i=e.computed(()=>{const l={};for(const u of Object.keys(o))u!=="delay"&&(l[u]=o[u]);return l}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"top":"bottom"} ${l}`}),a=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"bottom":"top"} ${l}`}),c=e.computed(()=>({background:r[t.typeStyle],whiteSpace:"pre",height:t.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(l,u)=>n.tooltipText?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},e.unref(i),{class:"tooltip-wrapper"}),[e.renderSlot(l.$slots,"default",{},void 0,!0),e.createVNode(e.unref(x.QTooltip),{delay:n.timeout,anchor:e.unref(s),self:e.unref(a),class:"tooltip-box",style:e.normalizeStyle(e.unref(c))},{default:e.withCtx(()=>[e.createVNode(Ji,{string:n.tooltipText,padding:"0 3px",height:n.height},null,8,["string","height"])]),_:1},8,["delay","anchor","self","style"])],16)):(e.openBlock(),e.createBlock(e.unref(x.QTooltip),e.mergeProps({key:1},e.unref(i),{delay:n.timeout,class:"tooltip-box"}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),Vt={title:"Контактная информация",phonesTitle:"Телефоны",emailsTitle:"Электронная почта",addPhone:"Добавить телефон",addEmail:"Добавить email",noPhones:"Нет телефонных номеров",noEmails:"Нет email адресов",copied:"Скопировано в буфер обмена",copiedNumber:"Номер скопирован в буфер обмена",copiedEmail:"Email скопирован в буфер обмена",saved:"Сохранено",deleted:"Удалено",enterPhone:"Введите номер телефона",enterEmail:"Введите email адрес"},et=D(e.defineComponent({inheritAttrs:!1,__name:"PInput",props:e.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:e.mergeModels(["blur","input","focus","clear"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=o,r=e.useModel(n,"modelValue"),s=e.useAttrs(),a=e.computed(()=>typeof s.id=="string"?s.id:void 0),c=e.computed(()=>{const C={};for(const N of Object.keys(s))N!=="id"&&N!=="disable"&&(C[N]=s[N]);return C}),l=n,u=e.computed(()=>s.disable??l.disabled),f=e.ref(null);function h(){var C;(C=f.value)==null||C.focus()}t({focus:h});const p=()=>{i("input",r.value)},k=e.computed(()=>{const C={};return l.margin&&(C.margin=l.margin),l.padding&&(C.padding=l.padding),l.width&&(C.width=l.width),l.borderColor&&(C["--p-border-color"]=l.borderColor),C});return(C,N)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":N[0]||(N[0]=E=>r.value=E)},e.unref(c),{for:e.unref(a),label:n.label||void 0,mask:n.mask,disable:e.unref(u),rules:n.rules,"input-style":{color:n.color||void 0},style:e.unref(k),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":p,onBlur:N[1]||(N[1]=E=>C.$emit("blur",r.value)),onFocus:N[2]||(N[2]=E=>C.$emit("focus",r.value)),onClear:N[3]||(N[3]=E=>C.$emit("clear"))}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(C.$slots,"before",{},()=>[e.renderSlot(C.$slots,"default",{},void 0,!0)],!0)]),append:e.withCtx(()=>[e.renderSlot(C.$slots,"append",{},()=>[e.renderSlot(C.$slots,"right",{},void 0,!0)],!0)]),_:2},[C.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,C.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,C.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,C.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,C.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,C.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,C.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.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"]]),dn=e.defineComponent({inheritAttrs:!1,__name:"PDialog",props:e.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 t=e.useModel(n,"modelValue"),o=e.useAttrs(),i=e.computed(()=>{const r={};for(const s of Object.keys(o))["persistent","maximized","transition-show","transition-hide"].includes(s)||(r[s]=o[s]);return r});return(r,s)=>(e.openBlock(),e.createBlock(e.unref(x.QDialog),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=a=>t.value=a)},e.unref(i),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:2},[r.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"title")]),key:"0"}:void 0,r.$slots.header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"header")]),key:"1"}:void 0,r.$slots.body?{name:"body",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"body")]),key:"2"}:void 0,r.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),Rf={class:"q-mb-md"},Af={class:"text-subtitle1 text-weight-medium text-grey-9"},zf={class:"text-caption text-grey-6 q-mt-xs"},co=e.defineComponent({__name:"PContactFormDeleteDialog",props:e.mergeModels({title:{type:String,default:"Удалить элемент?"},subtitle:{type:String,default:"Это действие нельзя отменить."},loading:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["confirm"],["update:modelValue"]),setup(n){const t=x.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(dn,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"340px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"column items-center q-pt-xl q-pb-sm text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",Rf,[e.createVNode(e.unref(x.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",Af,e.toDisplayString(n.title),1),e.createElementVNode("div",zf,e.toDisplayString(n.subtitle),1)]),_:1}),e.createVNode(e.unref(x.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(oe,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(oe,{unelevated:"",label:"Удалить",color:"negative",loading:n.loading,"no-caps":"",onClick:r[0]||(r[0]=s=>i.$emit("confirm"))},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Df={class:"q-mr-md"},Ff={class:"text-subtitle1 text-weight-medium text-grey-9"},uo=e.defineComponent({__name:"PContactFormEditDialog",props:e.mergeModels({icon:{type:String,default:"edit"},title:{type:String,default:"Редактирование"},saving:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["save"],["update:modelValue"]),setup(n){const t=x.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(dn,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"380px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createElementVNode("div",Df,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",Ff,e.toDisplayString(n.title),1),e.createVNode(e.unref(x.QSpace)),e.withDirectives(e.createVNode(oe,{flat:"",round:"",dense:"",icon:"close",size:"sm",color:"grey-6"},null,512),[[e.unref(t)]])]),_:1}),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3}),e.createVNode(e.unref(x.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(oe,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(oe,{unelevated:"",label:"Сохранить",color:"primary",loading:n.saving,"no-caps":"",onClick:r[0]||(r[0]=s=>i.$emit("save"))},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["modelValue"]))}}),Of={class:"q-mt-sm"},Lf={class:"row items-center justify-between q-mb-xs q-px-xs"},_f={class:"row items-center q-gutter-xs"},Hf={class:"text-uppercase text-caption text-weight-medium text-grey-7"},Uf={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},vf={style:{"min-width":"0"}},qf={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},jf={key:0,class:"text-caption text-grey-6 ellipsis"},Wf={class:"row items-center no-wrap q-gutter-xs"},Gf={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},Qf={class:"text-body2 text-grey-7"},un=D(e.defineComponent({__name:"PContactFormViewEmails",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.emails(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),h=e.ref(!1),p=e.ref(!1),k=e.ref(-1),C=async $=>{$&&(await navigator.clipboard.writeText($),z.UI.Notify.Success(o.value.copiedEmail))},N=$=>{var P,A;s.value=$,a.value=i.value[$],c.value=t.adapter.emailValue(i.value[$]),l.value=((A=(P=t.adapter).emailDescription)==null?void 0:A.call(P,i.value[$]))??"",r.value=!0},E=async()=>{if(!a.value||!c.value){z.UI.Notify.Warning(o.value.enterEmail);return}u.value=!0;try{Object.assign(a.value,{...a.value,email:c.value,description:l.value}),await t.adapter.updateEmail(a.value),r.value=!1,z.UI.Notify.Success(o.value.saved)}catch{z.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},y=async()=>{f.value=!0;try{await t.adapter.addEmail(t.contact),N(i.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},M=$=>{k.value=$,p.value=!0},b=async()=>{var $,P;h.value=!0;try{const A=i.value[k.value];await t.adapter.removeEmail((P=($=t.adapter).emailId)==null?void 0:P.call($,A)),i.value.splice(k.value,1),p.value=!1,z.UI.Notify.Success(o.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{h.value=!1}};return($,P)=>(e.openBlock(),e.createElementBlock("div",Of,[e.createElementVNode("div",Lf,[e.createElementVNode("div",_f,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",Hf,e.toDisplayString(e.unref(o).emailsTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(lo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(oe,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:y},null,8,["loading"])]),e.unref(i).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(A,G)=>{var de,$e,Ee,De,Me,ge;return e.openBlock(),e.createElementBlock("div",{key:(($e=(de=n.adapter).emailId)==null?void 0:$e.call(de,A))??G,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",$.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",Uf,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",vf,[e.createElementVNode("div",qf,e.toDisplayString(n.adapter.emailValue(A)),1),(De=(Ee=n.adapter).emailDescription)!=null&&De.call(Ee,A)?(e.openBlock(),e.createElementBlock("div",jf,e.toDisplayString((ge=(Me=n.adapter).emailDescription)==null?void 0:ge.call(Me,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Wf,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:Be=>C(n.adapter.emailValue(A))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[4]||(P[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(oe,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:Be=>N(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[5]||(P[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),G>=n.presetted?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:Be=>M(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[6]||(P[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",Gf,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",Qf,e.toDisplayString(e.unref(o).noEmails),1),P[7]||(P[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать email",-1)),e.createVNode(oe,{icon:"add",label:"Добавить email",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:y},null,8,["loading"])])),e.createVNode(uo,{modelValue:e.unref(r),"onUpdate:modelValue":P[2]||(P[2]=A=>e.isRef(r)?r.value=A:null),icon:"email",title:"Редактирование email",saving:e.unref(u),onSave:E},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(et,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":P[0]||(P[0]=A=>e.isRef(c)?c.value=A:null),dense:"",autofocus:"",label:"Email адрес",type:"email",class:"q-mb-md",rules:[A=>!!A||e.unref(o).enterEmail,A=>!A||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(A)||"Некорректный email"],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"email",color:"primary"})]),_:1},8,["modelValue","rules"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(et,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":P[1]||(P[1]=A=>e.isRef(l)?l.value=A:null),dense:"",label:"Описание (например: Рабочая, Личная)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(co,{modelValue:e.unref(p),"onUpdate:modelValue":P[3]||(P[3]=A=>e.isRef(p)?p.value=A:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(h),onConfirm:b},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),Yf={class:"q-mt-sm"},Xf={class:"row items-center justify-between q-mb-xs q-px-xs"},Zf={class:"row items-center q-gutter-xs"},Jf={class:"text-uppercase text-caption text-weight-medium text-grey-7"},Kf={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},em={style:{"min-width":"0"}},tm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},nm={key:0,class:"text-caption text-grey-6 ellipsis"},om={class:"row items-center no-wrap q-gutter-xs"},im={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},rm={class:"text-body2 text-grey-7"},fn=D(e.defineComponent({__name:"PContactFormViewPhones",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),h=e.ref(!1),p=e.ref(!1),k=e.ref(-1),C=async $=>{$&&(await navigator.clipboard.writeText($),z.UI.Notify.Success(o.value.copiedNumber))},N=$=>{var P,A;s.value=$,a.value=i.value[$],c.value=t.adapter.phoneNumber(i.value[$]),l.value=((A=(P=t.adapter).phoneDescription)==null?void 0:A.call(P,i.value[$]))??"",r.value=!0},E=async()=>{if(!a.value||!c.value){z.UI.Notify.Warning(o.value.enterPhone);return}u.value=!0;try{Object.assign(a.value,{...a.value,number:c.value,description:l.value}),await t.adapter.updatePhone(a.value),r.value=!1,z.UI.Notify.Success(o.value.saved)}catch{z.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},y=async()=>{f.value=!0;try{await t.adapter.addPhone(t.contact),N(i.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},M=$=>{k.value=$,p.value=!0},b=async()=>{var $,P;h.value=!0;try{const A=i.value[k.value];await t.adapter.removePhone((P=($=t.adapter).phoneId)==null?void 0:P.call($,A)),i.value.splice(k.value,1),p.value=!1,z.UI.Notify.Success(o.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{h.value=!1}};return($,P)=>(e.openBlock(),e.createElementBlock("div",Yf,[e.createElementVNode("div",Xf,[e.createElementVNode("div",Zf,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",Jf,e.toDisplayString(e.unref(o).phonesTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(lo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(oe,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:y},null,8,["loading"])]),e.unref(i).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(A,G)=>{var de,$e,Ee,De,Me,ge;return e.openBlock(),e.createElementBlock("div",{key:(($e=(de=n.adapter).phoneId)==null?void 0:$e.call(de,A))??G,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",$.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",Kf,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",em,[e.createElementVNode("div",tm,e.toDisplayString(n.adapter.phoneNumber(A)),1),(De=(Ee=n.adapter).phoneDescription)!=null&&De.call(Ee,A)?(e.openBlock(),e.createElementBlock("div",nm,e.toDisplayString((ge=(Me=n.adapter).phoneDescription)==null?void 0:ge.call(Me,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",om,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:Be=>C(n.adapter.phoneNumber(A))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[4]||(P[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(oe,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:Be=>N(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[5]||(P[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),G>=n.presetted?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:Be=>M(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[6]||(P[6]=[e.createTextVNode("Удалить номер",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",im,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",rm,e.toDisplayString(e.unref(o).noPhones),1),P[7]||(P[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать номер",-1)),e.createVNode(oe,{icon:"add",label:"Добавить телефон",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:y},null,8,["loading"])])),e.createVNode(uo,{modelValue:e.unref(r),"onUpdate:modelValue":P[2]||(P[2]=A=>e.isRef(r)?r.value=A:null),icon:"phone",title:"Редактирование телефона",saving:e.unref(u),onSave:E},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(et,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":P[0]||(P[0]=A=>e.isRef(c)?c.value=A:null),mask:n.adapter.phoneMask(e.unref(a)),dense:"",autofocus:"",label:"Номер телефона",class:"q-mb-md",rules:[A=>!!A||e.unref(o).enterPhone],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"phone",color:"primary"})]),_:1},8,["modelValue","mask","rules"])):e.createCommentVNode("",!0),e.unref(a)&&e.unref(s)>=n.presetted?(e.openBlock(),e.createBlock(et,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":P[1]||(P[1]=A=>e.isRef(l)?l.value=A:null),dense:"",label:"Описание (например: Рабочий, Личный)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(co,{modelValue:e.unref(p),"onUpdate:modelValue":P[3]||(P[3]=A=>e.isRef(p)?p.value=A:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(h),onConfirm:b},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),sm={class:"row items-center q-gutter-sm"},am={class:"text-weight-medium text-grey-9"},lm=e.defineComponent({__name:"PContactForm",props:{contact:{},adapter:{},title:{default:Vt.title},phonesPresetted:{default:3},emailsPresetted:{default:2},margin:{default:"0"},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.computed(()=>t.adapter.emails(t.contact)),s=e.computed(()=>t.adapter.copyAll(t.contact)),a=e.ref(!1),c=()=>{a.value=!a.value},l=async()=>{const u=s.value;u&&(await navigator.clipboard.writeText(u),z.UI.Notify.Success(o.value.copied))};return(u,f)=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{flat:"",bordered:"",class:"contact-form-card",style:e.normalizeStyle({margin:n.margin})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"row items-center cursor-pointer q-py-sm q-px-md bg-grey-1",onClick:c},[e.createElementVNode("div",sm,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:e.unref(a)?"keyboard_arrow_right":"keyboard_arrow_down",size:"sm",color:"grey-6"},null,8,["icon"]),e.createVNode(e.unref(x.QIcon),{name:"contact_phone",size:"18px",color:"primary"}),e.createElementVNode("span",am,e.toDisplayString(n.title),1),e.unref(i).length+e.unref(r).length>0?(e.openBlock(),e.createBlock(lo,{key:0,outline:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length+e.unref(r).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(x.QSpace)),e.createElementVNode("div",{class:"row items-center q-gutter-xs",onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"]))},[e.unref(s)?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",dense:"",round:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:l},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("Скопировать все контакты",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(x.QSlideTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createVNode(e.unref(x.QSeparator)),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-xs q-pb-md q-px-md"},{default:e.withCtx(()=>[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"]),e.createVNode(e.unref(x.QSeparator),{class:"q-my-sm"}),e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"])]),_:1})],512),[[e.vShow,!e.unref(a)]])]),_:1})]),_:1},8,["style"]))}}),Ki=D(lm,[["__scopeId","data-v-327b9235"]]),cm={class:"contact-edit-wrapper"},er=D(e.defineComponent({__name:"PContactFormEdit",props:{contact:{},adapter:{},phonesPresetted:{default:3},emailsPresetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",cm,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"]),i[0]||(i[0]=e.createElementVNode("div",{class:"edit-sections-divider"},null,-1)),e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-8548f1de"]]),dm={class:"edit-emails-wrapper"},tr=D(e.defineComponent({__name:"PContactFormEditEmails",props:{contact:{},adapter:{},presetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",dm,[e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-2f0b3c6b"]]),um={class:"edit-phones-wrapper"},nr=D(e.defineComponent({__name:"PContactFormEditPhones",props:{contact:{},adapter:{},presetted:{default:3},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",um,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-59e80623"]]),fm={class:"contact-view-wrapper"},or=D(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",fm,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"]),i[0]||(i[0]=e.createElementVNode("div",{class:"view-sections-divider"},null,-1)),e.createVNode(un,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"])]))}}),[["__scopeId","data-v-f1271bd5"]]);function ca(n){n.component("PContactForm",Ki),n.component("PContactFormDeleteDialog",co),n.component("PContactFormEdit",er),n.component("PContactFormEditDialog",uo),n.component("PContactFormEditEmails",tr),n.component("PContactFormEditPhones",nr),n.component("PContactFormView",or),n.component("PContactFormViewEmails",un),n.component("PContactFormViewPhones",fn)}const mm=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:Ki,PContactFormDeleteDialog:co,PContactFormEdit:er,PContactFormEditDialog:uo,PContactFormEditEmails:tr,PContactFormEditPhones:nr,PContactFormView:or,PContactFormViewEmails:un,PContactFormViewPhones:fn,default:ca,defaultContactsLabels:Vt},Symbol.toStringTag,{value:"Module"}));class mn{constructor(t){d(this,"id");d(this,"name","");d(this,"score",0);d(this,"order",0);d(this,"showMoreQuestions",!1);d(this,"showOther",!1);d(this,"fieldId");d(this,"isMatrixY",!1);z.H.Classes.BuildClass(this,t)}static Create(t){const o=new mn;return o.id=z.H.Id.UUID(),o.fieldId=t,o}}class da{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");z.H.Classes.BuildClass(this,t)}}class ir{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);z.H.Classes.BuildClass(this,t)}}class zn{constructor(t){d(this,"id");d(this,"name","");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static Create(t){const o=new zn;return o.id=z.H.Id.UUID(),o.fieldId=t,o}}var hm=Object.defineProperty,fo=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&hm(t,o,r),r};const hn=class yi{constructor(t){d(this,"id");d(this,"name","");d(this,"code","");d(this,"valueTypeId");d(this,"order",0);d(this,"ageCompare",!1);d(this,"answerVariants",[]);d(this,"answerVariantsForDelete",[]);d(this,"fieldExamples",[]);d(this,"fieldVariants",[]);d(this,"valueType",new ra);d(this,"fieldMeasures",[]);d(this,"showSet",!1);d(this,"showRadio",!1);d(this,"isEdit",!1);d(this,"children",[]);d(this,"parentId");d(this,"formSectionId");d(this,"selected",!1);z.H.Classes.BuildClass(this,t),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(t=>!t.isMatrixY)}getMatrixY(){return this.answerVariants.filter(t=>t.isMatrixY)}static Create(t){const o=new yi;return o.id=z.H.Id.UUID(),o.formSectionId=t,o}getRegisterPropertyRadioOriginalValue(t){const o=this.answerVariants.find(i=>i.id===t);return o?o.name:""}addRadioItem(t){const o=new mn(t);o.order=this.answerVariants.length,this.answerVariants.push(o)}removeRadioItem(t){const o=this.answerVariants[t].id;o&&this.answerVariantsForDelete.push(o),this.answerVariants.splice(t,1)}changeRelation(t){const o=t.find(i=>i.id===this.valueTypeId);if(o){if(o.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(o.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=o}}editRegisterProperty(t){this.isEdit=t??!this.isEdit}sortExamples(){this.fieldExamples.forEach((t,o)=>t.order=o)}addRegisterPropertyMeasure(t){this.fieldMeasures.push(new ir(t))}addRegisterPropertyVariant(){this.fieldVariants.push(new zn)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(t){this.valueType=t,this.valueTypeId=t.id}setName(t){this.name=t}addAnswerVariant(){const t=mn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=yi.Create();return t.parentId=this.id,t.name="Вопрос",t.order=this.children.length,this.children.push(t),t}addFieldVariant(){const t=zn.Create(this.id);return this.fieldVariants.push(t),t}copy(){const t=new yi(this);return t.id=z.H.Id.UUID(),t.answerVariants.forEach(o=>{o.id=z.H.Id.UUID(),o.fieldId=t.id}),t.children=t.children.map(o=>{const i=o.copy();return i.parentId=t.id,i}),t}};fo([z.H.Classes.GetClassConstructor(mn)],hn.prototype,"answerVariants"),fo([z.H.Classes.GetClassConstructor(da)],hn.prototype,"fieldExamples"),fo([z.H.Classes.GetClassConstructor(zn)],hn.prototype,"fieldVariants"),fo([z.H.Classes.GetClassConstructor(ir)],hn.prototype,"fieldMeasures"),fo([z.H.Classes.GetClassConstructor(hn)],hn.prototype,"children");let Qo=hn;class rr{constructor(t){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new Et);z.H.Classes.BuildClass(this,t)}}class pn{constructor(t){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");z.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new pn;return i.id=jt(),i.fieldFillId=t,i.answerVariantId=o,i}static GetClassName(){return"selectedAnswerVariant"}}var pm=Object.defineProperty,ua=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&pm(t,o,r),r};const sr=class Qr{constructor(t){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new Et);d(this,"fileInfoId");d(this,"order",0);d(this,"selectedAnswerVariants",[]);d(this,"patientId");d(this,"fieldId");d(this,"formFillId");d(this,"answerVariantId");d(this,"filled",!1);d(this,"researchResultId");d(this,"answerFiles",[]);d(this,"answerFilesForDelete",[]);z.H.Classes.BuildClass(this,t)}setFilled(t){this.filled=t}static Create(t,o){const i=new Qr;return i.id=jt(),i.fieldId=t.id,i.formFillId=o,i.order=t.order,i.valueNumber=0,i.valueString="",i.valueDate=new Date,i}setString(t){this.valueString=t,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(t){this.valueNumber=t,this.valueNumber&&(this.filled=!0)}setOther(t){this.valueOther=t,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(t){this.valueDate=t,this.filled=!0}setRadio(t){this.answerVariantId=t,this.filled=!!this.answerVariantId}static CreateMany(t,o){return t.map(i=>Qr.Create(i,o))}addFile(){const t=new rr;return t.id=jt(),t.answerId=this.id,this.answerFiles.push(t),t}getFileInfos(){const t=[];return this.answerFiles.forEach(o=>t.push(o.fileInfo)),t}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(t,o){const i=pn.Create(this.id,t);return i.answerVariantIdY=o,this.selectedAnswerVariants.push(i),this.filled=!0,i}getMatrixValue(t,o){return this.selectedAnswerVariants.find(i=>i.answerVariantId===t&&i.answerVariantIdY===o)}addSelectedAnswerVariant(t){const o=pn.Create(this.id,t);return this.selectedAnswerVariants.push(o),this.filled=!0,o}static GetClassName(){return"answer"}showOther(t){const o=t.find(i=>i.showOther);return o?this.answerVariantId===o.id||this.selectedAnswerVariants.some(i=>i.answerVariantId===o.id):!1}};ua([z.H.Classes.GetClassConstructor(pn)],sr.prototype,"selectedAnswerVariants"),ua([z.H.Classes.GetClassConstructor(rr)],sr.prototype,"answerFiles");let Dn=sr;class gm{constructor(t){d(this,"id");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var ym=Object.defineProperty,wm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&ym(t,o,r),r};const fa=class vl{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(t){return`${this.getN()}.${t+1}`}getSubFieldN(t,o){return`${this.getFieldN(t)}.${o+1}`}static Create(t){const o=new vl;return o.id=z.H.Id.UUID(),o.formId=t,o}addField(){const t=Qo.Create(this.id);return this.fields.push(t),this.sortFields(),t}sortFields(){this.fields.forEach((t,o)=>t.order=o)}getAnswerVariants(){const t=[];return this.fields.forEach(o=>t.push(...o.answerVariants)),t}};wm([z.H.Classes.GetClassConstructor(Qo)],fa.prototype,"fields");let Yo=fa;var bm=Object.defineProperty,Cm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&bm(t,o,r),r};const ma=class ql{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"isLaboratory",!1);d(this,"formSections",[]);d(this,"isEdit",!1);d(this,"withDates",!1);d(this,"withScores",!1);d(this,"selectedForExport",!1);d(this,"filterString","");d(this,"showOnlyNotFilled",!1);d(this,"showOnlyFilled",!1);z.H.Classes.BuildClass(this,t)}static GetClassName(){return"Form"}static Create(){const t=new ql;return t.id=z.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=Yo.Create(this.id);return this.formSections.push(t),z.H.Sorter.Sort(this.formSections),t}getFields(){const t=this.formSections.map(i=>i.fields).flat(),o=t.map(i=>i.children).flat();return t.concat(o).filter(i=>i.children.length===0)}};Cm([z.H.Classes.GetClassConstructor(Yo)],ma.prototype,"formSections");let ha=ma;var Sm=Object.defineProperty,km=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Sm(t,o,r),r};const pa=class jl{constructor(t){d(this,"id");d(this,"date",new Date);d(this,"editMode",!1);d(this,"userFormId");d(this,"fillingPercentage",0);d(this,"fieldFills",[]);d(this,"num","");d(this,"formId");z.H.Classes.BuildClass(this,t)}static Create(t){const o=new jl;return o.id=z.H.Id.UUID(),o.formId=t.id,o.fieldFills.push(...Dn.CreateMany(t.getFields(),o.id)),o}addFieldFill(t){this.fieldFills.push(t)}getFieldFill(t){var o;return(o=this.fieldFills)==null?void 0:o.find(i=>i.fieldId===t)}pushRegisterProperty(t){const o=new Dn;o.researchResultId=t,this.fieldFills.push(o)}getRegisterPropertyToPatient(t){return this.fieldFills.filter(o=>o.researchResultId===t)}getOrCreateFieldFill(t){let o=this.getFieldFill(t.id);return o||(o=Dn.Create(t),this.addFieldFill(o)),o}getFileInfos(){const t=[];return this.fieldFills.forEach(o=>t.push(...o.getFileInfos())),t}calculateFilling(){const t=this.fieldFills.filter(i=>i.filled).length,o=this.fieldFills.length;this.fillingPercentage=Math.round(t/o*100)}getFieldFillByFieldId(t){return this.fieldFills.find(o=>o.fieldId===t)}getFieldVariantFieldFill(t){return this.fieldFills.find(o=>o.answerVariantId===t)}getFieldsFieldFillsMap(t){const o={};return t.forEach(i=>{var r;if(i.code){const s=(r=this.getFieldFillByFieldId(i.id))==null?void 0:r.valueNumber;o[i.code]=s}}),o}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};km([z.H.Classes.GetClassConstructor(Dn)],pa.prototype,"fieldFills");let ga=pa;const xm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:mn,Field:Qo,FieldExample:da,FieldFill:Dn,FieldFillFile:rr,FieldFilter:gm,FieldMeasure:ir,FieldVariant:zn,Form:ha,FormFill:ga,FormSection:Yo,SelectedAnswerVariant:pn},Symbol.toStringTag,{value:"Module"}));let Em=class extends xe{constructor(){super(mn,"answer-variants")}};const Bm=new Em;let Nm=class extends xe{constructor(){super(Dn,"field-fills")}};const Vm=new Nm;let $m=class extends xe{constructor(){super(Qo,"fields")}};const Tm=new $m;let Mm=class extends xe{constructor(){super(ga,"form-fills")}};const Pm=new Mm;let Im=class extends xe{constructor(){super(Yo,"form-sections")}};const Rm=new Im;let Am=class extends xe{constructor(){super(ha,"forms")}};const zm=new Am;let Dm=class extends xe{constructor(){super(pn,"selected-answer-variants")}};const Fm=new Dm,Om=Object.freeze(Object.defineProperty({__proto__:null,C:xm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:Bm,FieldFills:Vm,Fields:Tm,FormFills:Pm,FormSections:Rm,Forms:zm,SelectedAnswerVariants:Fm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Xo{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"selected",!1);d(this,"hide",!1);d(this,"editMode",!1);d(this,"color","");d(this,"background","");d(this,"order",0);d(this,"menuId");d(this,"iconId");d(this,"icon",new Et);d(this,"iconName","");d(this,"svgCode","");K.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=Ke.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var Lm=Object.defineProperty,_m=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Lm(t,o,r),r};class ar{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"top",!0);d(this,"side",!0);d(this,"show",!1);d(this,"hide",!1);d(this,"active",!1);d(this,"order",0);d(this,"selected",!1);d(this,"editMode",!1);d(this,"subMenus",[]);d(this,"subMenusForDelete",[]);d(this,"iconId");d(this,"icon",new Et);K.BuildClass(this,t)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const t=[];return t.push(this.icon),this.subMenus.forEach(o=>{t.push(o.icon)}),t}addFile(t){this.icon.id||(this.icon.id=Ke.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new Xo)}removeSubMenu(t){const o=this.subMenus[t].id;o&&this.subMenusForDelete.push(o),this.subMenus.splice(t,1)}setColorsForSubMenus(){const t=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let o=0;this.subMenus.forEach(i=>{i.color=t[o],o=t.length-1?o=0:o++})}containPath(t){return this.link===t||!!this.subMenus.find(o=>o.link===t)}static GetClassName(){return"menu"}}_m([K.GetClassConstructor(Xo)],ar.prototype,"subMenus");const Hm=Object.freeze(Object.defineProperty({__proto__:null,Menu:ar,SubMenu:Xo},Symbol.toStringTag,{value:"Module"}));let Um=class extends z.H.BaseStore{constructor(){super(ar,"menus")}};const vm=new Um;let qm=class extends z.H.BaseStore{constructor(){super(Xo,"sub-menus")}};const jm=new qm,Wm=Object.freeze(Object.defineProperty({__proto__:null,C:Hm,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:vm,SubMenus:jm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ot{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"sessionId");d(this,"payload",{});z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Ot;return o.id=z.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}}var Gm=Object.defineProperty,Qm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Gm(t,o,r),r};const ya=class Wl{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"slots",[]);z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Wl;return o.id=z.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}};Qm([z.H.Classes.GetClassConstructor(Ot)],ya.prototype,"slots");let Fn=ya;var Ym=Object.defineProperty,wa=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Ym(t,o,r),r};const lr=class Gl{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"scheduleDayId");d(this,"placeId");d(this,"sessions",[]);d(this,"slots",[]);z.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new Gl;return i.id=z.H.Id.UUID(),i.placeId=t,i.scheduleDayId=o,i}addSession(){const t=Fn.Create(this.id);return this.sessions.push(t),t}addSlot(){const t=Ot.Create(this.id);return this.slots.push(t),t}};wa([z.H.Classes.GetClassConstructor(Fn)],lr.prototype,"sessions"),wa([z.H.Classes.GetClassConstructor(Ot)],lr.prototype,"slots");let mo=lr;var Xm=Object.defineProperty,Zm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Xm(t,o,r),r};const ba=class Ql{constructor(t){d(this,"id");d(this,"date",new Date(0));d(this,"description","");d(this,"ownerId");d(this,"ownerType","");d(this,"schedules",[]);z.H.Classes.BuildClass(this,t)}static Create(t,o,i=new Date){const r=new Ql;return r.id=z.H.Id.UUID(),r.ownerId=t,r.ownerType=o||"",r.date=i,r}};Zm([z.H.Classes.GetClassConstructor(mo)],ba.prototype,"schedules");let Zo=ba;class On{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"color","");z.H.Classes.BuildClass(this,t)}static Create(){const t=new On;return t.id=z.H.Id.UUID(),t}}const Jm=Object.freeze(Object.defineProperty({__proto__:null,Schedule:mo,ScheduleDay:Zo,SchedulePlace:On,ScheduleSession:Fn,ScheduleSlot:Ot},Symbol.toStringTag,{value:"Module"})),ae=n=>n?z.H.Time.HMtoM(n):NaN,Xe=n=>z.H.Time.ConcatHM(Math.floor(n/60),n%60),gn=n=>{if(!n)return"";const t=z.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},Ln=(n,t)=>z.H.Time.DiffM(n,t),bt=(n,t)=>z.H.Time.AddMtoHM(n,t),cr=(n,t)=>{const o=ae(n.startTime),i=ae(t.startTime);return isFinite(o)?isFinite(i)?o-i:-1:1},ho=(n,t)=>{const o=ae(n.startTime),i=ae(n.endTime),r=ae(t.startTime),s=ae(t.endTime);return!isFinite(o)||!isFinite(i)||!isFinite(r)||!isFinite(s)?!1:o<s&&r<i},po=(n,t)=>Math.round(n/t)*t,Ca=(n,t=8*60,o=20*60)=>{let i=t,r=o;for(const{item:c}of n){const l=ae(c.startTime),u=ae(c.endTime);isFinite(l)&&(i=Math.min(i,l)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(i/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},Sa=(n,t)=>{const o=ae(n.item.startTime),i=ae(n.item.endTime);if(!isFinite(o)||!isFinite(i))return{top:"0%",height:"48px"};const r=(o-t.start)/t.total*100,s=Math.max((i-o)/t.total*100,2.5);return{top:r+"%",height:s+"%"}},ka=(n,t)=>{const o=ae(n.startTime),i=ae(n.endTime);if(!isFinite(o)||!isFinite(i)||i<=o)return{top:"0%",height:"auto"};const r=i-o,s=ae(t.startTime),a=ae(t.endTime),c=isFinite(s)?Math.max((s-o)/r*100,0):0;let l=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return l=Math.min(Math.max(l,3),100-c),{top:c+"%",height:l+"%"}},xa=(n,t,o)=>n.some(i=>i.item.id===t.item.id||t.kind==="session"&&i.kind==="slot"&&i.item.sessionId===t.item.id?!1:o(t.item,i.item)),Ea=(n,t,o)=>n.some(i=>i.id!==t.id&&o(t,i)),Ba=(n,t,o,i)=>{if(!(!isFinite(t)||!isFinite(o)||o<=t))return(n||[]).find(r=>{const s=i(r.startTime),a=i(r.endTime);return isFinite(s)&&isFinite(a)&&t>=s&&o<=a})},Na=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",dr={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:"пересечение"},Va={createDay(n){return Zo.Create(void 0,void 0,n)},createSchedule(n,t){return mo.Create(n,t)},createSession(n){const t=(n==null?void 0:n.sessions)||[],o=t[t.length-1],i=(o==null?void 0:o.endTime)||"9:00",r=Fn.Create(n==null?void 0:n.id);return r.startTime=i,r.endTime=z.H.Time.AddMtoHM(i,30),r},createSlot(n){return Ot.Create(n==null?void 0:n.id)},createPlace(n){const t=On.Create();return t.name=n||"",t}},Km={class:"schedule-admin"},eh={key:0,class:"no-days text-center text-grey q-py-xl"},th={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},nh={key:1,class:"row items-center q-gutter-xs zoom-control"},oh={key:0,class:"grid-view"},ih={key:0,class:"text-grey text-center q-py-lg"},rh={class:"grid-header"},sh={class:"row items-center justify-center q-gutter-xs"},ah={class:"ellipsis"},lh={class:"time-gutter"},ch=["data-schedule-id","onDblclick","onContextmenu"],dh=["title","onPointerdown","onClick","onContextmenu"],uh={class:"block-content"},fh={class:"block-time"},mh={class:"block-name ellipsis"},hh={key:0,class:"block-speakers ellipsis"},ph={key:0,class:"session-perfoms"},gh=["title","onPointerdown","onClick","onContextmenu"],yh={class:"nested-time"},wh={class:"nested-name ellipsis"},bh={key:0,class:"nested-speakers ellipsis"},Ch=["title","onPointerdown"],Sh={class:"block-actions"},kh=["title","onPointerdown"],xh=["title"],Eh={class:"session-spine-name"},Bh={class:"block-time"},Nh={key:0,class:"session-badge"},Vh={key:1,class:"conflict-badge"},$h={class:"block-name ellipsis"},Th={class:"text-caption text-grey-6 q-pa-xs"},Mh={key:1,class:"list-view"},Ph={class:"row items-center q-gutter-sm"},Ih={class:"text-subtitle2"},Rh={key:0,class:"sub-block"},Ah={class:"sub-title"},zh={class:"list-row session-row"},Dh={key:0,class:"nested-list"},Fh={class:"col-4 ellipsis"},Oh={class:"time-text"},Lh={class:"sub-block"},_h={class:"sub-title"},Hh={class:"list-row slot-row"},Uh={key:0,class:"text-grey text-center q-py-sm"},vh={class:"text-caption text-grey-6 q-mb-sm"},qh={class:"text-h6"},jh={class:"row items-center q-gutter-sm q-mb-md"},Wh={key:0,class:"text-grey text-center q-py-md"},Gh={class:"col ellipsis"},Qh={class:"text-h6"},Yh={class:"row q-col-gutter-sm q-mb-sm"},Xh={class:"col-6"},Zh={class:"col-6"},Jh=["onClick"],yn=15,$a=6,Ta=D(e.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},sessionsEnabled:{type:Boolean,default:!0}},setup(n){var Dl,Fl;const t=n,o=e.computed(()=>t.sessionsEnabled!==!1),i=e.computed(()=>({...dr,duplicate:"Дублировать",...t.labels})),r=e.computed(()=>({...Va,...t.factories})),s=m=>t.slotListOf?t.slotListOf(m):(m==null?void 0:m.slots)||[],a=m=>t.nestedSlotListOf?t.nestedSlotListOf(m):(m==null?void 0:m.slots)||[],c=m=>(m==null?void 0:m.name)||i.value.hall,l=m=>t.sessionName?t.sessionName(m):(m==null?void 0:m.name)||`${i.value.session} ${(m==null?void 0:m.startTime)||""}–${(m==null?void 0:m.endTime)||""}`.trim(),u=m=>t.slotName?t.slotName(m):(m==null?void 0:m.name)||i.value.slot,f=m=>t.slotSubtitle?t.slotSubtitle(m):"",h=e.ref("grid"),p=e.ref((Fl=(Dl=t.days)==null?void 0:Dl[0])==null?void 0:Fl.id),k=e.ref(!1),C=e.ref(""),N=e.ref(!1),E=e.ref(null),y=e.ref(null),M=e.ref(void 0),b=e.ref(null),$=e.ref(null),P=e.ref(!1),A=e.ref(0),G=e.ref(null),de=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],$e=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch($e,m=>localStorage.setItem("schedule-grid-zoom",String(m)));const Ee=e.computed(()=>Math.max(ue.value.total/60*$e.value,360)),De=e.computed(()=>Ee.value+"px"),Me=e.computed(()=>[...t.days||[]].sort((m,g)=>new Date(m.date).getTime()-new Date(g.date).getTime())),ge=e.computed(()=>Me.value.find(m=>m.id===p.value));e.watch(()=>Me.value.map(m=>m.id).join(","),()=>{var m;(!p.value||!Me.value.some(g=>g.id===p.value))&&(p.value=(m=Me.value[0])==null?void 0:m.id)});const Be=m=>{if(t.dayTitle)return t.dayTitle(m);const g=new Date(m.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Pt=m=>{const g=new Date(m);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},It=async(m,g)=>{g&&(m.date=new Date(g),await t.persist.updateDay(m),await t.persist.refresh())},Jt=async m=>{var w;if(!m)return;for(const T of lt(m))await We(T);await t.persist.removeDay(m);const g=(t.days||[]).indexOf(m);g>=0&&t.days.splice(g,1),await t.persist.refresh(),p.value=(w=Me.value[0])==null?void 0:w.id},bn=async()=>{var F,X;const m=Me.value,g=m[m.length-1],w=g?new Date(new Date(g.date).getTime()+864e5):new Date;let T;try{T=r.value.createDay(w)}catch{t.persist.notify("warning",i.value.saveEventFirst);return}try{await((X=(F=t.persist).createDay)==null?void 0:X.call(F,T));for(const fe of t.places||[])await Ze(fe,T);await t.persist.refresh()}catch{t.persist.notify("negative",i.value.createFailed);return}p.value=T.id,t.persist.notify("positive",`${i.value.dayAdded}: ${Be(T)}`)},lt=m=>((m==null?void 0:m.schedules)||[]).slice().sort((g,w)=>{const T=je(g),F=je(w);return T.localeCompare(F,"ru")}),je=m=>{if(t.hallName)return t.hallName(m);const g=m.place||(t.places||[]).find(w=>w.id===m.placeId);return(g==null?void 0:g.name)||i.value.hall},be=()=>{k.value=!0},Q=e.computed(()=>{const m=ge.value,g=new Set(((m==null?void 0:m.schedules)||[]).map(w=>w.placeId));return(t.places||[]).filter(w=>!g.has(w.id))}),Ze=async(m,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(m,g,r.value.createSchedule);return}const w=r.value.createSchedule(m.id,g.id);await t.persist.createSchedule(w)},St=async m=>{k.value=!1;const g=ge.value;if(!g){t.persist.notify("warning",i.value.selectDayFirst);return}if(lt(g).some(w=>w.placeId===m.id)){t.persist.notify("warning",i.value.alreadyAdded);return}try{await Ze(m,g)}catch(w){console.warn("addPlaceToDay failed:",w),t.persist.notify("negative",i.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),p.value=g.id},ye=async()=>{var w,T,F;const m=(w=C.value)==null?void 0:w.trim();if(!m){t.persist.notify("warning",i.value.enterName);return}const g=r.value.createPlace(m);try{if(!await((F=(T=t.persist).createPlace)==null?void 0:F.call(T,g))){t.persist.notify("negative",i.value.hallCreateFailed);return}}catch(X){console.warn("createPlace failed:",X),t.persist.notify("negative",i.value.hallCreateFailed);return}C.value="",await St(g),t.persist.notify("positive",i.value.hallCreated.replace("{name}",m))},se=async m=>{await We(m);const g=vt(m);g&&(g.schedules=(g.schedules||[]).filter(w=>w.id!==m.id)),await t.persist.refresh()},We=async m=>{for(const g of m.sessions||[]){for(const w of a(g))await t.persist.removeSlot(w);await t.persist.removeSession(g)}for(const g of s(m))await t.persist.removeSlot(g);await t.persist.removeSchedule(m)},vt=m=>(t.days||[]).find(g=>(g.schedules||[]).some(w=>w.id===m.id)),ct=m=>[...a(m)].sort(cr),rt=m=>(m.sessions||[]).some(g=>a(g).length>0),Kt=new WeakMap,Fe=m=>{const g=Kt.get(m),w=s(m);if(g&&g.src===w)return g.list;const T=new Set((m.sessions||[]).map(X=>X.id)),F=w.filter(X=>!X.sessionId||!T.has(X.sessionId));return Kt.set(m,{src:w,list:F}),F},Rt=m=>[...o.value?(m.sessions||[]).map(g=>({kind:"session",item:g})):[],...Fe(m).map(g=>({kind:"slot",item:g}))],Cn=m=>o.value?(m.sessions||[]).map(g=>({kind:"session",item:g})):[],ue=e.computed(()=>{var g,w;const m=(((g=ge.value)==null?void 0:g.schedules)||[]).flatMap(T=>Rt(T));for(const T of((w=ge.value)==null?void 0:w.schedules)||[])for(const F of T.sessions||[])m.push(...ct(F).map(X=>({kind:"slot",item:X})));return Ca(m)}),ee=e.computed(()=>{const m=[];for(let g=ue.value.start;g<=ue.value.end;g+=60)m.push({min:g,label:Xe(g)});return m}),Oe=e.computed(()=>{const m=[];for(let g=ue.value.start+30;g<ue.value.end;g+=60)m.push({min:g,label:Xe(g)});return m}),st=m=>Sa(m,ue.value),gt=e.computed(()=>{if(!b.value||!y.value)return{};const m=ue.value,g=(b.value.minutes-m.start)/m.total*100,w=Math.max(y.value.duration/m.total*100,2.5);return{top:g+"%",height:w+"%"}}),en=e.computed(()=>!b.value||!y.value?"":Xe(b.value.minutes+y.value.duration)),Sn=e.computed(()=>{if(!b.value)return{};const m=ue.value,g=(b.value.minutes-m.start)/m.total*100,w=Math.max(yn/m.total*100,1.5);return{top:g+"%",height:w+"%"}}),dt=e.computed(()=>{var F,X,fe,Te,Re;if(!b.value||!y.value||!y.value.id)return 0;const m=Gn(b.value.scheduleId);if(!m)return 0;const g={startTime:b.value.time,endTime:en.value},w=(F=b.value.session)==null?void 0:F.id;let T=0;for(const R of Rt(m))R.item.id!==((X=y.value)==null?void 0:X.id)&&(((fe=y.value)==null?void 0:fe.kind)==="slot"&&R.kind==="session"&&R.item.id===w||ho(g,R.item)&&T++);if(((Te=y.value)==null?void 0:Te.kind)==="slot"&&b.value.session)for(const R of ct(b.value.session))R.id!==((Re=y.value)==null?void 0:Re.id)&&ho(g,R)&&T++;return T}),fi=e.computed(()=>dt.value>0),mi=(m,g)=>xa(Rt(m),g,ho),_r=(m,g)=>Ea(ct(m),g,ho),kn=(m,g)=>ka(m,g),Hr=m=>{const g=ue.value,w=ae(m.item.startTime),T=ae(m.item.endTime);return!isFinite(w)||!isFinite(T)?48:(T-w)/g.total*Ee.value},Wn=m=>Na(Hr(m)),Ur=m=>{const g=t.slotName?t.slotName(m.item):m.item.name||(m.kind==="session"?i.value.session:i.value.slot);if(m.kind==="slot"&&Wn(m)!=="h-full"){const w=f(m.item);if(w)return`${g} — ${w}`}return g},bo=(m,g)=>{const w=u(m);if(g!=="h-full"){const T=f(m);if(T)return`${w} — ${T}`}return w},B=m=>{const g=`${m.item.startTime||"?"}–${m.item.endTime||"?"}`;if(m.kind==="slot"){const w=f(m.item);return[u(m.item),g,w?`${i.value.participants}: ${w}`:""].filter(Boolean).join(`
23
- `)}return[l(m.item),g].filter(Boolean).join(`
24
- `)},V=m=>{const g=f(m);return[u(m),`${m.startTime}–${m.endTime}`,g?`${i.value.participants}: ${g}`:""].filter(Boolean).join(`
25
- `)},I=(m,g)=>{var w;return{conflict:_r(m.item,g),dragging:((w=yt.value)==null?void 0:w.perfom.id)===g.id,[Wn(m)]:!0}},O=e.ref(null),Y=(m,g)=>{const w=m.getBoundingClientRect(),T=Math.min(Math.max((g-w.top)/w.height,0),1);return ue.value.start+po(T*ue.value.total,yn)},Pe=(m,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||P.value||(O.value={gi:m,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",Ne),window.addEventListener("pointerup",U),window.addEventListener("pointercancel",me),window.addEventListener("keydown",we))},Ne=m=>{const g=O.value;if(g){if(!g.moved){if(Math.hypot(m.clientX-g.startX,m.clientY-g.startY)<$a)return;g.moved=!0;const w=Ln(g.gi.item.startTime,g.gi.item.endTime);y.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"}te(m.clientX,m.clientY),H(m.clientX,m.clientY)}},te=(m,g)=>{var Te,Re;const w=document.elementFromPoint(m,g),T=w==null?void 0:w.closest(".hall-col"),F=T==null?void 0:T.getAttribute("data-schedule-id");if(!T||!F){M.value=void 0,b.value=null;return}const X=Gn(F);if(!X)return;M.value=X.id;const fe=Y(T,g);b.value={scheduleId:X.id,minutes:fe,time:Xe(fe),hallName:je(X),...((Te=y.value)==null?void 0:Te.kind)==="slot"&&o.value?{session:pi(X.sessions,fe,fe+(((Re=y.value)==null?void 0:Re.duration)||30),ae)}:{}},$.value={x:m,y:g}},H=(m,g)=>{const w=G.value;if(!w)return;const T=w.getBoundingClientRect();g<T.top+48?w.scrollTop-=14:g>T.bottom-48&&(w.scrollTop+=14),m<T.left+48?w.scrollLeft-=14:m>T.right-48&&(w.scrollLeft+=14)},U=m=>{v(m)},v=async m=>{const g=O.value;if(q(),O.value=null,!g||!g.moved)return;A.value=Date.now();const w=document.elementFromPoint(m.clientX,m.clientY),T=w==null?void 0:w.closest(".hall-col"),F=T==null?void 0:T.getAttribute("data-schedule-id"),X=F?Gn(F):void 0;if(T&&X){const fe=Y(T,m.clientY);await xl(X,fe)}ne()},q=()=>{window.removeEventListener("pointermove",Ne),window.removeEventListener("pointerup",U),window.removeEventListener("pointercancel",me),window.removeEventListener("keydown",we)},ne=()=>{O.value=null,y.value=null,M.value=void 0,b.value=null,$.value=null,document.body.style.userSelect="",document.body.style.cursor="",A.value=Date.now()},me=()=>{q(),ne()},we=m=>{m.key==="Escape"&&me()};e.onBeforeUnmount(()=>{q(),jr(),uw(),document.body.style.userSelect="",document.body.style.cursor=""});const Je=m=>{if(!m)return null;for(const g of t.days||[])for(const w of g.schedules||[]){const T=(w.sessions||[]).find(X=>X.id===m);if(T)return{kind:"session",item:T,schedule:w};const F=s(w).find(X=>X.id===m);if(F)return{kind:"slot",item:F,schedule:w}}return null},hi=()=>{var m;return Je((m=y.value)==null?void 0:m.id)},vr=(m,g)=>{g.preventDefault(),g.stopPropagation();const w=m.item,T=ae(w.startTime),F=ae(w.endTime);if(!isFinite(T)||!isFinite(F))return;const X=g.clientY;P.value=!0;const fe=R=>{const W=(R.clientY-X)/$e.value*60,J=po(F+W,yn);w.endTime=Xe(Math.max(J,T+yn))},Te=async()=>{window.removeEventListener("pointermove",fe),window.removeEventListener("pointerup",Re),P.value=!1,A.value=Date.now();const R=Je(w.id);R&&(await kt(w,R.kind),await t.persist.refresh())},Re=()=>{Te()};window.addEventListener("pointermove",fe),window.addEventListener("pointerup",Re)},yt=e.ref(null),ow=(m,g,w)=>{if(w.target.closest(".nested-edit, .nested-resize")||w.button!==0||P.value)return;const T=w.target.closest(".session-perfoms"),F=ae(m.startTime),X=ae(m.endTime),fe=Ln(g.startTime,g.endTime);!T||!isFinite(F)||!isFinite(X)||X<=F||(yt.value={perfom:g,session:m,startX:w.clientX,startY:w.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:F,sessionDur:X-F,durMin:isFinite(fe)&&fe>0?fe:30,container:T},window.addEventListener("pointermove",Cl),window.addEventListener("pointerup",Sl),window.addEventListener("pointercancel",qr),window.addEventListener("keydown",kl))},Cl=m=>{const g=yt.value;if(!g)return;if(!g.moved){if(Math.hypot(m.clientX-g.startX,m.clientY-g.startY)<$a)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const w=g.container.getBoundingClientRect(),T=Math.min(Math.max((m.clientY-w.top)/w.height,0),1);let F=g.sessionStart+po(T*g.sessionDur,yn);const X=g.sessionStart+g.sessionDur-g.durMin;F=Math.min(Math.max(F,g.sessionStart),Math.max(X,g.sessionStart)),g.perfom.startTime=Xe(F),g.perfom.endTime=Xe(F+g.durMin),$.value={x:m.clientX,y:m.clientY}},Sl=m=>{iw(m)},iw=async m=>{var fe;const g=yt.value;if(jr(),yt.value=null,$.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;A.value=Date.now();const w=document.elementFromPoint(m.clientX,m.clientY),T=w==null?void 0:w.closest(".hall-col"),F=T==null?void 0:T.getAttribute("data-schedule-id"),X=F?Gn(F):void 0;if(T&&X){y.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||i.value.slot,duration:g.durMin};const Te=Y(T,m.clientY),Re=Xe(Te),R=Ln(g.perfom.startTime,g.perfom.endTime),W=bt(Re,R>0?R:30),J=((fe=Nl(g.perfom))==null?void 0:fe.id)===X.id&&g.perfom.startTime===Re&&g.perfom.endTime===W;await xl(X,Te),J&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),y.value=null;return}g.perfom.startTime=gn(g.perfom.startTime),g.perfom.endTime=gn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},qr=()=>{const m=yt.value;jr(),m&&(m.perfom.startTime=m.savedStart,m.perfom.endTime=m.savedEnd),yt.value=null,$.value=null,document.body.style.userSelect="",document.body.style.cursor=""},jr=()=>{window.removeEventListener("pointermove",Cl),window.removeEventListener("pointerup",Sl),window.removeEventListener("pointercancel",qr),window.removeEventListener("keydown",kl)},kl=m=>{m.key==="Escape"&&qr()},rw=(m,g,w)=>{w.preventDefault(),w.stopPropagation();const T=ae(m.startTime),F=ae(m.endTime),X=ae(g.startTime),fe=w.target.closest(".nested-perfom"),Te=fe==null?void 0:fe.closest(".session-perfoms");if(!fe||!Te||!isFinite(T)||!isFinite(F)||F<=T||!isFinite(X))return;const Re=Te.getBoundingClientRect(),R=F-T;P.value=!0;const W=qt=>{const ww=Math.min(Math.max((qt.clientY-Re.top)/Re.height,0),1),bw=Math.min(Math.max(X+yn,T+po(ww*R,yn)),F);g.endTime=Xe(bw)},J=async()=>{window.removeEventListener("pointermove",W),window.removeEventListener("pointerup",j),P.value=!1,A.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},j=()=>{J()};window.addEventListener("pointermove",W),window.addEventListener("pointerup",j)},xl=async(m,g)=>{var W;M.value=void 0,b.value=null,$.value=null;const w=hi();if(!w)return;const T=Xe(g),F=Ln(w.item.startTime,w.item.endTime),X=bt(T,F>0?F:30);if(((W=w.schedule)==null?void 0:W.id)===m.id&&w.item.startTime===T&&w.item.endTime===X)return;const fe=w.item.startTime;if(w.item.startTime=T,w.item.endTime=X,w.kind==="slot"&&o.value){const J=pi(m.sessions,ae(T),ae(X),ae);J?w.item.sessionId=J.id:delete w.item.sessionId}else w.kind==="slot"&&delete w.item.sessionId;if(w.kind==="session"){const J=ae(T)-ae(fe);for(const j of ct(w.item))j.startTime&&(j.startTime=bt(j.startTime,J),j.endTime&&(j.endTime=bt(j.endTime,J)),j.scheduleId=m.id,await kt(j,"slot"))}const Te=w.schedule,Re=w.kind==="session"?m.sessions:s(m),R=w.item;if(Te&&Te.id!==m.id){R.scheduleId=m.id;const J=w.kind==="session"?Te.sessions:s(Te);z.H.Classes.RemoveFromClassById(R.id,J,[]),Re.push(R)}await kt(R,w.kind),await t.persist.refresh()},sw=async(m,g)=>{if(g.target.closest(".timeline-block"))return;const w=Y(g.currentTarget,g.clientY),T=r.value.createSlot(m);if(T.startTime=Xe(w),T.endTime=Xe(w+30),o.value){const X=pi(m.sessions,w,w+30,ae);X!=null&&X.id&&(T.sessionId=X.id)}await t.persist.createSlot(T),await t.persist.refresh();const F=Je(T.id);F&&tn(F)},El=async(m,g,w)=>{if(m.added){if(m.added.element.scheduleId=g.id,w==="slot"&&m.added.element.sessionId&&((g.sessions||[]).some(F=>F.id===m.added.element.sessionId)||delete m.added.element.sessionId),await kt(m.added.element,w),w==="session")for(const T of a(m.added.element))T.scheduleId=g.id,await t.persist.updateSlot(T);await t.persist.refresh()}},Gn=m=>{for(const g of t.days||[]){const w=(g.schedules||[]).find(T=>T.id===m);if(w)return w}},pi=(m,g,w,T)=>Ba(m,g,w,T),Bl=m=>o.value?((m==null?void 0:m.sessions)||[]).map(g=>({id:g.id,label:l(g)})):[],Nl=m=>{for(const g of t.days||[])for(const w of g.schedules||[])if(s(w).some(T=>T.id===m.id)||m.sessionId&&(w.sessions||[]).some(T=>T.id===m.sessionId))return w},Vl=e.computed(()=>{const m=E.value;if(m)return m.kind==="session"?Gn(m.item.scheduleId)||$l(m.item,"session"):Nl(m.item)}),aw=e.computed(()=>{const m=E.value;return!m||m.kind!=="slot"?[]:Bl(Vl.value)}),$l=(m,g)=>{for(const w of t.days||[])for(const T of w.schedules||[])if(g==="session"){if((T.sessions||[]).some(F=>F.id===m.id))return T}else if(s(T).some(F=>F.id===m.id))return T},Tl=async(m,g)=>{g?m.sessionId=g:delete m.sessionId,await t.persist.updateSlot(m),await t.persist.refresh()},Ml=async m=>{if(!o.value)return;const g=r.value.createSession(m);await t.persist.createSession(g),await t.persist.refresh()},lw=async(m,g)=>{const w=r.value.createSlot(m);if(w.startTime=Xe(g),w.endTime=bt(w.startTime,30),o.value){const F=pi(m.sessions,g,g+30,ae);F!=null&&F.id&&(w.sessionId=F.id)}await t.persist.createSlot(w),await t.persist.refresh();const T=Je(w.id);T&&tn(T)},Pl=async m=>{const g=r.value.createSlot(m),w=[...s(m)].sort(cr).slice(-1)[0];g.startTime=gn(w==null?void 0:w.endTime)||"9:00",g.endTime=bt(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},At=e.ref(null),cw=m=>{At.value=null,m.action()},Wr=(m,g)=>{const w=g.length*34+12;At.value={x:Math.min(m.clientX,window.innerWidth-210),y:Math.min(m.clientY,window.innerHeight-w-8),items:g}},Il=()=>{At.value=null},Rl=()=>{At.value=null},Al=m=>{m.key==="Escape"&&(At.value=null)},gi=()=>{At.value=null},Gr=e.ref(!1),dw=()=>{Gr.value||(window.addEventListener("click",Il),window.addEventListener("contextmenu",Rl),window.addEventListener("keydown",Al),window.addEventListener("scroll",gi,!0),window.addEventListener("resize",gi),Gr.value=!0)},uw=()=>{window.removeEventListener("click",Il),window.removeEventListener("contextmenu",Rl),window.removeEventListener("keydown",Al),window.removeEventListener("scroll",gi,!0),window.removeEventListener("resize",gi),Gr.value=!1};dw();const fw=(m,g)=>{const w=[{icon:"edit",label:i.value.edit,action:()=>tn(m)},{icon:"content_copy",label:i.value.duplicate,action:()=>void zl(m)},{icon:"delete",label:i.value.delete,danger:!0,action:()=>void Co(m.item,m.kind)}];Wr(g,w)},mw=(m,g)=>{const w={kind:"slot",item:m},T=[{icon:"edit",label:i.value.edit,action:()=>tn(w)},{icon:"content_copy",label:i.value.duplicate,action:()=>void zl(w)},{icon:"delete",label:i.value.delete,danger:!0,action:()=>void Co(m,"slot")}];Wr(g,T)},hw=(m,g)=>{const w=Y(g.currentTarget,g.clientY),T=Xe(w),F=[{icon:"mic",label:`${i.value.addSlot} · ${T}`,action:()=>void lw(m,w)}];o.value&&F.push({icon:"groups",label:`${i.value.addSession} · ${T}`,action:()=>void pw(m,w)}),Wr(g,F)},pw=async(m,g)=>{if(!o.value)return;const w=r.value.createSession(m);w.startTime=Xe(g),w.endTime=bt(w.startTime,30),await t.persist.createSession(w),await t.persist.refresh()},zl=async m=>{const g=Gn(m.item.scheduleId)||$l(m.item,m.kind);if(!g)return;const w=Ln(m.item.startTime,m.item.endTime)||30,T=gn(m.item.endTime)||"9:00";if(m.kind==="slot"){const F=r.value.createSlot(g);F.name=m.item.name?`${m.item.name} (копия)`:m.item.name,F.startTime=T,F.endTime=bt(T,w),F.sessionId=m.item.sessionId,m.item.description&&(F.description=m.item.description),m.item.payload&&(F.payload={...m.item.payload}),await t.persist.createSlot(F)}else{const F=r.value.createSession(g);F.name=m.item.name?`${m.item.name} (копия)`:m.item.name,F.startTime=T,F.endTime=bt(T,w),F.scheduleId=g.id,await t.persist.createSession(F)}await t.persist.refresh()},Co=async(m,g)=>{if(g==="slot")await t.persist.removeSlot(m);else{for(const w of a(m))delete w.sessionId,await t.persist.updateSlot(w);await t.persist.removeSession(m)}await t.persist.refresh()},kt=async(m,g)=>{const w=gn(m.startTime),T=gn(m.endTime);if(!w){t.persist.notify("warning",i.value.correctStartTime);return}m.startTime=w,m.endTime=T||bt(w,30),g==="slot"?await t.persist.updateSlot(m):await t.persist.updateSession(m)},tn=m=>{P.value||Date.now()-A.value<400||(E.value={kind:m.kind,item:m.item},N.value=!0)},gw=async()=>{const m=E.value;m&&(await kt(m.item,m.kind),N.value=!1,E.value=null,await t.persist.refresh())},yw=async()=>{const m=E.value;m&&(await Co(m.item,m.kind),N.value=!1,E.value=null)};return t.persist.loadOptions&&t.persist.loadOptions(),(m,g)=>{var Te,Re;const w=e.resolveComponent("PButton"),T=e.resolveComponent("PInput"),F=e.resolveComponent("PTooltip"),X=e.resolveComponent("PSelect"),fe=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",Km,[(Te=n.days)!=null&&Te.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",th,[e.createVNode(e.unref(x.QTabs),{modelValue:p.value,"onUpdate:modelValue":g[0]||(g[0]=R=>p.value=R),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me.value,R=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:R.id,name:R.id,label:Be(R)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(x.QSpace)),ge.value?(e.openBlock(),e.createBlock(T,{key:0,"model-value":Pt(ge.value.date),label:i.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=R=>It(ge.value,R))},null,8,["model-value","label"])):e.createCommentVNode("",!0),e.createVNode(w,{size:"sm",color:"negative",outline:"",icon:"delete",label:i.value.deleteDay,disable:!ge.value,onClick:g[2]||(g[2]=R=>Jt(ge.value))},null,8,["label","disable"]),e.createVNode(w,{size:"sm",color:"primary",outline:"",icon:"event",label:i.value.addDay,onClick:bn},null,8,["label"]),e.createVNode(w,{size:"sm",color:"primary",outline:"",icon:"add",label:i.value.addHall,onClick:be},null,8,["label"]),h.value==="grid"?(e.openBlock(),e.createElementBlock("div",nh,[e.createVNode(e.unref(x.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(x.QBtnToggle),{modelValue:$e.value,"onUpdate:modelValue":g[3]||(g[3]=R=>$e.value=R),"toggle-color":"primary",options:de,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QBtnToggle),{modelValue:h.value,"onUpdate:modelValue":g[4]||(g[4]=R=>h.value=R),"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"])]),h.value==="grid"?(e.openBlock(),e.createElementBlock("div",oh,[lt(ge.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:G,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":lt(ge.value).length,"--hours":Math.max(ue.value.total/60,1),"--half-hours":Math.max(ue.value.total/60*2,2)})},[e.createElementVNode("div",rh,[g[17]||(g[17]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt(ge.value),R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:e.normalizeClass(["hall-head",{"drag-over":M.value===R.id}])},[e.createElementVNode("div",sh,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",ah,e.toDisplayString(je(R)),1),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:W=>Pl(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),o.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:W=>Ml(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.addSession),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>se(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])],2))),128))]),e.createElementVNode("div",{class:"grid-body",style:e.normalizeStyle({height:De.value})},[e.createElementVNode("div",lh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value,R=>(e.openBlock(),e.createElementBlock("div",{key:R.min,class:"hour-label",style:e.normalizeStyle({top:(R.min-ue.value.start)/ue.value.total*100+"%"})},e.toDisplayString(R.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,R=>(e.openBlock(),e.createElementBlock("div",{key:R.min,class:"half-label",style:e.normalizeStyle({top:(R.min-ue.value.start)/ue.value.total*100+"%"})},e.toDisplayString(R.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt(ge.value),R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:e.normalizeClass(["hall-col",{"drag-over":M.value===R.id}]),"data-schedule-id":R.id,onDblclick:W=>sw(R,W),onContextmenu:e.withModifiers(W=>hw(R,W),["prevent","stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rt(R),W=>{var J;return e.openBlock(),e.createElementBlock("div",{key:W.item.id,class:e.normalizeClass(["timeline-block",[W.kind,{conflict:mi(R,W),dragging:((J=y.value)==null?void 0:J.id)===W.item.id},Wn(W)]]),style:e.normalizeStyle(st(W)),title:B(W),onPointerdown:j=>Pe(W,j),onClick:j=>tn(W),onContextmenu:e.withModifiers(j=>fw(W,j),["prevent","stop"])},[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",uh,[e.createElementVNode("div",fh,e.toDisplayString(W.item.startTime)+"–"+e.toDisplayString(W.item.endTime),1),e.createElementVNode("div",mh,e.toDisplayString(Ur(W)),1),W.kind==="slot"&&f(W.item)?(e.openBlock(),e.createElementBlock("div",hh,e.toDisplayString(f(W.item)),1)):e.createCommentVNode("",!0)]),W.kind==="session"&&ct(W.item).length?(e.openBlock(),e.createElementBlock("div",ph,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ct(W.item),j=>(e.openBlock(),e.createElementBlock("div",{key:j.id,class:e.normalizeClass(["nested-perfom",I(W,j)]),style:e.normalizeStyle(kn(W.item,j)),title:V(j),onPointerdown:e.withModifiers(qt=>ow(W.item,j,qt),["stop"]),onClick:e.withModifiers(qt=>tn({kind:"slot",item:j}),["stop"]),onContextmenu:e.withModifiers(qt=>mw(j,qt),["prevent","stop"])},[e.createElementVNode("div",yh,e.toDisplayString(j.startTime)+"–"+e.toDisplayString(j.endTime),1),e.createElementVNode("div",wh,e.toDisplayString(bo(j,Wn(W))),1),f(j)?(e.openBlock(),e.createElementBlock("div",bh,e.toDisplayString(f(j)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),e.createElementVNode("div",{class:"nested-resize",title:i.value.changeDurationTitle,onPointerdown:e.withModifiers(qt=>rw(W.item,j,qt),["stop","prevent"])},null,40,Ch)],46,gh))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Sh,[mi(R,W)?(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.conflictTitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:e.withModifiers(j=>tn(W),["stop"])},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",{class:"block-resize",title:i.value.changeDurationTitle,onPointerdown:e.withModifiers(j=>vr(W,j),["stop","prevent"])},null,40,kh)],46,dh)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Cn(R),W=>{var J;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+W.item.id,class:e.normalizeClass(["session-spine",{dragging:((J=y.value)==null?void 0:J.id)===W.item.id}]),style:e.normalizeStyle(st(W)),title:l(W.item)},[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",Eh,e.toDisplayString(l(W.item)),1)],14,xh)}),128)),b.value&&b.value.scheduleId===R.id&&y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:fi.value}]),style:e.normalizeStyle(Sn.value)},null,6)):e.createCommentVNode("",!0),b.value&&b.value.scheduleId===R.id&&y.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[y.value.kind,{conflict:fi.value}]]),style:e.normalizeStyle(gt.value)},[e.createElementVNode("div",Bh,[e.createTextVNode(e.toDisplayString(b.value.time)+"–"+e.toDisplayString(en.value)+" ",1),b.value.session?(e.openBlock(),e.createElementBlock("span",Nh,e.toDisplayString(i.value.intoSession),1)):e.createCommentVNode("",!0),dt.value?(e.openBlock(),e.createElementBlock("span",Vh," ⚠ "+e.toDisplayString(i.value.conflictCount)+": "+e.toDisplayString(dt.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",$h,e.toDisplayString(y.value.name),1)],6)):e.createCommentVNode("",!0)],42,ch))),128))],4),e.createElementVNode("div",Th,e.toDisplayString(i.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",ih,[e.createTextVNode(e.toDisplayString(i.value.noHalls)+" ",1),e.createVNode(w,{flat:"",color:"primary",size:"sm",label:i.value.addHall,onClick:be},null,8,["label"])])),$.value&&b.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:$.value.x+"px",top:$.value.y+"px"})},[e.createVNode(e.unref(x.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(b.value.time)+" · "+e.toDisplayString(b.value.hallName)+" ",1),b.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[18]||(g[18]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(x.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(i.value.intoSession)+" «"+e.toDisplayString(l(b.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),dt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[19]||(g[19]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(x.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(dt.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(Re=yt.value)!=null&&Re.moved&&$.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:$.value.x+"px",top:$.value.y+"px"})},[e.createVNode(e.unref(x.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(yt.value.perfom.startTime)+"–"+e.toDisplayString(yt.value.perfom.endTime)+" · "+e.toDisplayString(i.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Mh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt(ge.value),R=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{key:R.id,class:"hall-card q-mb-md"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"hall-card-head"},{default:e.withCtx(()=>[e.createElementVNode("div",Ph,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",Ih,e.toDisplayString(je(R)),1),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.session,onClick:W=>Ml(R)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.slot,onClick:W=>Pl(R)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>se(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])]),_:2},1024),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var W;return[o.value&&((W=R.sessions)!=null&&W.length)?(e.openBlock(),e.createElementBlock("div",Rh,[e.createElementVNode("div",Ah,[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(i.value.sessionsTitle),1)]),e.createVNode(e.unref(wi),{list:R.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:J=>El(J,R,"session")},{item:e.withCtx(({element:J})=>[e.createElementVNode("div",zh,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(T,{"model-value":J.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":j=>J.name=j,onBlur:j=>kt(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.startTime=j,onBlur:j=>kt(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.endTime=j,onBlur:j=>kt(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.renderSlot(m.$slots,"session-row-extra",{element:J,schedule:R},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:j=>Co(J,"session")},null,8,["onClick"])]),ct(J).length?(e.openBlock(),e.createElementBlock("div",Dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ct(J),j=>(e.openBlock(),e.createElementBlock("div",{key:j.id,class:"list-row nested-row"},[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),e.createElementVNode("div",Fh,e.toDisplayString(u(j)),1),e.createElementVNode("div",Oh,e.toDisplayString(j.startTime)+"–"+e.toDisplayString(j.endTime),1),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:qt=>tn({kind:"slot",item:j})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Lh,[e.createElementVNode("div",_h,[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(i.value.slotsTitle),1)]),e.createVNode(e.unref(wi),{list:Fe(R),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:J=>El(J,R,"slot")},{item:e.withCtx(({element:J})=>[e.createElementVNode("div",Hh,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(T,{"model-value":J.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":j=>J.name=j,onBlur:j=>kt(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.startTime=j,onBlur:j=>kt(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.endTime=j,onBlur:j=>kt(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),o.value?(e.openBlock(),e.createBlock(X,{key:0,"model-value":J.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:Bl(R),"option-value":"id","option-label":"label","onUpdate:modelValue":j=>Tl(J,j)},null,8,["model-value","label","options","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"slot-row-extra",{element:J,schedule:R},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:j=>Co(J,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!Fe(R).length&&!rt(R)?(e.openBlock(),e.createElementBlock("div",Uh,e.toDisplayString(i.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",vh,e.toDisplayString(i.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",eh,[e.createVNode(e.unref(x.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(i.value.noDays),1),e.createVNode(w,{color:"primary",outline:"",label:i.value.addDay,icon:"event",class:"q-mt-sm",onClick:bn},null,8,["label"])])),e.createVNode(fe,{modelValue:k.value,"onUpdate:modelValue":g[7]||(g[7]=R=>k.value=R)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"700px","max-width":"80vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",qh,e.toDisplayString(i.value.addHall),1)]),_:1}),e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",jh,[e.createVNode(T,{modelValue:C.value,"onUpdate:modelValue":g[5]||(g[5]=R=>C.value=R),label:i.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(ye,["enter"])},null,8,["modelValue","label"]),e.createVNode(w,{color:"primary",label:i.value.create,icon:"add",dense:"",onClick:ye},null,8,["label"])]),e.renderSlot(m.$slots,"places-list",{day:ge.value,add:St},()=>[Q.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Wh,e.toDisplayString(i.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:"place-row row items-center q-gutter-sm"},[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),e.createElementVNode("span",Gh,e.toDisplayString(c(R)),1),e.createVNode(w,{size:"sm",color:"primary",outline:"",label:i.value.addHall,icon:"add",dense:"",onClick:W=>St(R)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(x.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(w,{label:i.value.close,color:"primary",onClick:g[6]||(g[6]=R=>k.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(fe,{modelValue:N.value,"onUpdate:modelValue":g[14]||(g[14]=R=>N.value=R)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"640px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>{var R;return[e.createElementVNode("div",Qh,e.toDisplayString(((R=E.value)==null?void 0:R.kind)==="session"?i.value.session:i.value.slot),1)]}),_:1}),E.value?(e.openBlock(),e.createBlock(e.unref(x.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:E.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=R=>E.value.item.name=R),label:i.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",Yh,[e.createElementVNode("div",Xh,[e.createVNode(T,{modelValue:E.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=R=>E.value.item.startTime=R),label:i.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",Zh,[e.createVNode(T,{modelValue:E.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=R=>E.value.item.endTime=R),label:i.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),E.value.kind==="slot"&&o.value?(e.openBlock(),e.createBlock(X,{key:0,"model-value":E.value.item.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:aw.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=R=>Tl(E.value.item,R))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"edit-form",{kind:E.value.kind,item:E.value.item,schedule:Vl.value},void 0,!0),E.value.kind==="slot"?(e.openBlock(),e.createBlock(T,{key:1,modelValue:E.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=R=>E.value.item.description=R),label:i.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QCardActions),{align:"right"},{default:e.withCtx(()=>[E.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"negative",label:i.value.delete,onClick:yw},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{flat:"",label:i.value.cancel,color:"primary",onClick:g[13]||(g[13]=R=>N.value=!1)},null,8,["label"]),e.createVNode(w,{label:i.value.save,color:"primary",onClick:gw},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),At.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"ctx-menu",style:e.normalizeStyle({left:At.value.x+"px",top:At.value.y+"px"}),onClick:g[15]||(g[15]=e.withModifiers(()=>{},["stop"])),onContextmenu:g[16]||(g[16]=e.withModifiers(()=>{},["prevent","stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(At.value.items,(R,W)=>(e.openBlock(),e.createElementBlock("div",{key:W,class:e.normalizeClass(["ctx-item",{"ctx-item--danger":R.danger}]),onClick:J=>cw(R)},[e.createVNode(e.unref(x.QIcon),{name:R.icon,size:"15px"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(R.label),1)],10,Jh))),128))],36)):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-9237bcac"]]),Kh={class:"schedule-timeline"},ep={key:0,class:"timeline-container"},tp={class:"day-header"},np={class:"day-title"},op={class:"timeline"},ip={key:0,class:"schedule-place"},rp={class:"events-column"},sp={key:0,class:"event-item session-item"},ap={class:"event-content"},lp={class:"event-time"},cp={class:"event-main"},dp={class:"event-name"},up={key:0,class:"speakers-list"},fp=["onClick"],mp={class:"speaker-details"},hp={class:"speaker-name"},pp={class:"bio-text"},gp=["onClick"],yp={key:0,class:"perfom-divider"},wp={class:"event-content"},bp={class:"event-time"},Cp={class:"event-main"},Sp={class:"event-name"},kp={class:"event-badges"},xp={key:0,class:"speakers-list"},Ep=["onClick"],Bp={class:"speaker-details"},Np={class:"speaker-name"},Vp={class:"bio-text"},$p={key:1,class:"no-program"},Ma=D(e.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:t}){const o=n,i=t,r=e.computed(()=>({noProgram:o.noProgramText||"Программа пока не опубликована"})),s=b=>{if(o.dayTitle)return o.dayTitle(b);const $=new Date(b.date);return isNaN($.getTime())||$.getFullYear()<2e3?"":$.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=b=>{var $;return o.placeName?o.placeName(b):(($=b.place)==null?void 0:$.name)||b.placeName||""},c=b=>o.slotName?o.slotName(b):(b==null?void 0:b.name)||"",l=b=>o.sessionName?o.sessionName(b):(b==null?void 0:b.name)||"",u=b=>o.slotParticipants?o.slotParticipants(b):(b==null?void 0:b.participants)||[],f=b=>o.sessionParticipants?o.sessionParticipants(b):(b==null?void 0:b.participants)||[],h=b=>{var $,P;return o.participantName?o.participantName(b):(b==null?void 0:b.name)||(b==null?void 0:b.fullName)||((P=($=b==null?void 0:b.human)==null?void 0:$.getFullName)==null?void 0:P.call($))||""},p=b=>o.participantBio?o.participantBio(b):(b==null?void 0:b.bio)||(b==null?void 0:b.regalias)||"",k=b=>o.slotListOf?o.slotListOf(b):(b==null?void 0:b.slots)||[],C=b=>o.nestedSlotListOf?o.nestedSlotListOf(b):(b==null?void 0:b.slots)||[],N=b=>b.schedules.filter($=>{var P;return k($).length>0||(((P=$.sessions)==null?void 0:P.length)||0)>0}),E=b=>{const $=[],P=new Set((b.sessions||[]).map(G=>G.id));for(const G of b.sessions||[]){$.push({kind:"session",item:G,nested:!1,index:0});for(const de of C(G))$.push({kind:"slot",item:de,nested:!0,index:0})}let A=0;for(const G of k(b).filter(de=>!de.sessionId||!P.has(de.sessionId)))$.push({kind:"slot",item:G,nested:!1,index:A++});return $},y=e.computed(()=>{var b;return(b=o.days)==null?void 0:b.some($=>{var P;return(P=$.schedules)==null?void 0:P.some(A=>{var G;return k(A).length>0||(((G=A.sessions)==null?void 0:G.length)||0)>0})})}),M=(b,$)=>`${b} - ${$}`;return(b,$)=>(e.openBlock(),e.createElementBlock("div",Kh,[y.value?(e.openBlock(),e.createElementBlock("div",ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,P=>(e.openBlock(),e.createElementBlock("div",{key:P.id,class:"day-section"},[e.createElementVNode("div",tp,[e.createElementVNode("div",np,[e.createVNode(e.unref(x.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s(P)),1)])]),e.createElementVNode("div",op,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N(P),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"time-slot"},[a(A)?(e.openBlock(),e.createElementBlock("div",ip,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(A)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",rp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E(A),G=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:G.item.id},[G.kind==="session"?(e.openBlock(),e.createElementBlock("div",sp,[e.createElementVNode("div",ap,[e.createElementVNode("div",lp,e.toDisplayString(M(G.item.startTime,G.item.endTime)),1),e.createElementVNode("div",cp,[e.createElementVNode("div",dp,e.toDisplayString(l(G.item)),1),f(G.item).length?(e.openBlock(),e.createElementBlock("div",up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(G.item),de=>(e.openBlock(),e.createElementBlock("div",{key:de.id,class:"speaker-item",onClick:$e=>i("open-participant",de)},[e.createElementVNode("div",mp,[e.createElementVNode("div",hp,[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(h(de)),1)]),e.createElementVNode("div",pp,e.toDisplayString(p(de)),1)])],8,fp))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":G.item.active,"nested-item":G.nested},{clickable:o.slotClickable}]]),onClick:de=>o.slotClickable&&i("slot-click",G.item)},[!G.nested&&G.index>0?(e.openBlock(),e.createElementBlock("div",yp)):e.createCommentVNode("",!0),e.createElementVNode("div",wp,[e.createElementVNode("div",bp,e.toDisplayString(M(G.item.startTime,G.item.endTime)),1),e.createElementVNode("div",Cp,[e.createElementVNode("div",Sp,e.toDisplayString(c(G.item)),1),e.createElementVNode("div",kp,[e.renderSlot(b.$slots,"badges",{item:G.item},void 0,!0)]),u(G.item).length?(e.openBlock(),e.createElementBlock("div",xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(G.item),de=>(e.openBlock(),e.createElementBlock("div",{key:de.id,class:"speaker-item",onClick:$e=>i("open-participant",de)},[e.createElementVNode("div",Bp,[e.createElementVNode("div",Np,[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(h(de)),1)]),e.createElementVNode("div",Vp,e.toDisplayString(p(de)),1)])],8,Ep))),128))])):e.createCommentVNode("",!0)])])],10,gp))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",$p,[e.createVNode(e.unref(x.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),e.createElementVNode("p",null,e.toDisplayString(r.value.noProgram),1)])),e.renderSlot(b.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),Tp=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Ta,ScheduleTimeline:Ma},Symbol.toStringTag,{value:"Module"})),Mp=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:bt,blockSizeClass:Na,blockStyle:Sa,byStart:cr,diffM:Ln,findEnclosingSession:Ba,fromMin:Xe,gridBounds:Ca,hasConflict:xa,intersects:ho,nestedConflict:Ea,nestedSlotStyle:ka,normTime:gn,snapMinutes:po,toMin:ae},Symbol.toStringTag,{value:"Module"}));let Pp=class extends xe{constructor(){super(Zo,"schedule-days")}};const Ip=new Pp;let Rp=class extends xe{constructor(){super(On,"schedule-places")}};const Ap=new Rp;let zp=class extends xe{constructor(){super(Fn,"schedule-sessions")}};const Dp=new zp;let Fp=class extends xe{constructor(){super(Ot,"schedule-slots")}};const Op=new Fp;let Lp=class extends xe{constructor(){super(mo,"schedule-timetables")}};const _p=new Lp,Hp=Object.freeze(Object.defineProperty({__proto__:null,C:Jm,Components:Tp,H:Mp,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Ip,SchedulePlacesStore:Ap,ScheduleSessionsStore:Dp,ScheduleSlotsStore:Op,SchedulesStore:_p},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:Va,defaultScheduleLabels:dr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),ur=e.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:t}){const o=t,i=e.useAttrs(),r=e.computed(()=>{const s={};for(const a of Object.keys(i))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=i[a]);return s});return(s,a)=>(e.openBlock(),e.createBlock(e.unref(x.QChip),e.mergeProps(e.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]=c=>o("remove"))}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[s.$slots.avatar?{name:"avatar",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"avatar")]),key:"0"}:void 0,s.$slots.remove?{name:"remove",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"remove")]),key:"1"}:void 0]),1040,["label","color","text-color","outline","square","dense","removable"]))}}),Up={class:"tags-selector"},vp={key:0,class:"empty-state"},Jo=D(e.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:t}){const o=n,i=e.ref(""),r=o.store.Options,s=e.computed(()=>r.filter(l=>z.H.Strings.SearchIn(l.label,i.value))),a=t;e.onBeforeMount(async()=>{await o.store.GetOptions()});const c=async l=>{await o.store.Get(l.value),a("select",o.store.Item)};return(l,u)=>{const f=e.resolveDirective("ripple");return e.openBlock(),e.createElementBlock("div",Up,[e.createVNode(et,{modelValue:e.unref(i),"onUpdate:modelValue":u[0]||(u[0]=h=>e.isRef(i)?i.value=h:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),e.createVNode(e.unref(x.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QList),{dense:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),h=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.QItem),{key:h.value,clickable:"",class:"tag-item",onClick:p=>c(h)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemSection),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[f]])),128)),e.unref(s).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",vp,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),qp={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},jp={class:"edit-dialog-header"},Wp={class:"edit-dialog-title"},Gp={class:"edit-dialog-content"},Qp={key:0,class:"edit-dialog-actions"},_n=D(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},qp),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:o}){const i=x.ClosePopup,r=n,s=o,a=e.ref(!1);e.watch(()=>r.modelValue,p=>{a.value=p},{immediate:!0});const c=async()=>{s("confirm"),l()},l=()=>{s("close"),a.value=!1,s("update:modelValue",!1)},u=()=>{a.value&&l()};t({opened:a,toggle:()=>{a.value=!a.value,s("update:modelValue",a.value)}});const h=async()=>{await e.nextTick();const p=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');p&&"focus"in p&&p.focus()};return(p,k)=>(e.openBlock(),e.createBlock(dn,{modelValue:e.unref(a),"onUpdate:modelValue":[k[0]||(k[0]=C=>e.isRef(a)?a.value=C:null),l],position:"top",onKeydown:[e.withKeys(c,["enter"]),e.withKeys(u,["escape"])],onShow:h},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:r.width})},[e.createElementVNode("div",jp,[e.createElementVNode("div",Wp,e.toDisplayString(r.title),1),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(i)]])]),e.createElementVNode("div",Gp,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),r.showConfirm?(e.openBlock(),e.createElementBlock("div",Qp,[e.withDirectives(e.createVNode(oe,{flat:"",label:r.cancelLabel,size:"sm"},null,8,["label"]),[[e.unref(i)]]),e.createVNode(oe,{flat:"",label:r.confirmLabel,color:"primary",disable:r.disabled,size:"sm",onClick:c},null,8,["label","disable"])])):e.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-4c8226ef"]]),fr=D(e.defineComponent({__name:"PTableBadge",props:{row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"}},emits:["click"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(),s=()=>{r.value.toggle(),i("click")},a=async c=>{o.row[o.prop]=c,await o.store.Update(o.row),r.value.toggle()};return(c,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"tags-cell"},{default:e.withCtx(()=>{var u,f,h;return[e.createVNode(ur,{color:(u=n.row[n.prop])!=null&&u.id?"primary":"grey-3","text-color":(f=n.row[n.prop])!=null&&f.id?"white":"grey-6",outline:!((h=n.row[n.prop])!=null&&h.id),size:"sm",clickable:"",class:"tags-chip",onClick:s},{default:e.withCtx(()=>{var p;return[(p=n.row[n.prop])!=null&&p.id?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.row[n.prop][n.labelKey]),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(x.QIcon),{name:"add",size:"16px"}),l[0]||(l[0]=e.createTextVNode(" Добавить ",-1))],64))]}),_:1},8,["color","text-color","outline"])]}),_:1})),e.createVNode(_n,{ref_key:"edit",ref:r,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},()=>[e.createVNode(Jo,{store:n.storeOpts,onSelect:a},null,8,["store"])],!0)]),_:3},512)],64))}}),[["__scopeId","data-v-29efd68b"]]),Yp={class:"tag-name"},Xp={key:0,class:"tag-extra"},mr=e.defineComponent({__name:"PTableBadges",props:{items:{},row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"},cellKey:{default:""}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.items!==void 0?t.items:t.row?t.row[t.prop??""]:[]),r=e.computed(()=>i.value?(Array.isArray(i.value)?i.value:[i.value]).filter(f=>f==null?void 0:f.id):[]),s=e.computed(()=>r.value.length),a=e.computed(()=>{var u;return((u=r.value[0])==null?void 0:u[t.labelKey])||""}),c=e.computed(()=>Math.max(0,s.value-1)),l=async u=>{t.row&&t.prop&&t.store&&(t.row[t.prop]=u,await t.store.Update(t.row)),o.value.toggle()};return(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.cellKey,class:"tags-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["tags-badge",{empty:!e.unref(s),clickable:e.unref(s)}]),onClick:f[1]||(f[1]=e.withModifiers(h=>e.unref(s)?e.unref(o).toggle():void 0,["stop"]))},[e.unref(s)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",Yp,e.toDisplayString(e.unref(a)),1),e.unref(c)?(e.openBlock(),e.createElementBlock("span",Xp,"+"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:1,name:"add",size:"18px",color:"grey-5",onClick:f[0]||(f[0]=h=>e.unref(o).toggle())}))],2)]),_:1})),e.createVNode(_n,{ref_key:"edit",ref:o,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},()=>[n.storeOpts?(e.openBlock(),e.createBlock(Jo,{key:0,store:n.storeOpts,onSelect:l},null,8,["store"])):e.createCommentVNode("",!0)])]),_:3},512)],64))}}),Zp={key:0,class:"relation-label"},Jp={class:"relation-count"},hr=D(e.defineComponent({__name:"PTableCount",props:{label:{},count:{},to:{},cellKey:{default:""}},emits:["click"],setup(n,{emit:t}){const o=n,i=t,r=()=>{o.count!==0&&(o.to&&z.H.Router.To(o.to),i("click"))};return(s,a)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.cellKey,class:"relation-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["relation-badge",{"has-items":n.count>0}]),onClick:r},[n.label?(e.openBlock(),e.createElementBlock("span",Zp,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.createElementVNode("span",Jp,e.toDisplayString(n.count),1)],2)]),_:1}))}}),[["__scopeId","data-v-20c0d0d2"]]),pr=e.defineComponent({__name:"PTableEdit",props:{domen:{},row:{}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{"auto-width":""},{default:e.withCtx(()=>[e.createVNode(oe,{size:"sm",round:"",dense:"",icon:"edit",color:"primary",class:"q-mr-xs",onClick:o[0]||(o[0]=i=>e.unref(z).H.Router.To(`/admin/${n.domen}/${n.row.id}`))})]),_:1}))}}),Kp={class:"cell-text"},gr=D(e.defineComponent({__name:"PTableNumber",props:{row:{},prop:{default:"name"},store:{},readonly:{type:Boolean,default:!1},label:{default:""},decimals:{default:void 0},min:{default:void 0},max:{default:void 0},step:{default:void 0},emptyPlaceholder:{default:"—"},tooltipThreshold:{default:10}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.row[t.prop]),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=i.value;return l!=null&&String(l).length>t.tooltipThreshold}),a=e.computed(()=>{const l=i.value;return l==null||l===""?t.emptyPlaceholder:typeof l=="number"&&t.decimals!==void 0?l.toFixed(t.decimals):String(l)}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"p-table-number-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",Kp,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(nt,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(_n,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(et,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),modelModifiers:{number:!0},type:"number",class:"q-mb-md",autofocus:"",label:n.label,min:n.min,max:n.max,step:n.step},null,8,["modelValue","label","min","max","step"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-4e17e527"]]),go=e.defineComponent({inheritAttrs:!1,__name:"PSelect",props:e.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:()=>[]},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>typeof r.id=="string"?r.id:void 0),a=e.computed(()=>{const p={};for(const k of Object.keys(r))k!=="id"&&k!=="disable"&&(p[k]=r[k]);return p}),c=n,l=e.computed(()=>r.disable??c.disabled),u=p=>{i("change",p)},f=()=>{i("clear",void 0)},h=e.computed(()=>{const p={};return c.margin&&(p.margin=c.margin),c.padding&&(p.padding=c.padding),c.width&&(p.width=c.width),c.inPadding&&(p.padding=c.inPadding),p});return(p,k)=>(e.openBlock(),e.createBlock(e.unref(x.QSelect),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":k[0]||(k[0]=C=>o.value=C)},e.unref(a),{for:e.unref(s),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,rules:n.rules,disable:e.unref(l),readonly:n.readonly,"input-style":{color:n.color||void 0},style:e.unref(h),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u,onClear:f}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(p.$slots,"before",{},()=>[e.renderSlot(p.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(p.$slots,"append",{},()=>[e.renderSlot(p.$slots,"right")])]),_:2},[p.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"prepend")]),key:"0"}:void 0,p.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"after")]),key:"1"}:void 0,p.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),key:"2"}:void 0,p.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"label")]),key:"3"}:void 0,p.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"error")]),key:"4"}:void 0,p.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"hint")]),key:"5"}:void 0,p.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"counter")]),key:"6"}:void 0,p.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"loading")]),key:"7"}:void 0,p.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"selected")]),key:"8"}:void 0,p.$slots.option?{name:"option",fn:e.withCtx(C=>[e.renderSlot(p.$slots,"option",e.normalizeProps(e.guardReactiveProps(C)))]),key:"9"}:void 0,p.$slots["no-option"]?{name:"no-option",fn:e.withCtx(C=>[e.renderSlot(p.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(C)))]),key:"10"}:void 0,p.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"before-options")]),key:"11"}:void 0,p.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"after-options")]),key:"12"}:void 0,p.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(C=>[e.renderSlot(p.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(C)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","rules","disable","readonly","input-style","style"]))}}),yr=D(e.defineComponent({__name:"PTableSelect",props:{row:{},prop:{},storeOpts:{},store:{}},setup(n){const t=n,o=e.computed(()=>t.storeOpts.Options);return e.onBeforeMount(async()=>{await t.storeOpts.GetOptions()}),(i,r)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"relation-cell"},{default:e.withCtx(()=>[e.createVNode(go,{modelValue:n.row[n.prop+"Id"],"onUpdate:modelValue":r[0]||(r[0]=s=>n.row[n.prop+"Id"]=s),clearable:!1,dense:"",filled:"","map-options":"",options:e.unref(o)},null,8,["modelValue","options"])]),_:1}))}}),[["__scopeId","data-v-a2c49ff8"]]),eg={class:"cell-text"},wr=D(e.defineComponent({__name:"PTableString",props:{row:{},prop:{default:"name"},store:{},maxLength:{default:200},truncateLength:{default:40},readonly:{type:Boolean,default:!1},label:{default:""}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.row[t.prop]||""),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=i.value;return typeof l=="string"&&l.length>t.truncateLength}),a=e.computed(()=>{const l=i.value;return typeof l!="string"?l:l.length>t.truncateLength?l.slice(0,t.truncateLength)+"...":l}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"p-table-string-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",eg,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(nt,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(_n,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(et,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),class:"q-mb-md",maxlength:n.maxLength,autofocus:"",label:n.label},null,8,["modelValue","maxlength","label"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-8856da5a"]]),br=D(e.defineComponent({__name:"PTable",props:{cols:{},items:{},store:{},rowKey:{default:"name"},rowsPerPageOptions:{default:()=>[25,50,75,100]},paginationLabel:{type:Function,default:(n,t,o)=>`${n}-${t} из ${o}`}},emits:["request"],setup(n,{emit:t}){const o=n,i=t,r=e.ref({page:0,rowsNumber:o.store.Count,rowsPerPage:25,sortBy:"desc",descending:!1});e.watch(()=>o.store.Count,()=>{r.value.rowsNumber=o.store.Count});const s=c=>{z.F.FTSP.Get().p.page=c.pagination.page-1,z.F.FTSP.Get().p.rowsPerPage=c.pagination.rowsPerPage,r.value.page=c.pagination.page,r.value.rowsPerPage=c.pagination.rowsPerPage},a=async c=>{s(c),await o.store.FTSP(),i("request")};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(x.QTable),{pagination:e.unref(r),"onUpdate:pagination":l[0]||(l[0]=u=>e.isRef(r)?r.value=u:null),columns:n.cols,rows:n.items,"row-key":n.rowKey,flat:"",bordered:"","rows-per-page-label":"На странице","pagination-label":n.paginationLabel,"rows-per-page-options":n.rowsPerPageOptions,class:"p-table",onRequest:a},{header:e.withCtx(u=>[e.createVNode(e.unref(x.QTr),{props:u},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QTh),{"auto-width":""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.cols,f=>(e.openBlock(),e.createBlock(e.unref(x.QTh),{key:f.name,props:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["props"]))),128))]),_:2},1032,["props"])]),body:e.withCtx(u=>[e.createVNode(e.unref(x.QTr),{props:u},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{row:u.row},void 0,!0)]),_:2},1032,["props"])]),_:3},8,["pagination","columns","rows","row-key","pagination-label","rows-per-page-options"]))}}),[["__scopeId","data-v-025f97ac"]]);function Pa(n){n.component("PTable",br),n.component("PTableBadge",fr),n.component("PTableBadges",mr),n.component("PTableCount",hr),n.component("PTableEdit",pr),n.component("PTableNumber",gr),n.component("PTableSelect",yr),n.component("PTableString",wr)}const tg=Object.freeze(Object.defineProperty({__proto__:null,PTable:br,PTableBadge:fr,PTableBadges:mr,PTableCount:hr,PTableEdit:pr,PTableNumber:gr,PTableSelect:yr,PTableString:wr,default:Pa},Symbol.toStringTag,{value:"Module"})),ng=["innerHTML"],Cr=D(e.defineComponent({__name:"PTabs",props:{tabsStore:{type:Object,required:!0},vertical:{type:Boolean,default:!1},color:{type:String,default:"",required:!1},dark:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:t}){const o=n,i=t;e.onBeforeMount(()=>{o.tabsStore.Select()});const r=s=>{o.tabsStore.Select(s),i("select")};return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tabs-wrapper",{compact:n.compact,vertical:n.vertical}])},[e.createVNode(e.unref(x.QTabs),{"model-value":n.tabsStore.value,vertical:n.vertical,class:e.normalizeClass(["tabs-header",n.color?`bg-${n.color} text-white`:"",{"tabs-header--dark":n.dark}]),dense:"",align:"justify","narrow-indicator":"","active-class":"active-tab","onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:c.value,name:c.value,label:c.htmlLabel?void 0:c.label,icon:c.icon,"no-caps":""},{default:e.withCtx(()=>[c.htmlLabel?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:c.htmlLabel},null,8,ng)):e.createCommentVNode("",!0),c.alert?(e.openBlock(),e.createBlock(e.unref(x.QBadge),{key:1,color:"negative",floating:"",rounded:""},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("!",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:2},1032,["name","label","icon"]))),128))]),_:1},8,["model-value","vertical","class"]),e.createVNode(e.unref(x.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"tabs-panels","transition-prev":"slide-right","transition-next":"slide-left"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(x.QTabPanel),{key:c.value,name:c.value,class:"tab-panel"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{item:c,tab:c},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])],2))}}),[["__scopeId","data-v-80c4d829"]]),og={class:"q-pa-md"},Sr=D(e.defineComponent({__name:"PTabsLeft",props:{buttons:{type:Array,default:()=>[]},tabsStore:{type:Object,required:!0}},emits:["select"],setup(n,{emit:t}){const o=n,i=t,r=a=>{o.tabsStore.Select(a),i("select")},s=e.ref(20);return(a,c)=>(e.openBlock(),e.createBlock(e.unref(x.QSplitter),{modelValue:e.unref(s),"onUpdate:modelValue":c[0]||(c[0]=l=>e.isRef(s)?s.value=l:null),class:"full-height"},{before:e.withCtx(()=>[e.createVNode(e.unref(x.QTabs),{vertical:"",class:"text-teal","model-value":n.tabsStore.value,"onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,l=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:l.value,name:l.value,label:l.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",og,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(l,u)=>(e.openBlock(),e.createBlock(oe,{key:u,label:l.text,color:l.color,class:"q-mb-sm full-width",onClick:f=>l.action(l)},null,8,["label","color","onClick"]))),128))])]),after:e.withCtx(()=>[e.createVNode(e.unref(x.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"shadow-2 rounded-borders"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.GetItems(),l=>(e.openBlock(),e.createBlock(e.unref(x.QTabPanel),{key:l.value,name:l.value},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{item:l},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-a7a16408"]]);class Ko{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","");d(this,"value","")}preSelect(){var o;const t=z.H.Router.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select((o=this.items[0])==null?void 0:o.value);return}this.Select(t)}static ToTab(t,o="",i=""){return{label:i,value:o,...t}}static Create(t,o){const i=new Ko;return i.key=t,i.items=o,i.items.length&&i.preSelect(),i}Select(t){if(!this.items.length)return;if(t===void 0)return this.preSelect();this.idx=this.items.findIndex(i=>i.value===t),this.value=t;const o=this.GetValue();o&&z.H.Router.SetQueryParam(this.key,o)}GetMenu(){return this.items[this.idx]}GetComponent(){var t;return(t=this.items[this.idx])==null?void 0:t.component}GetValue(){var t;return(t=this.items[this.idx])==null?void 0:t.value}GetItems(){return this.items}}function Ia(n){n.component("PTabs",Cr),n.component("PTabsLeft",Sr)}const ig=Object.freeze(Object.defineProperty({__proto__:null,Contacts:mm,Forms:Om,Menus:Wm,Schedule:Hp,Table:tg,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:Cr,PTabsLeft:Sr,TabsStore:Ko,default:Ia},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Ra=e.defineComponent({inheritAttrs:!1,__name:"PCheckBox",props:e.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:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{i("change",o.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-checkbox",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QCheckbox),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),rg={class:"row items-center justify-end"},ei="DD.MM.YYYY",ti=e.defineComponent({__name:"PDateInput",props:e.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},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const o=x.ClosePopup,i=n,r=t,s=e.useModel(n,"modelValue"),a=ei.replace(/[DMY]/g,"#"),c=e.ref(null),l=N=>{if(i.modelType){c.value=i.modelType;return}N instanceof Date?c.value="date":(typeof N=="string"&&N||c.value===null)&&(c.value="string")},u=N=>{if(!N)return"";if(N instanceof Date)return Number.isNaN(N.getTime())?"":x.date.formatDate(N,ei);const E=String(N).match(/^(\d{4})-(\d{2})-(\d{2})/);if(E)return`${E[3]}.${E[2]}.${E[1]}`;const y=new Date(N);return Number.isNaN(y.getTime())?"":x.date.formatDate(y,ei)},f=N=>{const E=N.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!E)return null;const y=+E[1],M=+E[2],b=+E[3];if(y<1||y>31||M<1||M>12||b<1900||b>2100)return null;const $=new Date(b,M-1,y);return $.getFullYear()!==b||$.getMonth()!==M-1||$.getDate()!==y?null:$},h=e.ref(u(s.value));l(s.value),e.watch(s,N=>{l(N);const E=u(N);E!==h.value&&(h.value=E)});const p=N=>{const E=typeof N=="number"?String(N):N;if(!E){const M=c.value==="date"?null:"";s.value=M,r("input",M);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(E))return;const y=f(E);if(y)if(c.value==="date")s.value=y,r("input",y);else{const M=y.getFullYear(),b=String(y.getMonth()+1).padStart(2,"0"),$=String(y.getDate()).padStart(2,"0"),P=`${M}-${b}-${$}`;s.value=P,r("input",P)}},k=()=>{r("blur",s.value)},C={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(N,E)=>(e.openBlock(),e.createBlock(et,{modelValue:e.unref(h),"onUpdate:modelValue":[E[1]||(E[1]=y=>e.isRef(h)?h.value=y:null),p],class:"fit",label:n.label,placeholder:n.placeholder,mask:e.unref(a),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,rules:n.rules,inputmode:"numeric",onBlur:k},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QDate),{modelValue:e.unref(h),"onUpdate:modelValue":E[0]||(E[0]=y=>e.isRef(h)?h.value=y:null),mask:ei,"today-btn":"",locale:C},{default:e.withCtx(()=>[e.createElementVNode("div",rg,[e.withDirectives(e.createVNode(oe,{label:"Готово",color:"primary",flat:""},null,512),[[e.unref(o)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:e.withCtx(()=>[e.renderSlot(N.$slots,"before")]),append:e.withCtx(()=>[e.renderSlot(N.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width","rules"]))}}),sg=e.defineComponent({inheritAttrs:!1,__name:"PDatePicker",props:e.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:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useModel(n,"modelValue"),r=c=>{const l=c.getFullYear(),u=String(c.getMonth()+1).padStart(2,"0"),f=String(c.getDate()).padStart(2,"0");return`${l}-${u}-${f}`},s=c=>{o("input",c instanceof Date?r(c):c??null)},a=()=>{o("blur")};return(c,l)=>(e.openBlock(),e.createBlock(ti,{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.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:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),append:e.withCtx(()=>[e.renderSlot(c.$slots,"right")]),_:3},8,["modelValue","label","placeholder","margin","padding"]))}}),ag={class:"row items-center justify-end"},lg={class:"row items-center justify-end"},Aa=e.defineComponent({__name:"PDateTimeInput",props:e.mergeModels({label:{type:String,default:"Дата и время"},placeholder:{type:String,default:"ДД.ММ.ГГГГ ЧЧ:мм"},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=x.ClosePopup,o=e.useModel(n,"modelValue"),i=e.ref(""),r=e.ref(""),s=e.ref(""),a=C=>C?x.date.formatDate(C,"DD.MM.YYYY HH:mm"):"",c=C=>{if(!C||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(C))return null;const N=x.date.extractDate(C,"DD.MM.YYYY HH:mm");return Number.isNaN(N.getTime())?null:N},l=C=>{o.value=C},u=C=>{const N=String(C??"");i.value=N.replace(/[_\s]/g,"")===""?"":N},f=()=>{const C=c(i.value);C?l(C):i.value===""?l(null):i.value=a(o.value)},h=()=>{if(r.value){const C=o.value?x.date.formatDate(o.value,"HH:mm"):"00:00",N=`${r.value} ${C}`,E=c(N);E&&(i.value=a(E),l(E))}r.value=""},p=()=>{if(s.value){const C=o.value?x.date.formatDate(o.value,"DD.MM.YYYY"):"",N=x.date.formatDate(new Date,"DD.MM.YYYY"),E=C?`${C} ${s.value}`:`${N} ${s.value}`,y=c(E);y&&(i.value=a(y),l(y))}s.value=""};e.watch(o,C=>{C!==c(i.value)&&(i.value=a(C??null))},{immediate:!0});const k={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(C,N)=>(e.openBlock(),e.createBlock(et,{"model-value":e.unref(i),label:n.label,placeholder:n.placeholder,disable:n.disable,readonly:n.readonly,error:n.error,"error-message":n.errorMessage,rules:n.rules,mask:"##.##.#### ##:##","fill-mask":"","onUpdate:modelValue":u,onBlur:f},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QDate),{modelValue:e.unref(r),"onUpdate:modelValue":N[0]||(N[0]=E=>e.isRef(r)?r.value=E:null),mask:"DD.MM.YYYY",locale:k},{default:e.withCtx(()=>[e.createElementVNode("div",ag,[e.withDirectives(e.createVNode(oe,{label:"OK",color:"primary",flat:"",onClick:h},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"access_time",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QTime),{modelValue:e.unref(s),"onUpdate:modelValue":N[1]||(N[1]=E=>e.isRef(s)?s.value=E:null),mask:"HH:mm",format24h:"",locale:k},{default:e.withCtx(()=>[e.createElementVNode("div",lg,[e.withDirectives(e.createVNode(oe,{label:"OK",color:"primary",flat:"",onClick:p},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model-value","label","placeholder","disable","readonly","error","error-message","rules"]))}}),cg=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"flex-line flex",style:e.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})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-71357bc9"]]),dg={key:0,class:"p-form__actions row justify-end q-gutter-sm q-mt-md"},ug=D(e.defineComponent({name:"PForm",__name:"PForm",props:e.mergeModels({greedy:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},noErrorFocus:{type:Boolean,default:!1},noResetFocus:{type:Boolean,default:!1}},{valid:{type:Boolean,default:void 0},validModifiers:{}}),emits:e.mergeModels(["submit","reset","validation-success","validation-error"],["update:valid"]),setup(n,{expose:t,emit:o}){const i=o,r=e.useModel(n,"valid"),s=e.ref(!0),a=y=>{s.value=y,r.value!==void 0&&(r.value=y)},c=e.ref(),l=()=>{a(!0),i("validation-success")},u=()=>{a(!1),i("validation-error")},f=y=>{i("submit",y)},h=()=>{var y;(y=c.value)==null||y.resetValidation(),a(!0),i("reset")},p=async()=>{var M;const y=await((M=c.value)==null?void 0:M.validate())??!1;return a(y),y},k=()=>{var y;(y=c.value)==null||y.resetValidation(),a(!0)};return t({validate:p,resetValidation:k,focus:()=>{var y;return(y=c.value)==null?void 0:y.focus()},submit:y=>{var M;return(M=c.value)==null?void 0:M.submit(y)},reset:y=>{var M;return(M=c.value)==null?void 0:M.reset(y)}}),(y,M)=>(e.openBlock(),e.createBlock(e.unref(x.QForm),{ref_key:"qFormRef",ref:c,greedy:n.greedy,autofocus:n.autofocus,"no-error-focus":n.noErrorFocus,"no-reset-focus":n.noResetFocus,class:"p-form",onSubmit:f,onReset:h,onValidationSuccess:l,onValidationError:u},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default",{},void 0,!0),y.$slots.actions?(e.openBlock(),e.createElementBlock("div",dg,[e.renderSlot(y.$slots,"actions",{valid:e.unref(s),validate:p,resetValidation:k},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["greedy","autofocus","no-error-focus","no-reset-focus"]))}}),[["__scopeId","data-v-a64ba3d2"]]),fg={class:"p-hint-popup"},kr=D(e.defineComponent({__name:"PHint",props:{text:{}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.text?(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:i[0]||(i[0]=e.withModifiers(r=>t.value=!0,["stop"]))},{default:e.withCtx(()=>[e.createVNode(nt,{anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"320px"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QMenu),{modelValue:e.unref(t),"onUpdate:modelValue":i[1]||(i[1]=r=>e.isRef(t)?t.value=r:null),anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"340px"},{default:e.withCtx(()=>[e.createElementVNode("div",fg,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),mg=e.defineComponent({__name:"PInputDate",props:e.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:e.mergeModels(["update:modelValue","change","beforeChange","input"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useModel(n,"modelValue");let r=null;const s=c=>{o("input",c),r=c instanceof Date?c:null},a=()=>{r instanceof Date&&(o("beforeChange",r),o("change",r),r=null)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"style-container",style:e.normalizeStyle({width:n.width,position:"relative"})},[e.createVNode(ti,{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.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))}}),hg=D(e.defineComponent({__name:"IconMinus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),pg=D(e.defineComponent({__name:"IconPlus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.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"]]),gg=e.defineComponent({inheritAttrs:!1,__name:"PInputNumber",props:e.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},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useAttrs(),r=e.computed(()=>typeof i.id=="string"?i.id:void 0),s=e.computed(()=>{const P={};for(const A of Object.keys(i))A!=="id"&&(P[A]=i[A]);return P}),a=n,c=()=>{const P=a.step.toString();return P.includes(".")?P.split(".")[1].length:0},l=c(),u=e.useModel(n,"modelValue"),h=(P=>Math.min(Math.max(P,a.min),a.max))(u.value);h!==u.value&&(u.value=h);const p=e.ref(h.toFixed(c())),k=e.computed(()=>{const P={};return a.margin&&(P.margin=a.margin),a.padding&&(P.padding=a.padding),P}),C=P=>{const A=Math.pow(10,l);return Math.round(P*A)/A},N=(P,...A)=>{u.value=C(P),p.value=C(P).toFixed(c()),A.forEach(G=>o(G,u.value))},E=(P,...A)=>{a.disabled||P>a.max||P<a.min||N(P,...A)},y=()=>E(+p.value+a.step,"change"),M=()=>E(+p.value-a.step,"change"),b=P=>E(Number(P),"input"),$=()=>E(+p.value,"change","blur");return(P,A)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps(e.unref(s),{for:e.unref(r),"model-value":e.unref(p),label:n.label||void 0,rules:n.rules,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:e.unref(k),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":b,onBlur:$}),{before:e.withCtx(()=>[e.createVNode(e.unref(x.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:M},{default:e.withCtx(()=>[e.createVNode(hg)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(x.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:y},{default:e.withCtx(()=>[e.createVNode(pg)]),_:1})]),_:1},16,["for","model-value","label","rules","disable","input-style","style"]))}}),yg=D(gg,[["__scopeId","data-v-1aec76d0"]]),wg=D(e.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:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.shift?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({minWidth:n.widthClosed,maxWidth:n.widthClosed,height:n.height})},null,4)),e.createElementVNode("div",{class:"LS-body",style:e.normalizeStyle({marginLeft:e.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})},[e.createElementVNode("div",{class:"LS-content",style:e.normalizeStyle({width:`calc(100% - ${n.widthClosed})`,height:n.height,background:"#ffffff"})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4),e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),bg=e.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(t,o)=>(e.openBlock(),e.createBlock(e.unref(x.QList),{tag:"ul",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),Cg=e.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(t,o)=>(e.openBlock(),e.createBlock(e.unref(x.QItem),{tag:"li",style:e.normalizeStyle({margin:n.margin,padding:n.padding,borderBottom:n.showDivider?"1px solid":"none",background:n.background})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),za=e.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var c;const t=n,o=((c=t.storeOpts)==null?void 0:c.Options)??[],i=e.ref(o);async function r(l,u,f,h){var N,E;const k="set"+(((N=u[0])==null?void 0:N.toUpperCase())+u.slice(1)),C=l[k];typeof C=="function"?C(f):(l[u]=f,l[u+"Id"]=f==null?void 0:f.id),await((E=h==null?void 0:h.Update)==null?void 0:E.call(h,l))}const s=(l,u)=>{if(l===""){u(()=>{i.value=o});return}u(()=>{i.value=o.filter(f=>z.H.Strings.SearchInFields(l,[f.label]))})},a=async l=>{l?(await t.storeOpts.Get(l.value),await r(t.item,t.prop,t.storeOpts.Item,t.store)):await r(t.item,t.prop,void 0,t.store)};return e.onBeforeMount(async()=>{o.length>0||await t.storeOpts.GetOptions(t.optLabel,t.optValue)}),(l,u)=>(e.openBlock(),e.createBlock(go,{"use-input":"",options:e.unref(i),"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:e.withCtx(()=>[e.createVNode(kr,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),Sg=e.defineComponent({__name:"PRadio",props:e.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:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=n,s=()=>{i("change",r.value)};return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:"p-radio",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QRadio),{modelValue:o.value,"onUpdate:modelValue":[c[0]||(c[0]=l=>o.value=l),s],val:n.value,name:n.name,label:n.label||void 0,size:n.size,style:e.normalizeStyle({fontSize:n.fontSize})},null,8,["modelValue","val","name","label","size","style"])],4))}}),kg=D(e.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:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"wrapper",style:e.normalizeStyle({maxHeight:n.height,height:n.height})},[e.createElementVNode("div",{class:"content",style:e.normalizeStyle({paddingRight:n.shift?"0":`${n.widthClosed}`})},[e.renderSlot(a.$slots,"content",{},void 0,!0)],4),e.createElementVNode("div",{class:"RS-body",style:e.normalizeStyle({marginRight:e.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"})},[e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"]),e.createElementVNode("div",{class:"RS-content",style:e.normalizeStyle({width:`calc(${n.widthOpened} - ${n.widthClosed} - 2px)`,background:n.background,height:n.height})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4)],4)],4)}}}),[["__scopeId","data-v-8ab50ea6"]]),xg=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"sticky-block",style:e.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})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4748d546"]]),Da=D(e.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>t.row[t.prop]),i=async()=>{t.row[t.prop]=!t.row[t.prop],await t.store.Update(t.row)};return(r,s)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["toggle-cell",{clickable:!t.readonly}]),onClick:s[0]||(s[0]=a=>t.readonly?void 0:i())},[e.createVNode(e.unref(x.QIcon),{name:e.unref(o)?"check_circle":"radio_button_unchecked",color:e.unref(o)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),e.createVNode(nt,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),Eg=D(e.defineComponent({inheritAttrs:!1,__name:"PTextarea",props:e.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},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue"),o=e.useAttrs(),i=e.computed(()=>typeof o.id=="string"?o.id:void 0),r=e.computed(()=>{const l={};for(const u of Object.keys(o))u!=="id"&&(l[u]=o[u]);return l}),s=n,a=e.computed(()=>({color:s.color||void 0,resize:s.resize})),c=e.computed(()=>{const l={};return s.margin&&(l.margin=s.margin),s.padding&&(l.padding=s.padding),s.borderColor&&(l["--p-border-color"]=s.borderColor),l});return(l,u)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=f=>t.value=f)},e.unref(r),{for:e.unref(i),label:n.label||void 0,mask:n.mask,rules:n.rules,type:"textarea","input-style":e.unref(a),style:e.unref(c),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>l.$emit("input",t.value)),onBlur:u[2]||(u[2]=f=>l.$emit("blur",t.value)),onFocus:u[3]||(u[3]=f=>l.$emit("focus",t.value))}),{before:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),append:e.withCtx(()=>[e.renderSlot(l.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","rules","input-style","style"]))}}),[["__scopeId","data-v-4cbcc0ca"]]),Fa=e.defineComponent({inheritAttrs:!1,__name:"PToggle",props:e.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:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{i("change",o.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-toggle",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QToggle),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),Bg={class:"top-slider-content"},Ng={class:"center"},Vg=D(e.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:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?"0":`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`,height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Bg,[e.createElementVNode("div",Ng,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},void 0,!0)]),_:3},8,["style"])],4)],64))}}),[["__scopeId","data-v-88b1978e"]]);function $g(n){n.component("PButton",oe),n.component("PBadge",lo),n.component("PCheckBox",Ra),n.component("PChip",ur),n.component("PDateInput",ti),n.component("PDatePicker",sg),n.component("PDateTimeInput",Aa),n.component("PDialog",dn),n.component("PFlex",cg),n.component("PForm",ug),n.component("PHint",kr),n.component("PInput",et),n.component("PInputDate",mg),n.component("PInputNumber",yg),n.component("PLeftSlider",wg),n.component("PList",bg),n.component("PListItem",Cg),n.component("POptionsListSingle",Jo),n.component("POpts",za),n.component("PRadio",Sg),n.component("PRightSlider",kg),n.component("PSelect",go),n.component("PSticky",xg),n.component("PString",Ji),n.component("PTextarea",Eg),n.component("PTopSlider",Vg),n.component("PTableToggle",Da),n.component("PToggle",Fa),n.component("PTooltip",nt)}const Tg={key:0,class:"mainblock"},Mg={class:"mainblock-right"},Pg={class:"body"},Ig=D(e.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(n){const t=n,o=e.ref(!1),i=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{i.value=!i.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.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}),o.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",Tg,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,maxWidth:e.unref(r)?"100%":n.menuWidth,marginLeft:e.unref(r)?"-110%":"0",position:e.unref(r)?"fixed":"relative",top:e.unref(r)?"140px":""})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"auto":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!e.unref(i)&&e.unref(r)?"110%":"0",borderTopLeftRadius:e.unref(r)?"0":"",borderBottomLeftRadius:e.unref(r)?"0":""}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Mg,[a.$slots.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"title",style:e.normalizeStyle({display:a.$slots.title?"flex":"none"})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",Pg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),Rg={class:"mainblock-right"},Ag={class:"body"},zg=D(e.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 t=n,o=e.ref(!1),i=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{i.value=!i.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.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}),o.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mainblock",style:e.normalizeStyle({display:e.unref(r)?"block":"flex"})},[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,display:n.leftWidth!=="0px"?"flex":"none",top:e.unref(r)?"58px":"80px"})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!e.unref(i)&&e.unref(r),"0"),overflowX:e.unref(r)?"scroll":"hidden",display:e.unref(r)?"flex":"block",background:e.unref(r)?"#ffffff":"",overflowY:e.unref(r)?"hidden":"auto"}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Rg,[e.createElementVNode("div",{class:"title",style:e.normalizeStyle({position:n.titleSticky?"sticky":"relative",top:n.titleSticky?e.unref(r)?"108px":"58px":"0",zIndex:n.titleSticky?"10":""})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4),e.createElementVNode("div",Ag,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),Oa=D(e.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 e.useCssVars(t=>({d143e9f0:n.maxWidth,b9d56180:n.width,v52bd0ff4:n.background,v1795aeac:n.gridGap,v0cfa7c52:n.gridTemplateColumns,v0c6d2a1f:n.gridTemplateRows,a3ccd918:n.margin})),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid-block",n.customClass])},[e.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]),Dg={class:"container"},Fg={class:"slide-box"},Og={class:"image"},Lg={class:"image-box"},_g=["id","src","alt"],Hg={class:"link-number"},Ug=["id","onClick"],vg=D(e.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){e.useCssVars(k=>({v582c9d05:o}));const t=n,o=`${t.animationTime}ms`,i=e.ref(t.startActiveGroupIndex),r=e.ref(Nt.None),s=e.ref(Zs(t.events,t.quantity)),a=e.computed(()=>s.value[i.value]);e.onMounted(()=>{});const c=()=>i.value=i.value+1<s.value.length?i.value+1:0,l=()=>i.value=i.value-1<0?s.value.length-1:i.value-1,u=k=>{r.value=k,setTimeout(()=>r.value=Nt.None,t.animationTime)},f=k=>{k!=i.value&&(u(k<i.value?Nt.Prev:Nt.Next),setTimeout(()=>i.value=k,t.animationTime/2))},h=()=>{u(Nt.Next),setTimeout(c,t.animationTime/2)},p=()=>{u(Nt.Prev),setTimeout(l,t.animationTime/2)};return(k,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",Dg,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:C[0]||(C[0]=e.withModifiers(N=>p(),["stop"]))},[...C[3]||(C[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",Fg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass({animationnext:e.unref(r)===e.unref(Nt).Next,animationprev:e.unref(r)===e.unref(Nt).Prev})},[e.createElementVNode("div",Og,[e.createElementVNode("div",Lg,[e.createElementVNode("img",{id:N.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:N.fileInfo.getImageUrl(),alt:N.fileInfo.originalName,onClick:C[1]||(C[1]=y=>k.showImageInFullScreen())},null,12,_g)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:C[2]||(C[2]=e.withModifiers(N=>h(),["stop"]))},[...C[4]||(C[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",Hg,[e.createVNode(Oa,{"grid-template-columns":"repeat(auto-fit, minmax(26px, 1fr))","grid-gap":"5px",margin:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(N,E)=>(e.openBlock(),e.createElementBlock("div",{id:E.toString(),key:E,class:"number",style:e.normalizeStyle({background:E.toString()===e.unref(i).toString()?"#9D9D9D":""}),onClick:e.withModifiers(y=>f(E),["stop"])},e.toDisplayString(E+1),13,Ug))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),qg=e.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.x),s=e.ref(o.y),a=e.computed(()=>r.value+"px"),c=e.computed(()=>s.value+"px"),l=()=>{i("close")};return(u,f)=>{const h=e.resolveDirective("click-outside");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"context-window",style:e.normalizeStyle({left:e.unref(a),top:e.unref(c)})},[e.renderSlot(u.$slots,"default")],4)),[[h,l]])}}}),jg={class:"drop-item"},Wg={key:0,class:"drop-item-list"},Gg=D(e.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const t=n,o=e.ref(t.rolledUp),i=async()=>{o.value=!o.value};return(r,s)=>{const a=e.resolveComponent("PString"),c=e.resolveComponent("IconArrowDrop");return e.openBlock(),e.createElementBlock("div",jg,[e.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=l=>i())},[e.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"]),e.createElementVNode("div",{style:e.normalizeStyle({transform:e.unref(o)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[e.createVNode(c,{size:"10px",margin:"0"})],4)]),e.unref(o)?(e.openBlock(),e.createElementBlock("div",Wg,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),Qg=e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Vi,required:!0}},emits:["load"],setup(n,{emit:t}){const o=n,i=e.ref(!1),r=t,s=()=>{o.model.setBoolean(i.value),i.value?z.F.FTSP.Get().setF(o.model):z.F.FTSP.Get().removeF(o.model),r("load")};return(a,c)=>{const l=e.resolveComponent("PCheckBox");return e.openBlock(),e.createBlock(l,{modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=u=>e.isRef(i)?i.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),Yg=D(e.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const o=t,i=e.ref(void 0),r=async a=>{Ft.Get().replaceF(a,i.value),i.value=a,Ft.Get().p.drop()},s=async a=>{await r(a),o("load")};return(a,c)=>{const l=e.resolveComponent("PString"),u=e.resolveComponent("PButton"),f=e.resolveComponent("GridContainer"),h=e.resolveComponent("InfoItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(l,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),e.createVNode(h,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:e.withCtx(()=>[...c[0]||(c[0]=[])]),default:e.withCtx(()=>[e.createVNode(f,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(p,k)=>(e.openBlock(),e.createBlock(u,{key:k,color:"blue",height:"auto",text:p.label,"is-toggle":p.valueEq(e.unref(i)),"toggle-mode":!0,inverse:n.inverse,onClick:C=>s(p.valueEq(e.unref(i))?void 0:p)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-949e92b5"]]),Xg=["value","label"],Zg=D(e.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const o=t,i=Ft.Get(),r=e.ref(void 0),s=async c=>{i.replaceF(c,r.value),r.value=c},a=async c=>{c?await s(r.value):await s(void 0),o("load")};return(c,l)=>{const u=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(u,{modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=f=>e.isRef(r)?r.value=f:null),clearable:e.unref(r),placeholder:n.defaultLabel,onChange:a},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(f,h)=>(e.openBlock(),e.createElementBlock("option",{key:h,value:f,label:f.label},null,8,Xg))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-fec113c5"]]),Jg=D(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,o)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-963d049b"]]),Kg=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:"general-block-item",style:e.normalizeStyle({background:n.background,height:n.height,width:n.width,borderColor:n.borderColor,padding:n.padding,margin:n.margin,transform:n.scale&&e.unref(t)?"scale(1.03, 1.03)":""}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[e.createElementVNode("div",{class:"green",style:e.normalizeStyle({width:`${n.ready}`})},null,4),e.createElementVNode("div",{class:"general-block-item-title",style:e.normalizeStyle({fontSize:n.fontSize})},[e.renderSlot(o.$slots,"general-item",{},void 0,!0)],4),e.createElementVNode("div",{class:"tools-icon",style:e.normalizeStyle({display:n.withIcon?"flex":"none"})},[...i[2]||(i[2]=[e.createElementVNode("svg",{class:"icon-del"},[e.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[e.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"]]),e1={key:0,class:"blur"},t1={style:{display:"flex","justify-content":"center"}},n1=D(e.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:t}){const o=n,i=t,r=o.customClass!==""?o.customClass:"inside-class",s=e.ref(!1),a=e.ref(!1),c=e.ref(!1),l=e.ref(o.close);e.watch(()=>o.close,()=>{a.value=!1});const u=$=>{$.stopPropagation(),$.key==="Escape"&&(o.showSaveDialog?c.value=!0:a.value=!1)};e.watch(a,async()=>{var $,P;await e.nextTick(),a.value?((P=($=document.getElementById("info-item-opened-content"))==null?void 0:$.querySelector("input"))==null||P.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&i("after-close")});const f=()=>{i("click"),a.value=!!o.withOpenWindow,l.value!==o.close&&(a.value=!1,l.value=!l.value)},h=e.computed(()=>o.customClass===""?{width:o.width,minHeight:"40px",height:"auto",maxWidth:o.maxWidth,minWidth:o.minWidth,margin:o.baseBoxMargin}:void 0),p=e.computed(()=>a.value&&o.withOpenWindow),k=e.computed(()=>({background:o.background?o.background:void 0,zIndex:p.value?"2":"0",padding:p.value?"0":o.padding,margin:o.margin,width:p.value?o.openWidth:o.width,height:p.value?o.openHeight:o.height,minHeight:"40px",maxWidth:o.maxWidth,minWidth:o.minWidth,borderColor:s.value||a.value?o.colorSelected:o.borderColor,color:s.value?o.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${o.colorSelected}`:"none",alignItems:p.value?"end":"center",cursor:(o.withHover,"pointer")})),C=e.computed(()=>({height:p.value?"0":"",overflow:o.closeWindowOverflow,width:o.width})),N=e.computed(()=>({height:p.value?"auto":"0"})),E=e.computed(()=>({color:s.value?o.colorSelected:"#343E5C",fill:s.value?o.colorSelected:"#343E5C",background:o.background})),y=()=>{o.showSaveDialog?c.value=!0:a.value=!1},M=async()=>{await i("keyup-enter"),o.close&&(a.value=!1),c.value=!1},b=()=>{a.value=!1,c.value=!1};return($,P)=>{const A=e.resolveComponent("PString"),G=e.resolveComponent("PButton"),de=e.resolveComponent("PModal"),$e=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",e1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(h)),onClick:P[2]||(P[2]=e.withModifiers(Ee=>f(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(k)),onMouseenter:P[0]||(P[0]=Ee=>n.withHover?s.value=!0:s.value=!1),onMouseleave:P[1]||(P[1]=Ee=>s.value=!1)},[e.unref(a)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["close-window",n.customClass]),style:e.normalizeStyle(e.unref(C))},[e.renderSlot($.$slots,"default",{},void 0,!0)],6)),e.unref(a)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:e.normalizeStyle(e.unref(N))},[e.renderSlot($.$slots,"open-inside-content",{},void 0,!0)],4)),[[$e,y,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(E))},[e.renderSlot($.$slots,"title",{},()=>[e.createVNode(A,{string:n.title,"font-size":"10px",padding:"0 0 0 3px",style:e.normalizeStyle({color:e.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),e.createVNode(de,{show:e.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",t1,[e.createVNode(G,{text:"Не сохранять",onClick:b}),e.createVNode(G,{text:"Сохранять",onClick:M})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-999853f7"]]),o1=D(e.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:t}){const o=e.ref(!1),i=t,r=s=>{o.value=!o.value,i("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(u,{close:e.unref(o),title:n.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,f=>(e.openBlock(),e.createBlock(l,{key:f,type:"admin",color:"blue",text:f,onClick:h=>r(f)},null,8,["text","onClick"]))),128)),e.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:e.withCtx(()=>[e.createVNode(c,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),i1={class:"mainblock"},r1={class:"mainline"},s1=D(e.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",i1,[e.createElementVNode("div",r1,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:n.leftWidth,maxWidth:n.leftWidth,background:n.background,display:n.leftWidth!=="0px"?"block":"none"})},[e.renderSlot(t.$slots,"left",{},void 0,!0)],4),e.createElementVNode("div",{class:"mainblock-right",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),La=D(e.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),a1={class:"search-list"},l1=["onClick"],_a=D(e.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:t}){const o=t,i=n,r=e.ref(i.modelValue),s=e.ref([]);async function a(){o("input",r.value),await c()}async function c(){i.searchFunc&&(s.value=await i.searchFunc(r.value))}async function l(u){r.value="",o("select",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle({width:n.width})},[e.createVNode(et,{modelValue:e.unref(r),"onUpdate:modelValue":f[0]||(f[0]=h=>e.isRef(r)?r.value=h:null),placeholder:"Найти",onInput:a},{right:e.withCtx(()=>[e.createVNode(La,{size:"24px"})]),_:1},8,["modelValue"]),e.unref(r)&&e.unref(r).length>=2?(e.openBlock(),e.createElementBlock("div",{key:0,class:"result",style:e.normalizeStyle({maxHeight:n.maxHeightResultList,zIndex:n.zIndexResultList,boxShadow:n.boxShadowResultList})},[e.createElementVNode("ul",a1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),h=>(e.openBlock(),e.createElementBlock("li",{key:h.value,onClick:p=>l(h)},e.toDisplayString(h.label),9,l1))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),c1=D(e.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=async()=>{};return(i,r)=>{const s=e.resolveComponent("PInput");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(s,{modelValue:t.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value.number=a),onBlur:o},null,8,["modelValue"]),e.createVNode(s,{modelValue:t.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>t.value.description=a),onBlur:o},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-8479448f"]]),d1={style:{display:"flex","justify-content":"center",width:"100%"}},u1={class:"pag-number"},f1={class:"pag-ul"},m1={key:2},h1=D(e.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},setup(n){const t=n,o=h=>h?"active":"neutral",i=h=>h?"not-active":"neutral",r=e.ref(Js),s=e.ref(!1),a=e.ref(!1);r.value.count=t.store.Count.value,e.watch(t.store.Count,()=>{r.value.count=t.store.Count.value});const c=async h=>{if(h!==r.value.curPage&&(h<1&&(h=1),h>r.value.pagesCount()&&(h=r.value.pagesCount()),!t.showConfirm))return await l(h)},l=async(h,p)=>{r.value.setCurPage(h),Ft.Get().p.offset=(h-1)*r.value.limit,await t.store.FTSP(),f()},u=e.computed(()=>{const h=r.value.pagesCount();return h<8?Dt.GenerateNumsRange(2,h-1).filter(p=>p<h&&p>1):Dt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(p=>p<h&&p>1)}),f=()=>{const h=document.querySelector(".el-table__body-wrapper"),p=document.querySelector("#list");h?h.scrollTo({top:0}):p&&p.scrollTo({top:0})};return e.onBeforeUnmount(()=>{Ft.Get().p.drop()}),(h,p)=>{const k=e.resolveComponent("ArrowLeft"),C=e.resolveComponent("PButton"),N=e.resolveComponent("DoubleArrowLeft"),E=e.resolveComponent("EllipsisSvg"),y=e.resolveComponent("DoubleArrowRight"),M=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",d1,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",u1,[e.createVNode(C,{skin:"pag",type:i(e.unref(r).curPage===1),onClick:p[0]||(p[0]=b=>c(e.unref(r).curPage-1))},{default:e.withCtx(()=>[e.createVNode(k)]),_:1},8,["type"]),e.createElementVNode("ul",f1,[e.createElementVNode("li",null,[e.createVNode(C,{skin:"pag",type:o(e.unref(r).curPage===1),text:"1",onClick:p[1]||(p[1]=b=>c(1))},null,8,["type"])]),e.unref(r).pagesCount()>8&&e.unref(r).curPage>4?(e.openBlock(),e.createElementBlock("li",{key:0,onMouseenter:p[3]||(p[3]=b=>s.value=!0),onMouseleave:p[4]||(p[4]=b=>s.value=!1)},[e.createVNode(C,{skin:"pag",type:"neutral",onClick:p[2]||(p[2]=b=>c(e.unref(r).curPage-5))},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(N,{key:0})):(e.openBlock(),e.createBlock(E,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),b=>(e.openBlock(),e.createElementBlock("li",{key:b},[e.createVNode(C,{skin:"pag",type:o(b===e.unref(r).curPage),text:b,onClick:$=>c(b)},null,8,["type","text","onClick"])]))),128)),e.unref(r).pagesCount()>=8&&e.unref(r).curPage<e.unref(r).pagesCount()-3?(e.openBlock(),e.createElementBlock("li",{key:1,onMouseenter:p[6]||(p[6]=b=>a.value=!0),onMouseleave:p[7]||(p[7]=b=>a.value=!1)},[e.createVNode(C,{skin:"pag",type:"neutral",onClick:p[5]||(p[5]=b=>c(e.unref(r).curPage+5))},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(y,{key:0})):(e.openBlock(),e.createBlock(E,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",m1,[e.createVNode(C,{skin:"pag",type:o(e.unref(r).pagesCount()===e.unref(r).curPage),text:e.unref(r).pagesCount(),onClick:p[8]||(p[8]=b=>c(e.unref(r).pagesCount()))},null,8,["type","text"])])):e.createCommentVNode("",!0)]),e.createVNode(C,{skin:"pag",type:i(e.unref(r).curPage===e.unref(r).pagesCount()),onClick:p[9]||(p[9]=b=>c(e.unref(r).curPage+1))},{default:e.withCtx(()=>[e.createVNode(M)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),p1=D(e.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:t}){const o=n,i=t,r=e.ref(o.modelValue),s=e.ref();let a=Zi.SearchModel();e.watch(()=>o.focus,()=>{o.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async f=>{if(f.length<2)return;s.value.activated=!0,a=Zi.SearchModel(),a.searchObjects=[],a.query=f,a.key=o.keyValue;const h=a.searchGroups.find(p=>p.key===o.keyValue);return h&&(a.searchGroup=h),await sa.Search.Search(a),a.searchObjects},l=async f=>{i("select",f),r.value=""},u=f=>{i("input",f),f.length===0&&i("input","")};return(f,h)=>(e.openBlock(),e.createBlock(_a,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":h[0]||(h[0]=p=>e.isRef(r)?r.value=p: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":c,"trigger-on-focus":n.showSuggestions,suggestions:e.unref(a).searchObjects,onSelect:l,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-46a1d0c0"]]),g1={class:"mainblock-body"},y1={class:"mainblock-footer"},w1=D(e.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({background:n.background,padding:n.padding})},[e.createElementVNode("div",{class:"mainblock-header",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"header",{},void 0,!0)],4),e.createElementVNode("div",g1,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",y1,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),b1={class:"right-slider-content"},C1={class:"right-slider-content-header"},S1={class:"right-slider-content-box"},k1={class:"right-slider-button"},x1=D(e.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:t}){const o=n,i=t,r=e.ref(!1);e.watch(()=>o.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("toggle",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"right-slider",style:e.normalizeStyle({marginRight:e.unref(r)?`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`:"0",width:n.sliderOnWidth})},[e.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),e.createElementVNode("div",b1,[e.createElementVNode("div",C1,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",S1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",k1,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),E1={class:"mainblock"},B1={class:"body-block"},N1={class:"tab-block"},V1=D(e.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:t}){const o=n,i=t,r=e.ref(!1),s=e.ref(window.matchMedia("(max-width: 768px)").matches),a=l=>{i("toggle",l)},c=e.ref(!1);return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(o.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}),(l,u)=>(e.openBlock(),e.createElementBlock("div",E1,[e.createElementVNode("div",{class:"slider-block",style:e.normalizeStyle({marginRight:e.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"})},[e.createElementVNode("div",{class:"slider-icon",style:e.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=>c.value=!0),onMouseleave:u[2]||(u[2]=f=>c.value=!1)},[e.createElementVNode("div",{class:"icon-block",style:e.normalizeStyle({transform:e.unref(c)?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"})},[e.renderSlot(l.$slots,"icon",{},void 0,!0)],4)],36),e.createElementVNode("div",{class:"slider-info",style:e.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[e.renderSlot(l.$slots,"slider-body",{},void 0,!0)],4)],4),e.createElementVNode("div",B1,[e.renderSlot(l.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",N1,[e.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),$1=["label","value"],T1=D(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const o={[Ye.String]:"Текстовый ответ",[Ye.Text]:"Развёрнутый текстовый ответ",[Ye.Number]:"Числовой ответ",[Ye.Date]:"Ответ в виде даты",[Ye.Radio]:"Выбор одного из вариантов",[Ye.Set]:"Выбор нескольких вариантов",[Ye.File]:"Ответ в виде файла",[Ye.MatrixRadio]:"Матрица с одним выбором",[Ye.MatrixSet]:"Матрица с несколькими выборами"},i=t,r=s=>{i("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PSelect");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),e.createVNode(l,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(u,f)=>e.createElementVNode("option",{key:u,label:u,value:f},null,8,$1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),M1=["label","value"],P1=D(e.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=e.ref();e.onBeforeMount(()=>{o.value=!0,r.value=cn.GetDefault()});const s=async c=>{r.value=c??cn.GetDefault(),i("load")},a=async c=>{await s(c)};return(c,l)=>{var f;const u=e.resolveComponent("PSelect");return e.unref(o)?(e.openBlock(),e.createBlock(u,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=h=>e.isRef(r)?r.value=h:null),"popper-append-to-body":!1,clearable:!((f=e.unref(r))!=null&&f.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=h=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(cn).Get(),(h,p)=>(e.openBlock(),e.createElementBlock("option",{key:p,label:h.label,value:h},null,8,M1))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-dbb21f2f"]]),I1=["label","value"],R1=D(e.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const o=t,i=e.ref();e.onBeforeMount(()=>{i.value=cn.GetDefault()});const r=async a=>{a||(i.value=cn.GetDefault()),Ft.Get().setSortModel(i.value),Ft.Get().p.drop(),o("load")},s=async a=>{await r(a)};return(a,c)=>{var u;const l=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(l,{modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=f=>e.isRef(i)?i.value=f:null),"popper-append-to-body":!1,clearable:!((u=e.unref(i))!=null&&u.default),"value-key":"label",onChange:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(cn).Get(),(f,h)=>(e.openBlock(),e.createElementBlock("option",{key:h,label:f.label,value:f},null,8,I1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-fd5da1fc"]]),A1={class:"switch-container"},z1={class:"line"},D1={class:"line"},F1=D(e.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(n,{emit:t}){const o=n,i={background:"inherit",border:"1px solid #c4c4c4"},r=()=>o.firstModel.valueEq(u.value)?void 0:i,s=()=>u.value?i:void 0,a=()=>o.secondModel.valueEq(u.value)?void 0:i,c=h=>{var k;return{color:(k=u.value)!=null&&k.valueEq(h)?"#006bb4":"#B0A4C0"}},l=t,u=e.ref(void 0),f=async h=>{var p;(p=u.value)!=null&&p.valueEq(h)||(u.value=h,l("load"))};return(h,p)=>{const k=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",A1,[e.createElementVNode("div",z1,[e.createVNode(k,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.firstModel)),onClick:p[0]||(p[0]=C=>f(n.firstModel))},null,8,["string","style"]),e.createVNode(k,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(c()),onClick:p[1]||(p[1]=C=>f())},null,8,["style"]),e.createVNode(k,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.secondModel)),onClick:p[2]||(p[2]=C=>f(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",D1,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(r()),onClick:p[3]||(p[3]=C=>f(n.firstModel))},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob2",{active:!e.unref(u)}]),style:e.normalizeStyle(s()),onClick:p[4]||(p[4]=C=>f())},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(a()),onClick:p[5]||(p[5]=C=>f(n.secondModel))},null,6),p[6]||(p[6]=e.createElementVNode("div",{class:"switch-axis"},null,-1)),p[7]||(p[7]=e.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),p[8]||(p[8]=e.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),p[9]||(p[9]=e.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),O1={},L1={class:"flex"};function _1(n,t){return e.openBlock(),e.createElementBlock("div",L1,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const H1=D(O1,[["render",_1],["__scopeId","data-v-5023d414"]]),U1=D(e.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=async()=>{i("submit"),o.value=!o.value};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("GridContainer"),f=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(f,{title:n.title,icon:"edit-title","with-hover":!0,close:e.unref(o),width:"100%",onKeyupEnter:r},{"open-inside-content":e.withCtx(()=>[e.createVNode(u,{"custom-class":"grid"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},void 0,!0),e.createVNode(l,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:e.withCtx(()=>[n.content.length>0?(e.openBlock(),e.createBlock(c,{key:0,string:n.content},null,8,["string"])):(e.openBlock(),e.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-65abc352"]]),v1={class:"top-slider-content"},q1={class:"center"},j1=D(e.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:t}){const o=n,i=t,r=e.ref(!0);e.watch(()=>o.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("toggle",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`:"0",height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",v1,[e.createElementVNode("div",q1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",{class:"click-line",style:e.normalizeStyle({height:n.sliderOffHeight}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},[e.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function W1(n){n.component("PageNotFound",Qs),n.component("AdaptiveContainer",Ig),n.component("AdaptiveContainerHorizontal",zg),n.component("CarouselImages",vg),n.component("ContextWindow",qg),n.component("DropList",Gg),n.component("FilterCheckbox",Qg),n.component("FiltersButtonsSelect",Yg),n.component("FilterSelect",Zg),n.component("FTSPPanel",Jg),n.component("GeneralItem",Kg),n.component("GridContainer",Oa),n.component("InfoItem",n1),n.component("InfoItemSelectButtons",o1),n.component("LeftRightContainer",s1),n.component("PAutocomplete",_a),n.component("PhoneForm",c1),n.component("PPagination",h1),n.component("RemoteSearch",p1),n.component("ResearcheContainer",w1),n.component("RightSliderContainer",x1),n.component("RightTabsContainer",V1),n.component("SelectValueType",T1),n.component("SortList",P1),n.component("SortSelect",R1),n.component("Switch3Pos",F1),n.component("ThemeWrapper",H1),n.component("ToggleInfoItem",U1),n.component("TopSliderContainer",j1)}const G1=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),Q1=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),Y1=D(e.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[e.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"]]),X1=D(e.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"]]),Ha=D(e.defineComponent({__name:"IconClose",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[e.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"]]),Z1=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),J1=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),K1=D(e.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[e.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"]]),ey=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),ty=D(e.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[e.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"}),e.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"]]),ny=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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"]]),oy=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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"]]),iy=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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"]]),ry=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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"]]),sy=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),i[3]||(i[3]=e.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 ay(n){n.component("IconDownload",G1),n.component("IconFilter",Q1),n.component("ArrowLeft",ny),n.component("ArrowRight",oy),n.component("DoubleArrowLeft",iy),n.component("DoubleArrowRight",ry),n.component("EllipsisSvg",sy),n.component("IconArrowLeft",Y1),n.component("IconCheckDefault",X1),n.component("IconClose",Ha),n.component("IconEdit",Z1),n.component("IconEmail",J1),n.component("IconMove",K1),n.component("IconPhone",ey),n.component("IconSearch",La),n.component("IconSelectArrow",ty)}const ly=e.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const t=e.ref(n.initActiveIdx),o=i=>{t.value=i};return e.watch(()=>n.initActiveIdx,()=>{o(n.initActiveIdx)}),{changeActiveId:o,activeIdx:t}}});function cy(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const dy=D(ly,[["render",cy]]),uy=e.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:t}){const o=e.ref(n.activeId==="0"),i=()=>{o.value=!o.value,t("changeActiveId",n.tabId)};return e.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(o.value=!0)}),e.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(o.value=!1)}),{collapsed:o,handleItemClick:i}}}),fy=["for"],my={class:"inside-icon"};function hy(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"tab",style:e.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?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:t[0]||(t[0]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[3]||(t[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])])):n.isCollaps&&!n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:t[1]||(t[1]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[4]||(t[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("label",{for:n.tabId,onClick:t[2]||(t[2]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[e.createElementVNode("div",{style:e.normalizeStyle({cursor:n.isCollaps?"pointer":"default",background:n.changeColor?n.background:n.backgroundAttention,padding:n.padding,borderRadius:"5px"}),class:"tab-name"},[e.createElementVNode("div",my,[e.renderSlot(n.$slots,"icon",{},void 0,!0)]),e.createElementVNode("div",{class:"title-in",style:e.normalizeStyle({marginRight:n.isCollaps?"50px":"0",width:n.isCollaps?"calc(100% - 50px)":"100%"})},[e.renderSlot(n.$slots,"inside-title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)],4),e.createElementVNode("div",{class:e.normalizeClass(["tools-bar",{"hidden-part":n.showToolsOnHover}])},[e.renderSlot(n.$slots,"tools",{},void 0,!0)],2)],4)],8,fy),e.createElementVNode("div",{style:e.normalizeStyle({maxHeight:n.isCollaps?"":"1000000vh",background:n.changeColor?n.background:n.backgroundAttention}),class:e.normalizeClass(n.collapsed?"tab-content-down":"tab-content-up")},[e.renderSlot(n.$slots,"default",{},void 0,!0)],6)],4),t[5]||(t[5]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-37d79495><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-37d79495></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-37d79495></path></symbol></svg>',1))],64)}const py=D(uy,[["render",hy],["__scopeId","data-v-37d79495"]]),gy={class:"tab"},yy={class:"rotate"},wy=D(e.defineComponent({__name:"VerticalCollapseContainer",setup(n){const t=e.ref(!1),o=async()=>{t.value=!t.value};return(i,r)=>{const s=e.resolveComponent("ArrowRight"),a=e.resolveComponent("ArrowLeft");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",gy,[e.renderSlot(i.$slots,"main",{},void 0,!0),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"20px",transition:"0.3s"}),class:"left"},[e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"100%":"0",transition:"0.3s"}),class:"left-content"},[e.renderSlot(i.$slots,"inside-content-left",{},void 0,!0)],4),e.createElementVNode("div",{class:"arrow-bar",onClick:o},[e.createElementVNode("div",yy,[e.renderSlot(i.$slots,"inside-title",{},void 0,!0)]),e.unref(t)?(e.openBlock(),e.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(e.openBlock(),e.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"100%",transition:"0.3s"}),class:"right"},[e.renderSlot(i.$slots,"inside-content-right",{},void 0,!0)],4)]),e.createVNode(a),e.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),by={class:"add-block_body"},Cy=D(e.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(t,o)=>{const i=e.resolveComponent("PSticky");return e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createVNode(i,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",by,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),Sy=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),ky={class:"add-block_body"},xy=D(e.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(t,o)=>{const i=e.resolveComponent("PSticky"),r=e.resolveComponent("PContainer");return e.openBlock(),e.createBlock(r,{background:n.background,margin:n.margin,padding:n.padding},{default:e.withCtx(()=>[e.createVNode(i,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",ky,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),Ey={class:"select-dialog"},By={class:"select-dialog-header"},Ny={class:"select-dialog-title"},Vy={class:"select-dialog-content"},$y={class:"select-dialog-actions"},Ua=D(e.defineComponent({__name:"PAddDialog",props:e.mergeModels({title:{type:String,default:""},store:{type:Object,required:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["add","close"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.useModel(n,"modelValue"),a=e.ref([]),c=x.Ripple,l=x.ClosePopup,u=async()=>{await i.store.GetOptions(),a.value=i.store.Options},f=async E=>{await i.store.Get(E.value);const y=i.store.Item,M=new y.constructor(y);r("add",M),h()},h=()=>{r("close"),s.value=!1},p=E=>{E||r("close")},k=()=>{s.value&&h()},C=()=>{s.value=!s.value},N=async()=>{await e.nextTick();const E=document.querySelector(".select-dialog-content .q-item");E&&"focus"in E&&E.focus()};return t({opened:s,toggle:C}),e.onBeforeMount(u),(E,y)=>(e.openBlock(),e.createBlock(dn,{modelValue:s.value,"onUpdate:modelValue":[y[0]||(y[0]=M=>s.value=M),p],position:"top",onKeydown:e.withKeys(k,["escape"]),onShow:N},{default:e.withCtx(()=>[e.createElementVNode("div",Ey,[e.createElementVNode("div",By,[e.createElementVNode("div",Ny,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(l)]])]),e.createElementVNode("div",Vy,[e.createVNode(e.unref(x.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),M=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.QItem),{key:M.value,clickable:"",class:"q-px-md q-py-sm",onClick:b=>f(M)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemSection),null,{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemLabel),{class:"text-body1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(c)]])),128))]),_:1})]),e.createElementVNode("div",$y,[e.withDirectives(e.createVNode(oe,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[e.unref(l)]])])])]),_:1},8,["modelValue"]))}}),[["__scopeId","data-v-9f6a2f5b"]]),Ty=["src"],My={key:0,class:"header-row"},Py={class:"title-wrapper"},Iy={key:0,class:"title-icon"},Ry={class:"title-text"},Ay={class:"text-subtitle1 text-weight-medium"},zy={key:0,class:"caption-row"},Dy={class:"text-caption text-grey-6"},Fy=["innerHTML"],Oy={key:1,class:"card-footer"},va=D(e.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:t}){const o=e.ref(null),i=n,r=t,s=e.computed(()=>i.img?i.isMain?"365px":"200px":"0"),a=c=>{i.noPointer||r("click",c)};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{class:e.normalizeClass(["card",{"no-hover":n.noHover,"cursor-pointer":!n.noPointer}]),flat:"",bordered:"",style:e.normalizeStyle({height:n.height}),onClick:a},{default:e.withCtx(()=>[n.img?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image-container",style:e.normalizeStyle({height:s.value})},[e.createElementVNode("img",{class:"image-img",src:n.img,alt:"image",style:e.normalizeStyle({height:s.value})},null,12,Ty)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QCardSection),{class:"card-content",style:e.normalizeStyle({maxHeight:n.maxHeight})},{default:e.withCtx(()=>[n.title||c.$slots.title||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",My,[e.createElementVNode("div",Py,[n.icon||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",Iy,[e.renderSlot(c.$slots,"icon",{},()=>[e.createVNode(e.unref(x.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ry,[e.renderSlot(c.$slots,"title",{},()=>[e.createElementVNode("span",Ay,e.toDisplayString(n.title),1)],!0)])]),c.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",zy,[e.renderSlot(c.$slots,"caption",{},()=>[e.createElementVNode("span",Dy,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||c.$slots.title?(e.openBlock(),e.createBlock(e.unref(x.QSeparator),{key:1,class:"header-separator"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"content-wrapper"},[e.renderSlot(c.$slots,"default",{},()=>[n.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(n.isMain?"main-content":"preview-content"),innerHTML:n.content},null,10,Fy)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",Oy,[e.renderSlot(c.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),Ly={key:0,class:"list-title"},_y={class:"draggable-item"},Hy={class:"drag-handle"},Uy={class:"item-content"},vy={key:0,class:"item-actions"},qy={class:"item-content"},jy={key:0,class:"item-actions"},Wy={key:4,class:"add-button-container"},Gy=e.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:z.H.BaseStore,default:void 0},addFunc:{type:Function,default:void 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:t}){e.useCssVars(l=>({v2a47a50e:n.background}));const o=n,i=t,r=async()=>{const l=o.addFunc?await o.addFunc():void 0;l&&(typeof l.order<"u"&&(l.order=o.list.length),o.addToList&&o.store&&o.store.AppendToAll(l),o.store&&await o.store.Create(l)),await c(),i("add",l)},s=async l=>{o.removeFromList&&z.H.Classes.RemoveFromClassById(l,o.list),o.store&&await o.store.Remove(l),await c(),i("remove",l)},a=async l=>{o.store&&await o.store.Update(l),i("update",l)},c=async()=>{!o.sortable||o.list.length===0||typeof o.list[0].order>"u"||(z.H.Sorter.Sort(o.list),o.store&&await o.store.UpdateMany(o.list),i("sort"))};return(l,u)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(l.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(e.openBlock(),e.createElementBlock("div",Ly,e.toDisplayString(n.title),1)):e.renderSlot(l.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(wi),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:c},{item:e.withCtx(({element:f,index:h})=>[e.createElementVNode("div",_y,[e.createElementVNode("div",Hy,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",Uy,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:h},()=>[e.createVNode(et,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",vy,[e.createVNode(oe,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)])]),_:3},8,["list"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(n.list,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"static-item",style:e.normalizeStyle({background:n.background})},[e.createElementVNode("div",qy,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:h},()=>[e.createVNode(et,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",jy,[e.createVNode(oe,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)],4))),128)),n.showAdd?(e.openBlock(),e.createElementBlock("div",Wy,[e.createVNode(oe,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),qa=D(Gy,[["__scopeId","data-v-c87ed91c"]]),Qy={class:"del-block_title"},Yy={class:"del-block_body"},Xy=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"del-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createElementVNode("div",Qy,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",Yy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),ja=D(e.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:t}){const o=n,i=t,r=a=>{a.key==="Escape"&&s()};e.onMounted(()=>{document.body.addEventListener("keydown",r)}),e.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{o.closable&&i("close")};return(a,c)=>{const l=e.resolveComponent("IconClose");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:s})):e.createCommentVNode("",!0),n.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"modal-w",style:e.normalizeStyle({maxWidth:n.width,width:n.width,margin:n.margin,padding:n.padding,top:n.top,maxHeight:n.maxHeight})},[n.closable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[e.createVNode(l,{size:"20px"})])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function Zy(n){n.component("CollapseContainer",dy),n.component("CollapseItem",py),n.component("VerticalCollapseContainer",wy),n.component("PAdd",Cy),n.component("PAddDialog",Ua),n.component("PCard",va),n.component("PCrudList",qa),n.component("PEditDialog",_n),n.component("PModal",ja),n.component("PContainer",Sy),n.component("PContainerStickyHead",xy),n.component("PDel",Xy)}const Jy={class:"btn-group"},Wa=D(e.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:t}){const o=t,i=e.computed(()=>_e.Form.GetButtons()),r=e.useTemplateRef("fields"),s=async c=>{if(!c.isSubmit){_e.Form.SetChunk(c.GetChunk()),a();return}const l=_e.Form.Validate();if(l.length>0){Qt.Notify.Error(l.join("<br/>"));return}o("submit")},a=()=>{if(!r.value)return;const c=r.value[0];c&&c.$refs.input.focus()};return e.onMounted(async()=>{await a()}),e.onBeforeUnmount(()=>{_e.Form.Reset()}),(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"auth-card",style:e.normalizeStyle({maxWidth:n.width,margin:n.margin,padding:n.padding,background:n.background})},[e.createVNode(Ji,{string:e.unref(_e).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_e).Form.GetFields(),u=>(e.openBlock(),e.createBlock(et,{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)),e.createElementVNode("div",Jy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(u,f)=>(e.openBlock(),e.createBlock(oe,{id:u.id,key:u.GetChunk(),disabled:e.unref(_e).Form.IsBlock,type:f===0?e.unref(he).Success:e.unref(he).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"]]),Ky=e.defineComponent({__name:"PAuthModal",props:{width:{type:String,default:"320px"},margin:{type:String,default:"0"},padding:{type:String,default:"2vw"}},emits:["submit"],setup(n){const t=()=>{_e.Form.Reset(),_e.Modal.Close()};return(o,i)=>(e.openBlock(),e.createBlock(ja,{show:e.unref(_e).Modal.Visible,closable:e.unref(_e).Modal.Closable,width:n.width,padding:n.padding,onClose:t},{default:e.withCtx(()=>[e.createVNode(Wa,{margin:n.margin,padding:"0",onSubmit:i[0]||(i[0]=r=>o.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),e0=["onClick"],t0=D(e.defineComponent({__name:"PMenuTabs",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:t}){const o=n,i=t,r=e.ref(window.innerWidth),s=e.ref(),a=e.ref(Number(o.tabHeight.replace(/[^+\d]/g,""))),c=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(o.tabHeight.replace(/[^+\d]/g,""))};e.onMounted(()=>window.addEventListener("resize",c)),e.onUnmounted(()=>window.removeEventListener("resize",c));const l=e.computed(()=>`calc(100% - ${a.value}px + 1px)`);e.onBeforeMount(()=>{o.menus.Select()});const u=f=>{o.menus.Select(f),i("select")};return(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({height:`calc(100% - ${n.outTopMargin} - ${n.tabHeight}`,margin:n.margin,borderRadius:n.borderRadius})},[e.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:e.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${n.minMenuItemWidth}, 1fr))`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menus.items,(p,k)=>(e.openBlock(),e.createElementBlock("div",{key:k},[e.createElementVNode("div",{class:e.normalizeClass({"selected-tab":k===n.menus.idx,tab:k!==n.menus.idx}),style:e.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:C=>u(k)},e.toDisplayString(p.name),15,e0)]))),128))],4),e.createElementVNode("div",{class:"body-container",style:e.normalizeStyle({background:n.background,height:e.unref(l)})},[e.renderSlot(f.$slots,"default",{},()=>[n.menus.idx>-1?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.menus.GetComponent()),{key:0})):e.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-1046962d"]]),n0=["id"],o0=["for"],i0={class:"left-field"},r0=["href","download"],s0={key:1,class:"text-field__input"},a0={class:"right-field"},l0=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Et},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:t}){const o=n,i=t,r=Ke.GUID(),s=Ke.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!l(f.name)){Nn.Error(`Загруженный файл должен быть в одном из форматов: ${o.formats.join(", ")}`);return}const h=new Et;h.setFile(f),h.url=URL.createObjectURL(f),i("upload",h)},c=()=>{i("remove")};e.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const l=u=>{let f=Xs.Get(u);return!!o.formats.includes(f.toLowerCase())};return(u,f)=>{const h=e.resolveComponent("PString"),p=e.resolveComponent("PFlex"),k=e.resolveComponent("PButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("input",{id:e.unref(r),type:"file",hidden:"",onChange:a},null,40,n0),e.createElementVNode("div",{class:"text-field",style:e.normalizeStyle({margin:n.margin,padding:n.padding})},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"text-field__label",for:n.label},e.toDisplayString(n.label),9,o0)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",i0,[e.createVNode(p,null,{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},void 0,!0),e.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?(e.openBlock(),e.createElementBlock("div",{key:0,class:"text-field__input",style:e.normalizeStyle({color:n.color})},[e.createElementVNode("a",{href:n.fileInfo.getFileUrl(),target:"_blank",download:n.fileInfo.originalName},[e.createElementVNode("div",null,e.toDisplayString(n.fileInfo.originalName),1)],8,r0),e.createVNode(k,{skin:"text",type:"del",onClick:c},{default:e.withCtx(()=>[e.createVNode(Ha,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",s0,[e.createVNode(h,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",a0,[e.createVNode(k,{id:e.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)}}}),c0=D(l0,[["__scopeId","data-v-8b73ee22"]]);function Ga(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),o.push.apply(o,i)}return o}function le(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Ga(Object(o),!0).forEach(function(i){mt(n,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ga(Object(o)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(o,i))})}return n}function mt(n,t,o){return t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function d0(n,t){if(n==null)return{};var o,i,r=function(a,c){if(a==null)return{};var l,u,f={},h=Object.keys(a);for(u=0;u<h.length;u++)l=h[u],c.indexOf(l)>=0||(f[l]=a[l]);return f}(n,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)o=s[i],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(n,o)&&(r[o]=n[o])}return r}function wn(n){return function(t){if(Array.isArray(t))return xr(t)}(n)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(n)||function(t,o){if(t){if(typeof t=="string")return xr(t,o);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return xr(t,o)}}(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 xr(n,t){(t==null||t>n.length)&&(t=n.length);for(var o=0,i=new Array(t);o<t;o++)i[o]=n[o];return i}var Qa,u0,ni,Ie=(Qa=function(n){/*!
22
+ `+s)}}catch{}}throw i}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=ln(this.defaults,o);const{transitional:i,paramsSerializer:r,headers:s}=o;i!==void 0&&jo.assertOptions(i,{silentJSONParsing:je.transitional(je.boolean),forcedJSONParsing:je.transitional(je.boolean),clarifyTimeoutError:je.transitional(je.boolean),legacyInterceptorReqResOrdering:je.transitional(je.boolean),advertiseZstdAcceptEncoding:je.transitional(je.boolean),validateStatusUndefinedResolves:je.transitional(je.boolean)},!1),r!=null&&(S.isFunction(r)?o.paramsSerializer={serialize:r}:jo.assertOptions(r,{encode:je.function,serialize:je.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),jo.assertOptions(o,{baseUrl:je.spelling("baseURL"),withXsrfToken:je.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&S.merge(s.common,s[o.method]);s&&S.forEach(["delete","get","head","post","put","patch","query","common"],E=>{delete s[E]}),o.headers=qe.concat(a,s);const c=[];let l=!0;this.interceptors.request.forEach(function(V){if(typeof V.runWhen=="function"&&V.runWhen(o)===!1)return;l=l&&V.synchronous;const N=o.transitional||zi;N&&N.legacyInterceptorReqResOrdering?c.unshift(V.fulfilled,V.rejected):c.push(V.fulfilled,V.rejected)});const u=[];this.interceptors.response.forEach(function(V){u.push(V.fulfilled,V.rejected)});let f,m=0,p;if(!l){const E=[js.bind(this),void 0];for(E.unshift(...c),E.push(...u),p=E.length,f=Promise.resolve(o);m<p;)f=f.then(E[m++],E[m++]);return f}p=c.length;let k=o;for(;m<p;){const E=c[m++],V=c[m++];try{k=E(k)}catch(N){V.call(this,N);break}}try{f=js.call(this,k)}catch(E){return Promise.reject(E)}for(m=0,p=u.length;m<p;)f=f.then(u[m++],u[m++]);return f}getUri(t){t=ln(this.defaults,t);const o=zs(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Bs(o,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){cn.prototype[t]=function(o,i){return this.request(ln(i||{},{method:t,url:o,data:i&&S.hasOwnProp(i,"data")?i.data:void 0}))}}),S.forEach(["post","put","patch","query"],function(t){function o(i){return function(s,a,c){return this.request(ln(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}cn.prototype[t]=o(),t!=="query"&&(cn.prototype[t+"Form"]=o(!0))});let du=class Ul{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(c=>{i.subscribe(c),s=c}).then(r);return a.cancel=function(){i.unsubscribe(s)},a},t(function(s,a,c){i.reason||(i.reason=new io(s,a,c),o(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const t=new AbortController,o=i=>{t.abort(i)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new Ul(function(r){t=r}),cancel:t}}};function uu(n){return function(o){return n.apply(null,o)}}function fu(n){return S.isObject(n)&&n.isAxiosError===!0}const Ui={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(Ui).forEach(([n,t])=>{Ui[t]=n});function Gs(n){const t=new cn(n),o=ls(cn.prototype.request,t);return S.extend(o,cn.prototype,t,{allOwnKeys:!0}),S.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return Gs(ln(n,r))},o}const $e=Gs(oo);$e.Axios=cn,$e.CanceledError=io,$e.CancelToken=du,$e.isCancel=Ps,$e.VERSION=Li,$e.toFormData=_o,$e.AxiosError=_,$e.Cancel=$e.CanceledError,$e.all=function(t){return Promise.all(t)},$e.spread=uu,$e.isAxiosError=fu,$e.mergeConfig=ln,$e.AxiosHeaders=qe,$e.formToJSON=n=>Ts(S.isHTMLForm(n)?new FormData(n):n),$e.getAdapter=qs.getAdapter,$e.HttpStatusCode=Ui,$e.default=$e;const{Axios:Rw,AxiosError:Aw,CanceledError:zw,isCancel:Dw,CancelToken:Fw,VERSION:Ow,all:Lw,Cancel:_w,isAxiosError:Hw,spread:Uw,toFormData:vw,AxiosHeaders:qw,HttpStatusCode:jw,formToJSON:Ww,getAdapter:Gw,mergeConfig:Qw,create:Yw}=$e;var ro=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(ro||{});const so=(()=>{function n(){const l=r();return!(!l||l==="undefined")}function t(l){l.accessToken&&localStorage.setItem("access_token",l.accessToken),l.refreshToken&&localStorage.setItem("refresh_token",l.refreshToken)}function o(){const l=localStorage.getItem("user");return l?JSON.parse(l).id:""}function i(){const l=localStorage.getItem("user");if(l)return JSON.parse(l)}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 c(l){if(!n())return;const u=so.getUser();u&&(u.human=l,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:t,getAccessToken:r,getRefreshToken:s,getUserId:o,clearTokens:a,getUser:i,updateHuman:c}})();class vi{constructor(t){d(this,"code",400);d(this,"err","");K.BuildClass(this,t)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(t,o){const i=t.config;if(t.response){if(t.response.status===401&&!i._retry)return i._retry=!0,o.defaults.headers.common.token=so.getAccessToken(),t.config.headers.token=so.getAccessToken(),t.config.baseURL=void 0,o.request(i);if(t.response.status>=500){if(t.response.data==="неверный логин или пароль"){Nn.Error("Неверный логин или пароль");return}Nn.Error("Ошибка на сервере, попробуйте позже")}if(t.response.status>=400&&t.response.status<500){const r=new vi(t.response.data).getErr();r&&Nn.Error(r)}return Promise.reject(t)}}}const An=$e.create();An.interceptors.response.use(n=>n,async n=>await vi.Handle(n,An));class ao{static async Get(t,o,i){return await An({method:ro.GET,url:t,headers:o,responseType:i})}static async Post(t,o,i,r){return o["Content-Type"]="multipart/form-data",await An({method:ro.POST,url:t,headers:o,responseType:i,data:r})}static async Put(t,o,i){return o["Content-Type"]="multipart/form-data",await An({method:ro.PUT,url:t,headers:o,data:i})}static async Delete(t,o){return await An({method:ro.DELETE,url:t,headers:o})}}class Wo{constructor(t){d(this,"name","");K.BuildClass(this,t)}static Set(){}static Get(t,o){const i=sessionStorage.getItem(t);if(i){const r=JSON.parse(i),s=new Date,a=new Date(r.time),c=s.getTime()-a.getTime();return Math.round(c/6e4)>(o||10)?null:r.data}else return null}static async TryGet(t,o,i){let r;return r=Wo.Get(t,i),r||(r=await o()),r}}var qi=(n=>(n.ContentType="Content-Type",n.Token="token",n))(qi||{}),Qs=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Qs||{});const ge=class ge{static Setup(t="http://localhost",o,i="api"){this.baseUrl=xe.BuildSafeUrl(t,o,i),this.host=t,this.apiVersion=i}static newWebSocket(t){const o=this.host.replace("http","ws")+"/ws/"+t;return new WebSocket(o)}static download(t,o){const i=ge.getDownloadFileName(t,o.headers);if(!(o.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(o.data),s=document.createElement("a");s.href=r,s.setAttribute("download",i),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(t,o){if(t)return t;const i=o["content-disposition"];if(!i)return"file";const r=i.indexOf('"')+1,s=i.lastIndexOf('"'),a=i.substring(r,s);return a||"file"}static getHeaders(t){const o=kt.Get(ct.AccessToken);return t||(t=ge.headers),o&&(t[qi.Token]=o),t??ge.headers}static returnResponse(t,o){if(o)return t!=null&&t.isBlob?ge.download(t.downloadFileName,o):o.data}static async Get(t){return ge.returnResponse(t,await ao.Get(ge.buildUrl((t==null?void 0:t.query)??""),ge.getHeaders(t==null?void 0:t.headers),ge.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return ge.returnResponse(t,await ao.Post(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers),ge.getResponseType(t.isBlob),ge.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return ge.returnResponse(t,await ao.Put(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers),ge.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return ge.returnResponse(t,await ao.Delete(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:o}=t;return new EventSource(ge.buildUrl(o))}static buildUrl(t=""){try{return xi(this.baseUrl,t)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(t){return t?"blob":"json"}static createFormDataPayload(t,o){const i=new FormData;if(i.append("form",JSON.stringify(t)),o)for(const r of o)r.file&&i.append(r.id??"files",r.file,r.originalName);return i}};d(ge,"baseUrl",""),d(ge,"apiVersion","api"),d(ge,"host",""),d(ge,"headers",{[qi.ContentType]:Qs.ApplicationJson});let Be=ge;const D=(n,t)=>{const o=n.__vccOpts||n;for(const[i,r]of t)o[i]=r;return o},mu={},hu={style:{"text-align":"center"}};function pu(n,t){return e.openBlock(),e.createElementBlock("div",hu,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const Ys=D(mu,[["render",pu]]),gu=[{path:"/:pathMatch(.*)*",name:"NotFound",component:Ys}],ht=class ht{static Setup(t,o=""){this.router=t,this.title=o,this.ChangeDocumentTitle(),this.AddRoutes(gu)}static Get(){return this.router}static AddRoutes(t){t.forEach(o=>{this.Get().addRoute(o)})}static async To(t){await this.Get().push(t)}static async ToHome(){}static async Replace(t){await this.Get().replace(t)}static Id(){return ht.GetStringParam("id")}static Slug(){return ht.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return ht.GetStringQueryParam("qid")}static Route(){var t;return(t=this.Get())==null?void 0:t.currentRoute.value}static RouterPushBlank(t){const o=this.Get().resolve({path:t});window.open(o==null?void 0:o.href,"_blank")}static GetPath(){var o;const t=(o=ht.Route())==null?void 0:o.path.split("/");return!t||t.length<=0?"":t[t.length-1]}static async ToAdmin(t){if(!t){await this.Get().push("/admin");return}let o=t;o[0]==="/"&&(o=t.substring(1)),await ht.To(`/admin/${o}`)}static GetStringQueryParam(t){return String(this.Route().query[t])}static GetNumberQueryParam(t){return Number(this.Route().query[t]??0)}static GetStringParam(t){var o;return(o=this.Route())==null?void 0:o.params[t]}static SetQueryParam(t,o){const i=new URL(window.location);i.searchParams.set(t,String(o)),history.replaceState(null,"",i)}static Resolve(t){return this.Get().resolve(t)}};d(ht,"router"),d(ht,"title",""),d(ht,"ChangeDocumentTitle",(t="")=>{let o=ht.Route().meta.title??t;o&&(o=" | "+o),document.title=ht.title+o});let Et=ht;class Ve{constructor(t,o){d(this,"items",e.reactive([]));d(this,"item");d(this,"options",e.reactive([]));d(this,"count",e.ref(0));d(this,"classConstructor");d(this,"url","");d(this,"searchStr",e.ref(""));this.classConstructor=t,this.item=e.reactive(new this.classConstructor),this.url=o}Set(t){Object.assign(this.item,new this.classConstructor(t))}getUrl(t){return t?`${this.url}/${t}`:this.url}async GetOptions(t="name",o="id"){const i=`${this.getUrl()}/options/${t}/${o}`;try{const r=await Be.Get({query:i});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(t){try{let o;const i=Be.Get;t&&t.withCache?o=await Wo.TryGet(this.getUrl(),i):o=await i({query:this.getUrl()}),Array.isArray(o)?this.SetAll(o):this.SetAllWithCount(o)}catch(o){console.warn("GetAll failed:",o)}}async Get(t){try{t||(t=Et.Id()),this.Set(await Be.Get({query:this.getUrl(t)}))}catch(o){console.warn("Get failed:",o)}}async GetBySlug(t){try{t||(t=Et.Slug()),this.Set(await z.H.HttpClient.Get({query:this.getUrl("by-slug/"+t)}))}catch(o){console.warn("GetBySlug failed:",o)}}async FTSP(t){var o;try{const r=((t==null?void 0:t.ftsp)??ut.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await Be.Post(s);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(r.p.append){this.AppendToAll((o=a.data)==null?void 0:o.items);return}this.SetAllWithCount(a.data)}}catch(i){console.warn("FTSP failed:",i)}}async Create(t){try{const o=t??this.item,i={payload:o,query:this.getUrl()};return o.getFileInfos&&(i.fileInfos=o.getFileInfos()),await Be.Post(i)}catch(o){console.warn("Create failed:",o)}}async CreateAndSet(t){const o=await this.Create(t);this.Set(o)}async CreateMany(t){if(!t)return;const o=[];t.forEach(i=>{o.push(new Promise(()=>this.Create(i)))}),Promise.all(o)}async Update(t){try{const o=t??this.item,i={query:this.getUrl(`${o.id}`),payload:o};return o.getFileInfos&&(i.fileInfos=o.getFileInfos(),i.fileInfos.forEach(r=>r.url="")),await Be.Put(i)}catch(o){console.warn("Update failed:",o)}}async UpdateAndSet(t){const o=await this.Update(t);this.Set(o)}async UpdateAndReset(t){await this.Update(t??this.item),this.Set()}async Remove(t){if(t)try{await Be.Delete({query:this.getUrl(`${t}`)}),this.RemoveItem(t)}catch(o){console.warn("Remove failed:",o)}}async UpdateMany(t){if(t||(t=this.items),!t)return;const o=[];t.forEach(i=>{o.push(new Promise(()=>this.Update(i)))}),Promise.all(o)}SetAll(t){this.items.splice(0,this.items.length),t&&this.items.push(...t.map(o=>new this.classConstructor(o)))}SetAllWithCount(t){this.SetAll(t.items),this.count.value=t.count}RemoveItem(t){const o=this.items.findIndex(i=>i.id===t);o<0||this.items.splice(o,1)}AppendToAll(t){if(t){if(Array.isArray(t)){const o=t.map(i=>new this.classConstructor(i));this.items.push(...o);return}this.items.push(new this.classConstructor(t))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){K.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(t){if(t){if(Array.isArray(t)){const o=t.map(i=>new this.classConstructor(i));this.items.unshift(...o);return}this.items.unshift(new this.classConstructor(t))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(t=>z.H.Strings.SearchInFields(this.searchStr.value,t.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function yu(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const wu=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class bu{static GetRandColor(t){return Dt.GetRandEL(t??wu)}}function Xs(n,t){const o=[],i=t||dt.Asc,r=i===dt.Asc?dt.Desc:dt.Asc;return Object.values(n).forEach(s=>{o.push(s(i)),o.push(s(r))}),o.length>0&&!o.some(s=>s.default)&&(o[0].default=!0),t&&o.forEach(s=>{s.default&&(s.default=s.order===t)}),o}let Cu=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",Xn.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",To[Xn.FiveMinutes])}startDrag(t,o){this.draggedStartTime=t,this.draggedEndTime=o,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=To[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}};const ji=n=>n===8||n===46,Su=n=>n>46&&n<58,ku=n=>n>34&&n<41,xu=n=>n+".",Eu=(n,t,o)=>{ji(t)||ku(t)||(!Su(t)||o>9)&&n.preventDefault()};function Bu(n,t){if(t>8){let o=n.substring(0,2).replace(".","1");Number(o)>31&&(o="31");let i=n.substring(3,5).replace(".","1");Number(i)>12&&(i="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=o+"."+i+"."+r}return n}function Vu(n){const t=n.keyCode;let o=n.srcElement.value;const i=o.length;Eu(n,t,i),!ji(t)&&(i===2||i===5)&&(o=xu(o));const r=n.srcElement.value+String.fromCharCode(n.which);if(ji(t)){n.srcElement.value=o;return}o.length===0&&Number(r)>3&&(o="3",n.preventDefault()),o.length===1&&Number(r)>31&&(o="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(o=o.substring(0,3)+"12",n.preventDefault()),o=Bu(o,i),n.srcElement.value=o}const Nu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],$u="ru-RU";class jt{constructor(){d(this,"locale","ru-RU")}static Format(t,o){if(!t)return"";const i={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return o&&(i.year=o.year||o.year===void 0?o.year:i.year,i.month=o.month||o.month===void 0?o.month:i.month,i.day=o.day||o.day===void 0?o.day:i.day,i.hour=o.hour??i.hour,i.minute=o.minute??i.minute),Intl.DateTimeFormat($u,i).format(new Date(t))}static FormatWithTime(t){return jt.Format(t,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(t){const o=t.split(".");return new Date(`${o[2]}-${o[1]}-${o[0]}`)}static GetPeriod(t,o,i){return`${this.Format(t,i)}-${this.Format(o,i)}`}static GetShortDayName(t){return t?Nu[t.getDay()]:""}static GetCurrentWeekPeriod(t){const o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate()-o.getDay()+1),r=new Date(o.getFullYear(),o.getMonth(),i.getDate()+7);return this.GetPeriod(i,r,t||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(t,o){const i=new Date,r=new Date,s=jt.SplitHourTime(t),a=jt.SplitHourTime(o);return i.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-i.getTime())/1e3/60}static HourTimeinMunutes(t){const o=jt.SplitHourTime(t);return o[0]*60+o[1]}static SplitHourTime(t){const o=t.split(":");return[Number(o[0]),Number(o[1])]}static AddMinutesToHM(t,o){const i=new Date,r=jt.SplitHourTime(t);i.setHours(r[0],r[1],0,0);const s=new Date(i.getTime()+o*6e4),a=s.getHours(),c=s.getMinutes();return`${a}:${c}`}static GetMonthsDiff(t,o){return o.getMonth()-t.getMonth()+12*(o.getFullYear()-t.getFullYear())}static StringToDate(t){const o=t.split(".");return new Date(`${o[2]}-${o[1]}-${o[0]}`)}static GetDateOrToday(t){return t?t.date:new Date}static InPeriod(t,o,i){return new Date(t)>=new Date(o)&&new Date(t)<=new Date(i)}static GetDatesFromPeriod(t,o){const i=[new Date(t)];let r=t;for(;r<=o;)r=jt.AddDays(r,1),i.push(r);return i}static AddDays(t,o){const i=new Date(t);return i.setDate(i.getDate()+o),i}static Eq(t,o){return t.getTime()===o.getTime()}}class Tu{constructor(){d(this,"dragged",!1);d(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(t){this.dragged=!0,t&&t.dataTransfer&&t.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Zs{static Get(t){const o=t.split(".");return o[o.length-1]}}const Pu=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function t(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function o(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){n(s,[a]);return}const l=c.split(",");l.push(a),n(s,l)}function i(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const l=c.split(",").filter(u=>u!==a);n(s,l)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:o,removeFromFavourite:i,setFavourite:n,isFavourite:t,clearFavourite:r}})();class Mu{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(t){this.Reset(),t&&(Array.isArray(t)?this.list=t:this.list=Xs(t),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(t=>t.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const dn=new Mu;function Iu(){const n=e.ref(!1),t=e.ref(!1);return{confirmLeave:n,saveButtonClick:t,beforeWindowUnload:s=>{n.value&&s.preventDefault()},formUpdated:()=>{n.value=!0},showConfirmModal:(s,a)=>{n.value&&!t.value?s():a()}}}const Ru=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{z.F.FTSP.Get().reset(),dn.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:o}=Iu(),i=s=>Xl.onBeforeRouteLeave((a,c,l)=>{o((s||r)(),l)}),r=s=>async()=>{t.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:i,submit:r}})();function Js(n,t){const o=[];if(n)for(let i=0;i<Math.ceil(n.length/t);i++)o[i]=n.slice(i*t,i*t+t);return o}class Wi{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","")}preSelect(){const t=Et.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select(0);return}const o=this.items.findIndex(i=>i.slug===t);o>-1&&this.Select(o)}static Create(t,o){const i=new Wi;return i.key=t,i.items=o,i.items.length&&i.preSelect(),i}Select(t){if(this.items.length){if(t===void 0)return this.preSelect();this.idx=t,Et.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 mi=class mi{static Format(t){let o=t;if(!o)t=o;else{(o[0]==="7"||o[0]==="8")&&o.length!==1&&(o=o.slice(1));const i=o.replace(/\+7|[^\d]/g,""),r=i.length;switch(!0){case r===0:t="";break;case(r===1&&o.length===1&&i==="7"):case(r===1&&o.length===1&&i==="8"):t="+7 (";break;case r<4:t=`+7 (${i}`;break;case r<7:t=`+7 (${i.slice(0,3)}) ${i.slice(3)}`;break;case r<9:t=`+7 (${i.slice(0,3)}) ${i.slice(3,6)}-${i.slice(6,8)}`;break;default:t=`+7 (${i.slice(0,3)}) ${i.slice(3,6)}-${i.slice(6,8)}-${i.slice(8,10)}`;break}}return t}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(mi,"validatePhone",(t,o,i)=>{mi.getPhoneRegExp().test(o)||!o?i():i(new Error("Пожалуйста, введите корректный номер телефона"))});let Gi=mi;class Au{static Count(t){const o=t.filter(s=>s.rating!==0);let i=0;o.forEach(s=>i=i+s.rating);const r=i/o.length;return isNaN(r)?0:Number((i/o.length).toFixed(2))}}class zu{static async Auth(t){t&&t()}static Dev(){}}class Du{constructor(){d(this,"startHour",9);d(this,"startHM",`${this.startHour}:00`);d(this,"endHour",19);d(this,"endHM",`${this.endHour}:00`);d(this,"timelinePxHeight",50);d(this,"timelineStep",Xn.FiveMinutes);d(this,"timelines",To[Xn.FiveMinutes])}periodIsCorrect(t,o){return ie.GtOrEq(t,this.startHM)&&ie.GtOrEq(this.endHM,o)}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=To[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(t,o,i,r){return r.filter(s=>s.id!==i).every(s=>!ie.PeriodsIntersects(t,o,s.startTime,s.endTime))}sortByStartTime(t){t.sort((o,i)=>ie.HMtoM(o.startTime)-ie.HMtoM(i.startTime))}}const Fu=-68;function Ou(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const o=document.querySelector(n),i=t??Fu;let r=0;o&&(r=o.getBoundingClientRect().top+i+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class Lu{static Sort(t){t.forEach((o,i)=>o.order=i)}}class Go{static Wait(t,o){return new Promise(i=>setTimeout(()=>i(o),t))}static WaitS(t,o){return Go.Wait(ie.S(t),o)}static WaitM(t,o){return Go.Wait(ie.M(t),o)}}const lo=n=>n===""||n===null||n===void 0||Array.isArray(n)&&n.length===0,_u=Object.freeze(Object.defineProperty({__proto__:null,Compose:(...n)=>t=>{for(const o of n){const i=o(t);if(i!==!0)return i}return!0},Email:(n="Некорректный email")=>t=>lo(t)||/^\S+@\S+\.\S+$/.test(String(t))?!0:n,MaxLen:(n,t=`Максимум ${n} символов`)=>o=>lo(o)||String(o).length<=n?!0:t,MinLen:(n,t=`Минимум ${n} символов`)=>o=>lo(o)||String(o).length>=n?!0:t,Regex:(n,t="Некорректное значение")=>o=>lo(o)||n.test(String(o))?!0:t,Required:(n="Обязательное поле")=>t=>lo(t)?n:!0},Symbol.toStringTag,{value:"Module"})),Hu=n=>new Promise(t=>{if(document.querySelector(n))return t(document.querySelector(n));const o=new MutationObserver(()=>{document.querySelector(n)&&(o.disconnect(),t(document.querySelector(n)))});o.observe(document.body,{childList:!0,subtree:!0})});class Qo{constructor(t){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");K.BuildClass(this,t)}static Create(t,o,i,r){const s=new Qo;return s.id=qt(),s.chatId=t,s.message=i,s.userName=r,s}static CreatePingMessage(){const t=new Qo;return t.type="ping",t.id=qt(),t}isMessage(){return this.type==="message"||this.type===""}}const Uu="";class vu{constructor(t="",o="",i="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);K.BuildClass(this,{endpoint:t,query:o,mutation:i}),this.connect(),this.ping()}send(t){!this.client||this.client.readyState!==1||this.client.send(t)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(Qo.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,Uu.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 qu=(re=class{},d(re,"Arrays",Dt),d(re,"Axios",ao),d(re,"BaseStore",Ve),d(re,"Cache",Wo),d(re,"Classes",K),d(re,"CarouselSwipe",yu),d(re,"Color",bu),d(re,"CreateSortModels",Xs),d(re,"Cursor",Cu),d(re,"DateMask",Vu),d(re,"Dates",jt),d(re,"Dragger",Tu),d(re,"Extension",Zs),d(re,"Favourite",Pu),d(re,"Hooks",Ru),d(re,"HttpClient",Be),d(re,"Id",Xe),d(re,"MakeCarousel",Js),d(re,"Period",Si),d(re,"PhoneService",Gi),d(re,"Rating",Au),d(re,"Router",Et),d(re,"RouterGuard",zu),d(re,"Scheduler",Du),d(re,"Scroll",Ou),d(re,"Sorter",Lu),d(re,"Static",Ei),d(re,"Strings",xe),d(re,"Time",ie),d(re,"Timer",Go),d(re,"Token",so),d(re,"Menus",Wi),d(re,"Validate",_u),d(re,"WaitElement",Hu),d(re,"WebSocketClient",vu),re);class ju{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(t){this.curPage=t}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Ks=new ju;var ea=(n=>(n.TableList="tableList",n.Default="",n))(ea||{}),Bt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Bt||{}),ta=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(ta||{}),na=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(na||{}),Qi=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Qi||{});const Wu=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:ea,Animations:Bt,CalendarScale:ta,LocalStoreKeys:ct,SocialTypes:na,ValueRelation:Qi},Symbol.toStringTag,{value:"Module"}));let Gu=class{async Login(t=Oe.Form.GetValues()){const o=await Be.Post({query:"auth/login",payload:t});if(!o)throw"Ошибка авторизации";Oe.Status.SetState(o)}async LoginAs(t){await Be.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=Oe.Form.GetValues()){const o=await Be.Post({query:"auth/register",payload:t});if(!o)throw o}async RestorePassword(t=Oe.Form.GetValues()){await Be.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=Oe.Form.GetValues()){t.id=Et.GetStringParam("userId"),await Be.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await Be.Post({query:"auth/refresh-token",payload:{refreshToken:so.getRefreshToken()}})}async CheckUuid(t){await Be.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await Be.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await Be.Get({query:`auth/email-is-confirm/${t}`})}};const Qu=new Gu;var Yu=Object.defineProperty,Yo=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Yu(t,o,r),r};const co=class vl{constructor(t){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new Po]);d(this,"phones",[]);d(this,"websites",[]);K.BuildClass(this,t)}addEmail(){const t=Zn.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=rn.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new vl;return t.id=Xe.UUID(),t}removeEmail(t){K.RemoveFromClassById(t,this.emails)}removePhone(t){K.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new Po)}addWebsite(){this.websites.push(new Bi)}pushFirst(){this.emails.length||this.emails.push(new Zn),this.phones.length||this.phones.push(new rn)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(t){this.description=t}updateTime(t){this.time=t}updateLatitude(t){this.latitude=t}updateLongitutde(t){this.longitude=t}};Yo([K.GetClassConstructor(Zn)],co.prototype,"emails"),Yo([K.GetClassConstructor(Po)],co.prototype,"postAddresses"),Yo([K.GetClassConstructor(rn)],co.prototype,"phones"),Yo([K.GetClassConstructor(Bi)],co.prototype,"websites");let Xu=co,Zu=class extends Ve{constructor(){super(Xu,"contacts")}};const Ju=new Zu;let Ku=class extends Ve{constructor(){super(Zn,"emails")}};const ef=new Ku;class Yi{constructor(t){d(this,"id");d(this,"ftsp");d(this,"name","");K.BuildClass(this,t)}static Create(t){const o=new Yi;return o.id=Xe.UUID(),o.ftsp=JSON.stringify(t),o}}let tf=class extends Ve{constructor(){super(Yi,"ftsp-presets")}};const nf=new tf;let of=class extends Ve{constructor(){super(rs,"humans")}};const rf=new of;let sf=class extends Ve{constructor(){super(rn,"phones")}};const af=new sf;class lf{constructor(t){d(this,"id");d(this,"nameRus","");K.BuildClass(this,t)}}var cf=Object.defineProperty,df=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&cf(t,o,r),r};class oa{constructor(t){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);K.BuildClass(this,t)}}df([K.GetClassConstructor(lf)],oa.prototype,"fields");let uf=class extends Ve{constructor(){super(oa,"schemas")}};const ff=new uf;class ia{constructor(t){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);K.BuildClass(this,t)}}class mf{constructor(t){d(this,"id");d(this,"name","");d(this,"label","");K.BuildClass(this,t)}}var hf=Object.defineProperty,ra=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&hf(t,o,r),r};class zn{constructor(t){d(this,"id");d(this,"key","");d(this,"label","");d(this,"order",0);d(this,"route","");d(this,"table","");d(this,"active",!0);d(this,"searchColumn","");d(this,"descriptionColumn","");d(this,"labelColumn","");d(this,"valueColumn","");d(this,"options",[]);d(this,"searchGroupMetaColumns",[]);K.BuildClass(this,t)}}ra([K.GetClassConstructor(ia)],zn.prototype,"options"),ra([K.GetClassConstructor(mf)],zn.prototype,"searchGroupMetaColumns");class Xi{constructor(t){d(this,"query","");d(this,"key","");d(this,"params","");d(this,"suggester",!1);d(this,"mustBeTranslated",!0);d(this,"options",[]);d(this,"searchGroupId","");d(this,"searchGroups",[]);d(this,"searchGroup",new zn);d(this,"searchObjects",[]);d(this,"pagination",new Ro);d(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(o=>new zn(o))),t.searchGroup&&(this.searchGroup=new zn(t.searchGroup)),t.options&&(this.options=t.options.map(o=>new ia(o))),this.count=t.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(t){const o=this.searchGroups.find(i=>i.id===t);o?this.searchGroup=o:this.searchGroup=new zn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Et.Route().query.groupId)}setQuery(){const t=Et.Route().query.query;t&&(this.query=t)}}let pf=class{constructor(){d(this,"isSearchDrawerOpen",e.ref(!1));d(this,"searchModel",e.reactive(new Xi));d(this,"searchGroups",e.reactive([]));d(this,"count",0)}async Search(t){const o=await Be.Get({query:`search?key=${t.key}&query=${t.query}`});o&&o.searchGroup&&o.searchGroup.options.forEach(i=>{t.searchObjects.push({id:i.id,value:i.value,label:i.label,description:i.description})})}async mainSearch(t){this.SetSearchModel(await Be.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(i=>{i.options=[]});const o=await Be.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(o),o}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new Xi}SetSearchModel(t){t&&(this.searchModel=new Xi(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Zi=new pf;let gf=class extends Ve{constructor(){super(Mo,"users-accounts")}};const yf=new gf;var We=(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))(We||{});class sa{constructor(t){d(this,"id");d(this,"name",We.String);d(this,"valueRelation",Qi.simple);K.BuildClass(this,t)}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===We.Radio)return"RadioProp";if(this.name===We.Set)return"SetProp";if(this.name===We.Number)return"NumberProp";if(this.name===We.String)return"StringProp"}}let wf=class extends Ve{constructor(){super(sa,"value-types")}};const bf=new wf;let aa=(at=class{},d(at,"Auth",Qu),d(at,"Contacts",Ju),d(at,"Emails",ef),d(at,"FileInfos",new Ve(xt,"file-infos")),d(at,"FTSPPresets",nf),d(at,"Humans",rf),d(at,"Phones",af),d(at,"Schemas",ff),d(at,"UserAccounts",yf),d(at,"ValueTypes",bf),d(at,"Search",Zi),at);var Wt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(Wt||{});let Cf=(Xt=class{},d(Xt,"Orders",dt),d(Xt,"Sizes",Wt),d(Xt,"Statuses",pe),d(Xt,"DataTypes",Re),d(Xt,"ValueTypes",We),d(Xt,"Operators",Ee),Xt);class Sf{constructor(){d(this,"title","");d(this,"buttons",[]);d(this,"editTitle",e.ref(!1));d(this,"showEdit",e.ref(!1))}Set(t="",o){typeof t=="function"?this.title=t():typeof t=="string"?this.title=t:this.title=t.value,this.buttons=o}}const kf=new Sf;class xf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(t){this.menu=t}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(t=>{var o;return xe.SearchIn(t.name,this.filterString)||((o=t.children)==null?void 0:o.some(i=>xe.SearchIn(i.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(t){this.path=t}GetPath(){return this.path}SetFilter(t){this.filterString=t}GetChildren(t){var o;return this.filterString?(o=t.children)==null?void 0:o.filter(i=>xe.SearchIn(i.name,this.filterString)):t.children}}const Ef=new xf;class Bf{constructor(){d(this,"Menu",e.reactive(Ef));d(this,"Head",e.reactive(kf))}}const Vf=new Bf,la="Да",ca="Нет";class Nf extends Vn{constructor(){super(...arguments);d(this,"confirmButtonText",la);d(this,"cancelButtonText",ca);d(this,"persistent",!0);d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(o){const i=typeof o=="string"?{text:o}:o;return this.confirmButtonText=i.confirmButtonText??la,this.cancelButtonText=i.cancelButtonText??ca,this.persistent=i.persistent??!0,super.showMessage(i,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof x.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=x.Dialog.create({title:this.title||void 0,message:this.text,html:Vn.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 o;return(o=this.resolve)==null?void 0:o.call(this,!0)})}Cancel(){this.Settle(()=>{var o;return(o=this.reject)==null?void 0:o.call(this)})}Settle(o){o==null||o(),this.resolve=void 0,this.reject=void 0}}const $f=new Nf;class Tf{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Pf extends Tf{Show(){super.show()}Hide(){super.hide()}}const Mf=new Pf;class Gt{}d(Gt,"Admin",Vf),d(Gt,"Dialog",$f),d(Gt,"Loading",Mf),d(Gt,"Notify",Nn),d(Gt,"Btn",on),d(Gt,"Input",Zr);class z{}d(z,"Auth",e.reactive(Oe)),d(z,"UI",e.reactive(Gt)),d(z,"Paginator",e.reactive(Ks)),d(z,"S",aa),d(z,"H",qu),d(z,"C",pc),d(z,"T",Cf),d(z,"I",Wu),d(z,"F",Cc);const uo=e.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 t=e.useAttrs(),o=e.computed(()=>{const i={};for(const r of Object.keys(t))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(i[r]=t[r]);return i});return(i,r)=>(e.openBlock(),e.createBlock(e.unref(x.QBadge),e.mergeProps(e.unref(o),{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:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},16,["label","color","text-color","outline","rounded","floating","multi-line","transparent"]))}}),ne=e.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:Wt.M,required:!1},type:{type:String,default:pe.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const t=n,o=e.useAttrs(),i=e.computed(()=>{const C={};for(const T of Object.keys(o))["disable","color","size","flat","outline","unelevated","type"].includes(T)||(C[T]=o[T]);return C}),r=["submit","button","reset"],s=e.computed(()=>r.includes(t.type)),a=e.computed(()=>s.value?t.type:void 0),c=e.computed(()=>s.value?pe.Primary:t.type),l=e.computed(()=>{const C={};return t.margin&&(C.margin=t.margin),t.padding&&(C.padding=t.padding),t.width&&(C.maxWidth=t.width,C.minWidth=t.width),t.height&&(C.minHeight=t.height,C.maxHeight=t.height),t.fontSize&&(C.fontSize=t.fontSize),C}),u={[pe.Primary]:"primary",[pe.Success]:"positive",[pe.Warning]:"warning",[pe.Error]:"negative",[pe.Info]:"info"},f=e.computed(()=>o.color!==void 0?o.color:u[c.value]??"primary"),m={[Wt.XS]:"xs",[Wt.S]:"sm",[Wt.M]:"md",[Wt.L]:"lg",[Wt.XL]:"xl"},p=e.computed(()=>o.size!==void 0?o.size:["xs","sm","md","lg","xl"].includes(t.size)?t.size:m[t.size]??"md"),k=e.computed(()=>o.flat!==void 0?o.flat:["text","pag","text_ano"].includes(t.skin)),E=e.computed(()=>o.outline!==void 0?o.outline:t.skin==="invert"),V=e.computed(()=>o.unelevated!==void 0?o.unelevated:t.skin==="base"),N=e.computed(()=>o.disable??t.disabled);return(C,T)=>(e.openBlock(),e.createBlock(e.unref(x.QBtn),e.mergeProps(e.unref(i),{style:e.unref(l),color:e.unref(f),size:e.unref(p),flat:e.unref(k),outline:e.unref(E),unelevated:e.unref(V),disable:e.unref(N),type:e.unref(a),"no-wrap":""}),{default:e.withCtx(()=>[e.renderSlot(C.$slots,"default"),e.createTextVNode(" "+e.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),If=["innerHTML"],Rf={key:1},Ji=D(e.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 t=n,o={color:t.color||void 0,fontSize:t.fontSize||void 0,fontWeight:t.fontWeight||void 0,background:t.background||void 0,padding:t.padding||void 0,width:t.width||void 0,maxWidth:t.width||void 0,minWidth:t.minWidth||void 0,margin:t.margin||void 0,justifyContent:t.justifyContent||void 0};return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["string",n.customClass]),style:o,onClick:r[0]||(r[0]=s=>i.$emit("click"))},[e.createVNode(e.unref(x.QItemLabel),null,{default:e.withCtx(()=>[n.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.string},null,8,If)):(e.openBlock(),e.createElementBlock("span",Rf,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),tt=D(e.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 t=n,o=e.useAttrs(),i=e.computed(()=>{const l={};for(const u of Object.keys(o))u!=="delay"&&(l[u]=o[u]);return l}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"top":"bottom"} ${l}`}),a=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"bottom":"top"} ${l}`}),c=e.computed(()=>({background:r[t.typeStyle],whiteSpace:"pre",height:t.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(l,u)=>n.tooltipText?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},e.unref(i),{class:"tooltip-wrapper"}),[e.renderSlot(l.$slots,"default",{},void 0,!0),e.createVNode(e.unref(x.QTooltip),{delay:n.timeout,anchor:e.unref(s),self:e.unref(a),class:"tooltip-box",style:e.normalizeStyle(e.unref(c))},{default:e.withCtx(()=>[e.createVNode(Ji,{string:n.tooltipText,padding:"0 3px",height:n.height},null,8,["string","height"])]),_:1},8,["delay","anchor","self","style"])],16)):(e.openBlock(),e.createBlock(e.unref(x.QTooltip),e.mergeProps({key:1},e.unref(i),{delay:n.timeout,class:"tooltip-box"}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),Vt={title:"Контактная информация",phonesTitle:"Телефоны",emailsTitle:"Электронная почта",addPhone:"Добавить телефон",addEmail:"Добавить email",noPhones:"Нет телефонных номеров",noEmails:"Нет email адресов",copied:"Скопировано в буфер обмена",copiedNumber:"Номер скопирован в буфер обмена",copiedEmail:"Email скопирован в буфер обмена",saved:"Сохранено",deleted:"Удалено",enterPhone:"Введите номер телефона",enterEmail:"Введите email адрес"},Ze=D(e.defineComponent({inheritAttrs:!1,__name:"PInput",props:e.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:e.mergeModels(["blur","input","focus","clear"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=o,r=e.useModel(n,"modelValue"),s=e.useAttrs(),a=e.computed(()=>typeof s.id=="string"?s.id:void 0),c=e.computed(()=>{const y={};for(const b of Object.keys(s))b!=="id"&&b!=="disable"&&(y[b]=s[b]);return y}),l=n,u=e.computed(()=>s.disable??l.disabled),f=e.ref(null);function m(){var y;(y=f.value)==null||y.focus()}function p(){var y;(y=f.value)==null||y.blur()}function k(){var y;(y=f.value)==null||y.select()}function E(){var y;return(y=f.value)==null?void 0:y.getNativeElement()}async function V(){var y;return await((y=f.value)==null?void 0:y.validate())??!0}function N(){var y;(y=f.value)==null||y.resetValidation()}t({focus:m,blur:p,select:k,getNativeElement:E,validate:V,resetValidation:N});const C=()=>{i("input",r.value)},T=e.computed(()=>{const y={};return l.margin&&(y.margin=l.margin),l.padding&&(y.padding=l.padding),l.width&&(y.width=l.width),l.borderColor&&(y["--p-border-color"]=l.borderColor),y});return(y,b)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=$=>r.value=$)},e.unref(c),{for:e.unref(a),label:n.label||void 0,mask:n.mask,disable:e.unref(u),rules:n.rules,"input-style":{color:n.color||void 0},style:e.unref(T),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":C,onBlur:b[1]||(b[1]=$=>y.$emit("blur",r.value)),onFocus:b[2]||(b[2]=$=>y.$emit("focus",r.value)),onClear:b[3]||(b[3]=$=>y.$emit("clear"))}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(y.$slots,"before",{},()=>[e.renderSlot(y.$slots,"default",{},void 0,!0)],!0)]),append:e.withCtx(()=>[e.renderSlot(y.$slots,"append",{},()=>[e.renderSlot(y.$slots,"right",{},void 0,!0)],!0)]),_:2},[y.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,y.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,y.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,y.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,y.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,y.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,y.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"loading",{},void 0,!0)]),key:"6"}:void 0]),1040,["modelValue","for","label","mask","disable","rules","input-style","style"]))}}),[["__scopeId","data-v-661f4aa7"]]),un=e.defineComponent({inheritAttrs:!1,__name:"PDialog",props:{modelValue:{type:Boolean,default:!1,required:!1},persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},emits:["update:modelValue"],setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.ref(i.modelValue);e.watch(()=>i.modelValue,p=>{s.value=p},{immediate:!0});const a=p=>{s.value=p,r("update:modelValue",p)};t({show:()=>a(!0),hide:()=>a(!1),toggle:()=>a(!s.value),opened:s});const f=e.useAttrs(),m=e.computed(()=>{const p={};for(const k of Object.keys(f))["modelValue","persistent","maximized","transition-show","transition-hide","onUpdate:modelValue"].includes(k)||(p[k]=f[k]);return p});return(p,k)=>(e.openBlock(),e.createBlock(e.unref(x.QDialog),e.mergeProps({modelValue:e.unref(s),"onUpdate:modelValue":k[0]||(k[0]=E=>e.isRef(s)?s.value=E:null)},e.unref(m),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide,"onUpdate:modelValue":a}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:2},[p.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"title")]),key:"0"}:void 0,p.$slots.header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"header")]),key:"1"}:void 0,p.$slots.body?{name:"body",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"body")]),key:"2"}:void 0,p.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),Af={class:"q-mb-md"},zf={class:"text-subtitle1 text-weight-medium text-grey-9"},Df={class:"text-caption text-grey-6 q-mt-xs"},fo=e.defineComponent({__name:"PContactFormDeleteDialog",props:e.mergeModels({title:{type:String,default:"Удалить элемент?"},subtitle:{type:String,default:"Это действие нельзя отменить."},loading:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["confirm"],["update:modelValue"]),setup(n){const t=x.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(un,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"340px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"column items-center q-pt-xl q-pb-sm text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",Af,[e.createVNode(e.unref(x.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",zf,e.toDisplayString(n.title),1),e.createElementVNode("div",Df,e.toDisplayString(n.subtitle),1)]),_:1}),e.createVNode(e.unref(x.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(ne,{unelevated:"",label:"Удалить",color:"negative",loading:n.loading,"no-caps":"",onClick:r[0]||(r[0]=s=>i.$emit("confirm"))},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Ff={class:"q-mr-md"},Of={class:"text-subtitle1 text-weight-medium text-grey-9"},mo=e.defineComponent({__name:"PContactFormEditDialog",props:e.mergeModels({icon:{type:String,default:"edit"},title:{type:String,default:"Редактирование"},saving:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["save"],["update:modelValue"]),setup(n){const t=x.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(un,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"380px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createElementVNode("div",Ff,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",Of,e.toDisplayString(n.title),1),e.createVNode(e.unref(x.QSpace)),e.withDirectives(e.createVNode(ne,{flat:"",round:"",dense:"",icon:"close",size:"sm",color:"grey-6"},null,512),[[e.unref(t)]])]),_:1}),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3}),e.createVNode(e.unref(x.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(ne,{unelevated:"",label:"Сохранить",color:"primary",loading:n.saving,"no-caps":"",onClick:r[0]||(r[0]=s=>i.$emit("save"))},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["modelValue"]))}}),Lf={class:"q-mt-sm"},_f={class:"row items-center justify-between q-mb-xs q-px-xs"},Hf={class:"row items-center q-gutter-xs"},Uf={class:"text-uppercase text-caption text-weight-medium text-grey-7"},vf={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},qf={style:{"min-width":"0"}},jf={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},Wf={key:0,class:"text-caption text-grey-6 ellipsis"},Gf={class:"row items-center no-wrap q-gutter-xs"},Qf={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},Yf={class:"text-body2 text-grey-7"},fn=D(e.defineComponent({__name:"PContactFormViewEmails",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.emails(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),p=e.ref(!1),k=e.ref(-1),E=async b=>{b&&(await navigator.clipboard.writeText(b),z.UI.Notify.Success(o.value.copiedEmail))},V=b=>{var $,R;s.value=b,a.value=i.value[b],c.value=t.adapter.emailValue(i.value[b]),l.value=((R=($=t.adapter).emailDescription)==null?void 0:R.call($,i.value[b]))??"",r.value=!0},N=async()=>{if(!a.value||!c.value){z.UI.Notify.Warning(o.value.enterEmail);return}u.value=!0;try{Object.assign(a.value,{...a.value,email:c.value,description:l.value}),await t.adapter.updateEmail(a.value),r.value=!1,z.UI.Notify.Success(o.value.saved)}catch{z.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},C=async()=>{f.value=!0;try{await t.adapter.addEmail(t.contact),V(i.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},T=b=>{k.value=b,p.value=!0},y=async()=>{var b,$;m.value=!0;try{const R=i.value[k.value];await t.adapter.removeEmail(($=(b=t.adapter).emailId)==null?void 0:$.call(b,R)),i.value.splice(k.value,1),p.value=!1,z.UI.Notify.Success(o.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(b,$)=>(e.openBlock(),e.createElementBlock("div",Lf,[e.createElementVNode("div",_f,[e.createElementVNode("div",Hf,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",Uf,e.toDisplayString(e.unref(o).emailsTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(uo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ne,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:C},null,8,["loading"])]),e.unref(i).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(R,j)=>{var se,ze,Te,Ne,Je,pt;return e.openBlock(),e.createElementBlock("div",{key:((ze=(se=n.adapter).emailId)==null?void 0:ze.call(se,R))??j,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",b.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",vf,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",qf,[e.createElementVNode("div",jf,e.toDisplayString(n.adapter.emailValue(R)),1),(Ne=(Te=n.adapter).emailDescription)!=null&&Ne.call(Te,R)?(e.openBlock(),e.createElementBlock("div",Wf,e.toDisplayString((pt=(Je=n.adapter).emailDescription)==null?void 0:pt.call(Je,R)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Gf,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:ye=>E(n.adapter.emailValue(R))},{default:e.withCtx(()=>[e.createVNode(tt,null,{default:e.withCtx(()=>[...$[4]||($[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ne,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:ye=>V(j)},{default:e.withCtx(()=>[e.createVNode(tt,null,{default:e.withCtx(()=>[...$[5]||($[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),j>=n.presetted?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:ye=>T(j)},{default:e.withCtx(()=>[e.createVNode(tt,null,{default:e.withCtx(()=>[...$[6]||($[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",Qf,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",Yf,e.toDisplayString(e.unref(o).noEmails),1),$[7]||($[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать email",-1)),e.createVNode(ne,{icon:"add",label:"Добавить email",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:C},null,8,["loading"])])),e.createVNode(mo,{modelValue:e.unref(r),"onUpdate:modelValue":$[2]||($[2]=R=>e.isRef(r)?r.value=R:null),icon:"email",title:"Редактирование email",saving:e.unref(u),onSave:N},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Ze,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":$[0]||($[0]=R=>e.isRef(c)?c.value=R:null),dense:"",autofocus:"",label:"Email адрес",type:"email",class:"q-mb-md",rules:[R=>!!R||e.unref(o).enterEmail,R=>!R||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(R)||"Некорректный email"],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"email",color:"primary"})]),_:1},8,["modelValue","rules"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(Ze,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":$[1]||($[1]=R=>e.isRef(l)?l.value=R:null),dense:"",label:"Описание (например: Рабочая, Личная)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(fo,{modelValue:e.unref(p),"onUpdate:modelValue":$[3]||($[3]=R=>e.isRef(p)?p.value=R:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:y},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),Xf={class:"q-mt-sm"},Zf={class:"row items-center justify-between q-mb-xs q-px-xs"},Jf={class:"row items-center q-gutter-xs"},Kf={class:"text-uppercase text-caption text-weight-medium text-grey-7"},em={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},tm={style:{"min-width":"0"}},nm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},om={key:0,class:"text-caption text-grey-6 ellipsis"},im={class:"row items-center no-wrap q-gutter-xs"},rm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},sm={class:"text-body2 text-grey-7"},mn=D(e.defineComponent({__name:"PContactFormViewPhones",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),p=e.ref(!1),k=e.ref(-1),E=async b=>{b&&(await navigator.clipboard.writeText(b),z.UI.Notify.Success(o.value.copiedNumber))},V=b=>{var $,R;s.value=b,a.value=i.value[b],c.value=t.adapter.phoneNumber(i.value[b]),l.value=((R=($=t.adapter).phoneDescription)==null?void 0:R.call($,i.value[b]))??"",r.value=!0},N=async()=>{if(!a.value||!c.value){z.UI.Notify.Warning(o.value.enterPhone);return}u.value=!0;try{Object.assign(a.value,{...a.value,number:c.value,description:l.value}),await t.adapter.updatePhone(a.value),r.value=!1,z.UI.Notify.Success(o.value.saved)}catch{z.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},C=async()=>{f.value=!0;try{await t.adapter.addPhone(t.contact),V(i.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},T=b=>{k.value=b,p.value=!0},y=async()=>{var b,$;m.value=!0;try{const R=i.value[k.value];await t.adapter.removePhone(($=(b=t.adapter).phoneId)==null?void 0:$.call(b,R)),i.value.splice(k.value,1),p.value=!1,z.UI.Notify.Success(o.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(b,$)=>(e.openBlock(),e.createElementBlock("div",Xf,[e.createElementVNode("div",Zf,[e.createElementVNode("div",Jf,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",Kf,e.toDisplayString(e.unref(o).phonesTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(uo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ne,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:C},null,8,["loading"])]),e.unref(i).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(R,j)=>{var se,ze,Te,Ne,Je,pt;return e.openBlock(),e.createElementBlock("div",{key:((ze=(se=n.adapter).phoneId)==null?void 0:ze.call(se,R))??j,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",b.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",em,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",tm,[e.createElementVNode("div",nm,e.toDisplayString(n.adapter.phoneNumber(R)),1),(Ne=(Te=n.adapter).phoneDescription)!=null&&Ne.call(Te,R)?(e.openBlock(),e.createElementBlock("div",om,e.toDisplayString((pt=(Je=n.adapter).phoneDescription)==null?void 0:pt.call(Je,R)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",im,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:ye=>E(n.adapter.phoneNumber(R))},{default:e.withCtx(()=>[e.createVNode(tt,null,{default:e.withCtx(()=>[...$[4]||($[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ne,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:ye=>V(j)},{default:e.withCtx(()=>[e.createVNode(tt,null,{default:e.withCtx(()=>[...$[5]||($[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),j>=n.presetted?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:ye=>T(j)},{default:e.withCtx(()=>[e.createVNode(tt,null,{default:e.withCtx(()=>[...$[6]||($[6]=[e.createTextVNode("Удалить номер",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",rm,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",sm,e.toDisplayString(e.unref(o).noPhones),1),$[7]||($[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать номер",-1)),e.createVNode(ne,{icon:"add",label:"Добавить телефон",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:C},null,8,["loading"])])),e.createVNode(mo,{modelValue:e.unref(r),"onUpdate:modelValue":$[2]||($[2]=R=>e.isRef(r)?r.value=R:null),icon:"phone",title:"Редактирование телефона",saving:e.unref(u),onSave:N},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Ze,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":$[0]||($[0]=R=>e.isRef(c)?c.value=R:null),mask:n.adapter.phoneMask(e.unref(a)),dense:"",autofocus:"",label:"Номер телефона",class:"q-mb-md",rules:[R=>!!R||e.unref(o).enterPhone],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"phone",color:"primary"})]),_:1},8,["modelValue","mask","rules"])):e.createCommentVNode("",!0),e.unref(a)&&e.unref(s)>=n.presetted?(e.openBlock(),e.createBlock(Ze,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":$[1]||($[1]=R=>e.isRef(l)?l.value=R:null),dense:"",label:"Описание (например: Рабочий, Личный)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(fo,{modelValue:e.unref(p),"onUpdate:modelValue":$[3]||($[3]=R=>e.isRef(p)?p.value=R:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:y},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),am={class:"row items-center q-gutter-sm"},lm={class:"text-weight-medium text-grey-9"},cm=e.defineComponent({__name:"PContactForm",props:{contact:{},adapter:{},title:{default:Vt.title},phonesPresetted:{default:3},emailsPresetted:{default:2},margin:{default:"0"},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.computed(()=>t.adapter.emails(t.contact)),s=e.computed(()=>t.adapter.copyAll(t.contact)),a=e.ref(!1),c=()=>{a.value=!a.value},l=async()=>{const u=s.value;u&&(await navigator.clipboard.writeText(u),z.UI.Notify.Success(o.value.copied))};return(u,f)=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{flat:"",bordered:"",class:"contact-form-card",style:e.normalizeStyle({margin:n.margin})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"row items-center cursor-pointer q-py-sm q-px-md bg-grey-1",onClick:c},[e.createElementVNode("div",am,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:e.unref(a)?"keyboard_arrow_right":"keyboard_arrow_down",size:"sm",color:"grey-6"},null,8,["icon"]),e.createVNode(e.unref(x.QIcon),{name:"contact_phone",size:"18px",color:"primary"}),e.createElementVNode("span",lm,e.toDisplayString(n.title),1),e.unref(i).length+e.unref(r).length>0?(e.openBlock(),e.createBlock(uo,{key:0,outline:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length+e.unref(r).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(x.QSpace)),e.createElementVNode("div",{class:"row items-center q-gutter-xs",onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"]))},[e.unref(s)?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",dense:"",round:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:l},{default:e.withCtx(()=>[e.createVNode(tt,null,{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("Скопировать все контакты",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(x.QSlideTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createVNode(e.unref(x.QSeparator)),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-xs q-pb-md q-px-md"},{default:e.withCtx(()=>[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"]),e.createVNode(e.unref(x.QSeparator),{class:"q-my-sm"}),e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"])]),_:1})],512),[[e.vShow,!e.unref(a)]])]),_:1})]),_:1},8,["style"]))}}),Ki=D(cm,[["__scopeId","data-v-327b9235"]]),dm={class:"contact-edit-wrapper"},er=D(e.defineComponent({__name:"PContactFormEdit",props:{contact:{},adapter:{},phonesPresetted:{default:3},emailsPresetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",dm,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"]),i[0]||(i[0]=e.createElementVNode("div",{class:"edit-sections-divider"},null,-1)),e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-8548f1de"]]),um={class:"edit-emails-wrapper"},tr=D(e.defineComponent({__name:"PContactFormEditEmails",props:{contact:{},adapter:{},presetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",um,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-2f0b3c6b"]]),fm={class:"edit-phones-wrapper"},nr=D(e.defineComponent({__name:"PContactFormEditPhones",props:{contact:{},adapter:{},presetted:{default:3},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",fm,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-59e80623"]]),mm={class:"contact-view-wrapper"},or=D(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",mm,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"]),i[0]||(i[0]=e.createElementVNode("div",{class:"view-sections-divider"},null,-1)),e.createVNode(fn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"])]))}}),[["__scopeId","data-v-f1271bd5"]]);function da(n){n.component("PContactForm",Ki),n.component("PContactFormDeleteDialog",fo),n.component("PContactFormEdit",er),n.component("PContactFormEditDialog",mo),n.component("PContactFormEditEmails",tr),n.component("PContactFormEditPhones",nr),n.component("PContactFormView",or),n.component("PContactFormViewEmails",fn),n.component("PContactFormViewPhones",mn)}const hm=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:Ki,PContactFormDeleteDialog:fo,PContactFormEdit:er,PContactFormEditDialog:mo,PContactFormEditEmails:tr,PContactFormEditPhones:nr,PContactFormView:or,PContactFormViewEmails:fn,PContactFormViewPhones:mn,default:da,defaultContactsLabels:Vt},Symbol.toStringTag,{value:"Module"}));class hn{constructor(t){d(this,"id");d(this,"name","");d(this,"score",0);d(this,"order",0);d(this,"showMoreQuestions",!1);d(this,"showOther",!1);d(this,"fieldId");d(this,"isMatrixY",!1);z.H.Classes.BuildClass(this,t)}static Create(t){const o=new hn;return o.id=z.H.Id.UUID(),o.fieldId=t,o}}class ua{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");z.H.Classes.BuildClass(this,t)}}class ir{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);z.H.Classes.BuildClass(this,t)}}class Dn{constructor(t){d(this,"id");d(this,"name","");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Dn;return o.id=z.H.Id.UUID(),o.fieldId=t,o}}var pm=Object.defineProperty,ho=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&pm(t,o,r),r};const pn=class yi{constructor(t){d(this,"id");d(this,"name","");d(this,"code","");d(this,"valueTypeId");d(this,"order",0);d(this,"ageCompare",!1);d(this,"answerVariants",[]);d(this,"answerVariantsForDelete",[]);d(this,"fieldExamples",[]);d(this,"fieldVariants",[]);d(this,"valueType",new sa);d(this,"fieldMeasures",[]);d(this,"showSet",!1);d(this,"showRadio",!1);d(this,"isEdit",!1);d(this,"children",[]);d(this,"parentId");d(this,"formSectionId");d(this,"selected",!1);z.H.Classes.BuildClass(this,t),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(t=>!t.isMatrixY)}getMatrixY(){return this.answerVariants.filter(t=>t.isMatrixY)}static Create(t){const o=new yi;return o.id=z.H.Id.UUID(),o.formSectionId=t,o}getRegisterPropertyRadioOriginalValue(t){const o=this.answerVariants.find(i=>i.id===t);return o?o.name:""}addRadioItem(t){const o=new hn(t);o.order=this.answerVariants.length,this.answerVariants.push(o)}removeRadioItem(t){const o=this.answerVariants[t].id;o&&this.answerVariantsForDelete.push(o),this.answerVariants.splice(t,1)}changeRelation(t){const o=t.find(i=>i.id===this.valueTypeId);if(o){if(o.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(o.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=o}}editRegisterProperty(t){this.isEdit=t??!this.isEdit}sortExamples(){this.fieldExamples.forEach((t,o)=>t.order=o)}addRegisterPropertyMeasure(t){this.fieldMeasures.push(new ir(t))}addRegisterPropertyVariant(){this.fieldVariants.push(new Dn)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(t){this.valueType=t,this.valueTypeId=t.id}setName(t){this.name=t}addAnswerVariant(){const t=hn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=yi.Create();return t.parentId=this.id,t.name="Вопрос",t.order=this.children.length,this.children.push(t),t}addFieldVariant(){const t=Dn.Create(this.id);return this.fieldVariants.push(t),t}copy(){const t=new yi(this);return t.id=z.H.Id.UUID(),t.answerVariants.forEach(o=>{o.id=z.H.Id.UUID(),o.fieldId=t.id}),t.children=t.children.map(o=>{const i=o.copy();return i.parentId=t.id,i}),t}};ho([z.H.Classes.GetClassConstructor(hn)],pn.prototype,"answerVariants"),ho([z.H.Classes.GetClassConstructor(ua)],pn.prototype,"fieldExamples"),ho([z.H.Classes.GetClassConstructor(Dn)],pn.prototype,"fieldVariants"),ho([z.H.Classes.GetClassConstructor(ir)],pn.prototype,"fieldMeasures"),ho([z.H.Classes.GetClassConstructor(pn)],pn.prototype,"children");let Xo=pn;class rr{constructor(t){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new xt);z.H.Classes.BuildClass(this,t)}}class gn{constructor(t){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");z.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new gn;return i.id=qt(),i.fieldFillId=t,i.answerVariantId=o,i}static GetClassName(){return"selectedAnswerVariant"}}var gm=Object.defineProperty,fa=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&gm(t,o,r),r};const sr=class Yr{constructor(t){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new xt);d(this,"fileInfoId");d(this,"order",0);d(this,"selectedAnswerVariants",[]);d(this,"patientId");d(this,"fieldId");d(this,"formFillId");d(this,"answerVariantId");d(this,"filled",!1);d(this,"researchResultId");d(this,"answerFiles",[]);d(this,"answerFilesForDelete",[]);z.H.Classes.BuildClass(this,t)}setFilled(t){this.filled=t}static Create(t,o){const i=new Yr;return i.id=qt(),i.fieldId=t.id,i.formFillId=o,i.order=t.order,i.valueNumber=0,i.valueString="",i.valueDate=new Date,i}setString(t){this.valueString=t,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(t){this.valueNumber=t,this.valueNumber&&(this.filled=!0)}setOther(t){this.valueOther=t,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(t){this.valueDate=t,this.filled=!0}setRadio(t){this.answerVariantId=t,this.filled=!!this.answerVariantId}static CreateMany(t,o){return t.map(i=>Yr.Create(i,o))}addFile(){const t=new rr;return t.id=qt(),t.answerId=this.id,this.answerFiles.push(t),t}getFileInfos(){const t=[];return this.answerFiles.forEach(o=>t.push(o.fileInfo)),t}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(t,o){const i=gn.Create(this.id,t);return i.answerVariantIdY=o,this.selectedAnswerVariants.push(i),this.filled=!0,i}getMatrixValue(t,o){return this.selectedAnswerVariants.find(i=>i.answerVariantId===t&&i.answerVariantIdY===o)}addSelectedAnswerVariant(t){const o=gn.Create(this.id,t);return this.selectedAnswerVariants.push(o),this.filled=!0,o}static GetClassName(){return"answer"}showOther(t){const o=t.find(i=>i.showOther);return o?this.answerVariantId===o.id||this.selectedAnswerVariants.some(i=>i.answerVariantId===o.id):!1}};fa([z.H.Classes.GetClassConstructor(gn)],sr.prototype,"selectedAnswerVariants"),fa([z.H.Classes.GetClassConstructor(rr)],sr.prototype,"answerFiles");let Fn=sr;class ym{constructor(t){d(this,"id");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var wm=Object.defineProperty,bm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&wm(t,o,r),r};const ma=class ql{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(t){return`${this.getN()}.${t+1}`}getSubFieldN(t,o){return`${this.getFieldN(t)}.${o+1}`}static Create(t){const o=new ql;return o.id=z.H.Id.UUID(),o.formId=t,o}addField(){const t=Xo.Create(this.id);return this.fields.push(t),this.sortFields(),t}sortFields(){this.fields.forEach((t,o)=>t.order=o)}getAnswerVariants(){const t=[];return this.fields.forEach(o=>t.push(...o.answerVariants)),t}};bm([z.H.Classes.GetClassConstructor(Xo)],ma.prototype,"fields");let Zo=ma;var Cm=Object.defineProperty,Sm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Cm(t,o,r),r};const ha=class jl{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"isLaboratory",!1);d(this,"formSections",[]);d(this,"isEdit",!1);d(this,"withDates",!1);d(this,"withScores",!1);d(this,"selectedForExport",!1);d(this,"filterString","");d(this,"showOnlyNotFilled",!1);d(this,"showOnlyFilled",!1);z.H.Classes.BuildClass(this,t)}static GetClassName(){return"Form"}static Create(){const t=new jl;return t.id=z.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=Zo.Create(this.id);return this.formSections.push(t),z.H.Sorter.Sort(this.formSections),t}getFields(){const t=this.formSections.map(i=>i.fields).flat(),o=t.map(i=>i.children).flat();return t.concat(o).filter(i=>i.children.length===0)}};Sm([z.H.Classes.GetClassConstructor(Zo)],ha.prototype,"formSections");let pa=ha;var km=Object.defineProperty,xm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&km(t,o,r),r};const ga=class Wl{constructor(t){d(this,"id");d(this,"date",new Date);d(this,"editMode",!1);d(this,"userFormId");d(this,"fillingPercentage",0);d(this,"fieldFills",[]);d(this,"num","");d(this,"formId");z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Wl;return o.id=z.H.Id.UUID(),o.formId=t.id,o.fieldFills.push(...Fn.CreateMany(t.getFields(),o.id)),o}addFieldFill(t){this.fieldFills.push(t)}getFieldFill(t){var o;return(o=this.fieldFills)==null?void 0:o.find(i=>i.fieldId===t)}pushRegisterProperty(t){const o=new Fn;o.researchResultId=t,this.fieldFills.push(o)}getRegisterPropertyToPatient(t){return this.fieldFills.filter(o=>o.researchResultId===t)}getOrCreateFieldFill(t){let o=this.getFieldFill(t.id);return o||(o=Fn.Create(t),this.addFieldFill(o)),o}getFileInfos(){const t=[];return this.fieldFills.forEach(o=>t.push(...o.getFileInfos())),t}calculateFilling(){const t=this.fieldFills.filter(i=>i.filled).length,o=this.fieldFills.length;this.fillingPercentage=Math.round(t/o*100)}getFieldFillByFieldId(t){return this.fieldFills.find(o=>o.fieldId===t)}getFieldVariantFieldFill(t){return this.fieldFills.find(o=>o.answerVariantId===t)}getFieldsFieldFillsMap(t){const o={};return t.forEach(i=>{var r;if(i.code){const s=(r=this.getFieldFillByFieldId(i.id))==null?void 0:r.valueNumber;o[i.code]=s}}),o}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};xm([z.H.Classes.GetClassConstructor(Fn)],ga.prototype,"fieldFills");let ya=ga;const Em=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:hn,Field:Xo,FieldExample:ua,FieldFill:Fn,FieldFillFile:rr,FieldFilter:ym,FieldMeasure:ir,FieldVariant:Dn,Form:pa,FormFill:ya,FormSection:Zo,SelectedAnswerVariant:gn},Symbol.toStringTag,{value:"Module"}));let Bm=class extends Ve{constructor(){super(hn,"answer-variants")}};const Vm=new Bm;let Nm=class extends Ve{constructor(){super(Fn,"field-fills")}};const $m=new Nm;let Tm=class extends Ve{constructor(){super(Xo,"fields")}};const Pm=new Tm;let Mm=class extends Ve{constructor(){super(ya,"form-fills")}};const Im=new Mm;let Rm=class extends Ve{constructor(){super(Zo,"form-sections")}};const Am=new Rm;let zm=class extends Ve{constructor(){super(pa,"forms")}};const Dm=new zm;let Fm=class extends Ve{constructor(){super(gn,"selected-answer-variants")}};const Om=new Fm,Lm=Object.freeze(Object.defineProperty({__proto__:null,C:Em,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:Vm,FieldFills:$m,Fields:Pm,FormFills:Im,FormSections:Am,Forms:Dm,SelectedAnswerVariants:Om},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Jo{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"selected",!1);d(this,"hide",!1);d(this,"editMode",!1);d(this,"color","");d(this,"background","");d(this,"order",0);d(this,"menuId");d(this,"iconId");d(this,"icon",new xt);d(this,"iconName","");d(this,"svgCode","");K.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=Xe.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var _m=Object.defineProperty,Hm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&_m(t,o,r),r};class ar{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"top",!0);d(this,"side",!0);d(this,"show",!1);d(this,"hide",!1);d(this,"active",!1);d(this,"order",0);d(this,"selected",!1);d(this,"editMode",!1);d(this,"subMenus",[]);d(this,"subMenusForDelete",[]);d(this,"iconId");d(this,"icon",new xt);K.BuildClass(this,t)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const t=[];return t.push(this.icon),this.subMenus.forEach(o=>{t.push(o.icon)}),t}addFile(t){this.icon.id||(this.icon.id=Xe.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new Jo)}removeSubMenu(t){const o=this.subMenus[t].id;o&&this.subMenusForDelete.push(o),this.subMenus.splice(t,1)}setColorsForSubMenus(){const t=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let o=0;this.subMenus.forEach(i=>{i.color=t[o],o=t.length-1?o=0:o++})}containPath(t){return this.link===t||!!this.subMenus.find(o=>o.link===t)}static GetClassName(){return"menu"}}Hm([K.GetClassConstructor(Jo)],ar.prototype,"subMenus");const Um=Object.freeze(Object.defineProperty({__proto__:null,Menu:ar,SubMenu:Jo},Symbol.toStringTag,{value:"Module"}));let vm=class extends z.H.BaseStore{constructor(){super(ar,"menus")}};const qm=new vm;let jm=class extends z.H.BaseStore{constructor(){super(Jo,"sub-menus")}};const Wm=new jm,Gm=Object.freeze(Object.defineProperty({__proto__:null,C:Um,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:qm,SubMenus:Wm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ft{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"sessionId");d(this,"payload",{});z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Ft;return o.id=z.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}}var Qm=Object.defineProperty,Ym=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Qm(t,o,r),r};const wa=class Gl{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"slots",[]);z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Gl;return o.id=z.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}};Ym([z.H.Classes.GetClassConstructor(Ft)],wa.prototype,"slots");let On=wa;var Xm=Object.defineProperty,ba=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Xm(t,o,r),r};const lr=class Ql{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"scheduleDayId");d(this,"placeId");d(this,"sessions",[]);d(this,"slots",[]);z.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new Ql;return i.id=z.H.Id.UUID(),i.placeId=t,i.scheduleDayId=o,i}addSession(){const t=On.Create(this.id);return this.sessions.push(t),t}addSlot(){const t=Ft.Create(this.id);return this.slots.push(t),t}};ba([z.H.Classes.GetClassConstructor(On)],lr.prototype,"sessions"),ba([z.H.Classes.GetClassConstructor(Ft)],lr.prototype,"slots");let po=lr;var Zm=Object.defineProperty,Jm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Zm(t,o,r),r};const Ca=class Yl{constructor(t){d(this,"id");d(this,"date",new Date(0));d(this,"description","");d(this,"ownerId");d(this,"ownerType","");d(this,"schedules",[]);z.H.Classes.BuildClass(this,t)}static Create(t,o,i=new Date){const r=new Yl;return r.id=z.H.Id.UUID(),r.ownerId=t,r.ownerType=o||"",r.date=i,r}};Jm([z.H.Classes.GetClassConstructor(po)],Ca.prototype,"schedules");let Ko=Ca;class Ln{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"color","");z.H.Classes.BuildClass(this,t)}static Create(){const t=new Ln;return t.id=z.H.Id.UUID(),t}}const Km=Object.freeze(Object.defineProperty({__proto__:null,Schedule:po,ScheduleDay:Ko,SchedulePlace:Ln,ScheduleSession:On,ScheduleSlot:Ft},Symbol.toStringTag,{value:"Module"})),ce=n=>n?z.H.Time.HMtoM(n):NaN,Ge=n=>z.H.Time.ConcatHM(Math.floor(n/60),n%60),yn=n=>{if(!n)return"";const t=z.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},_n=(n,t)=>z.H.Time.DiffM(n,t),wt=(n,t)=>z.H.Time.AddMtoHM(n,t),cr=(n,t)=>{const o=ce(n.startTime),i=ce(t.startTime);return isFinite(o)?isFinite(i)?o-i:-1:1},go=(n,t)=>{const o=ce(n.startTime),i=ce(n.endTime),r=ce(t.startTime),s=ce(t.endTime);return!isFinite(o)||!isFinite(i)||!isFinite(r)||!isFinite(s)?!1:o<s&&r<i},yo=(n,t)=>Math.round(n/t)*t,Sa=(n,t=8*60,o=20*60)=>{let i=t,r=o;for(const{item:c}of n){const l=ce(c.startTime),u=ce(c.endTime);isFinite(l)&&(i=Math.min(i,l)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(i/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},ka=(n,t)=>{const o=ce(n.item.startTime),i=ce(n.item.endTime);if(!isFinite(o)||!isFinite(i))return{top:"0%",height:"48px"};const r=(o-t.start)/t.total*100,s=Math.max((i-o)/t.total*100,2.5);return{top:r+"%",height:s+"%"}},xa=(n,t)=>{const o=ce(n.startTime),i=ce(n.endTime);if(!isFinite(o)||!isFinite(i)||i<=o)return{top:"0%",height:"auto"};const r=i-o,s=ce(t.startTime),a=ce(t.endTime),c=isFinite(s)?Math.max((s-o)/r*100,0):0;let l=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return l=Math.min(Math.max(l,3),100-c),{top:c+"%",height:l+"%"}},Ea=(n,t,o)=>n.some(i=>i.item.id===t.item.id||t.kind==="session"&&i.kind==="slot"&&i.item.sessionId===t.item.id?!1:o(t.item,i.item)),Ba=(n,t,o)=>n.some(i=>i.id!==t.id&&o(t,i)),Va=(n,t,o,i)=>{if(!(!isFinite(t)||!isFinite(o)||o<=t))return(n||[]).find(r=>{const s=i(r.startTime),a=i(r.endTime);return isFinite(s)&&isFinite(a)&&t>=s&&o<=a})},Na=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",dr={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:"пересечение"},$a={createDay(n){return Ko.Create(void 0,void 0,n)},createSchedule(n,t){return po.Create(n,t)},createSession(n){const t=(n==null?void 0:n.sessions)||[],o=t[t.length-1],i=(o==null?void 0:o.endTime)||"9:00",r=On.Create(n==null?void 0:n.id);return r.startTime=i,r.endTime=z.H.Time.AddMtoHM(i,30),r},createSlot(n){return Ft.Create(n==null?void 0:n.id)},createPlace(n){const t=Ln.Create();return t.name=n||"",t}},eh={class:"schedule-admin"},th={key:0,class:"no-days text-center text-grey q-py-xl"},nh={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},oh={key:5,class:"row items-center q-gutter-xs zoom-control"},ih={key:0,class:"grid-view"},rh={key:0,class:"text-grey text-center q-py-lg"},sh={class:"grid-header"},ah={class:"row items-center justify-center q-gutter-xs"},lh={class:"ellipsis"},ch={class:"time-gutter"},dh=["data-schedule-id","onDblclick","onContextmenu"],uh=["title","onPointerdown","onClick","onContextmenu"],fh={class:"block-content"},mh={class:"block-time"},hh={class:"block-name ellipsis"},ph={key:0,class:"block-speakers ellipsis"},gh={key:0,class:"session-perfoms"},yh=["title","onPointerdown","onClick","onContextmenu"],wh={class:"nested-time"},bh={class:"nested-name ellipsis"},Ch={key:0,class:"nested-speakers ellipsis"},Sh=["title","onPointerdown"],kh={class:"block-actions"},xh=["title","onPointerdown"],Eh=["title"],Bh={class:"session-spine-name"},Vh={class:"block-time"},Nh={key:0,class:"session-badge"},$h={key:1,class:"conflict-badge"},Th={class:"block-name ellipsis"},Ph={class:"text-caption text-grey-6 q-pa-xs"},Mh={key:1,class:"list-view"},Ih={class:"row items-center q-gutter-sm"},Rh={class:"text-subtitle2"},Ah={key:0,class:"sub-block"},zh={class:"sub-title"},Dh={class:"list-row session-row"},Fh={key:0,class:"nested-list"},Oh={class:"col-4 ellipsis"},Lh={class:"time-text"},_h={class:"sub-block"},Hh={class:"sub-title"},Uh={class:"list-row slot-row"},vh={key:0,class:"text-grey text-center q-py-sm"},qh={class:"text-caption text-grey-6 q-mb-sm"},jh={class:"text-h6"},Wh={class:"row items-center q-gutter-sm q-mb-md"},Gh={key:0,class:"text-grey text-center q-py-md"},Qh={class:"col ellipsis"},Yh={class:"text-h6"},Xh={class:"row q-col-gutter-sm q-mb-sm"},Zh={class:"col-6"},Jh={class:"col-6"},Kh=["onClick"],wn=15,Ta=6,Pa=D(e.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},sessionsEnabled:{type:Boolean,default:!0},daysEnabled:{type:Boolean,default:!0},placesEnabled:{type:Boolean,default:!0}},setup(n){var Fl,Ol;const t=n,o=e.computed(()=>t.sessionsEnabled!==!1),i=e.computed(()=>t.daysEnabled!==!1),r=e.computed(()=>t.placesEnabled!==!1),s=e.computed(()=>({...dr,duplicate:"Дублировать",...t.labels})),a=e.computed(()=>({...$a,...t.factories})),c=h=>t.slotListOf?t.slotListOf(h):(h==null?void 0:h.slots)||[],l=h=>t.nestedSlotListOf?t.nestedSlotListOf(h):(h==null?void 0:h.slots)||[],u=h=>(h==null?void 0:h.name)||s.value.hall,f=h=>t.sessionName?t.sessionName(h):(h==null?void 0:h.name)||`${s.value.session} ${(h==null?void 0:h.startTime)||""}–${(h==null?void 0:h.endTime)||""}`.trim(),m=h=>t.slotName?t.slotName(h):(h==null?void 0:h.name)||s.value.slot,p=h=>t.slotSubtitle?t.slotSubtitle(h):"",k=e.ref("grid"),E=e.ref((Ol=(Fl=t.days)==null?void 0:Fl[0])==null?void 0:Ol.id),V=e.ref(!1),N=e.ref(""),C=e.ref(!1),T=e.ref(null),y=e.ref(null),b=e.ref(void 0),$=e.ref(null),R=e.ref(null),j=e.ref(!1),se=e.ref(0),ze=e.ref(null),Te=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],Ne=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch(Ne,h=>localStorage.setItem("schedule-grid-zoom",String(h)));const Je=e.computed(()=>Math.max(le.value.total/60*Ne.value,360)),pt=e.computed(()=>Je.value+"px"),ye=e.computed(()=>[...t.days||[]].sort((h,g)=>new Date(h.date).getTime()-new Date(g.date).getTime())),Ce=e.computed(()=>ye.value.find(h=>h.id===E.value));e.watch(()=>ye.value.map(h=>h.id).join(","),()=>{var h;(!E.value||!ye.value.some(g=>g.id===E.value))&&(E.value=(h=ye.value[0])==null?void 0:h.id)});const Ct=h=>{if(t.dayTitle)return t.dayTitle(h);const g=new Date(h.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Zt=h=>{const g=new Date(h);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},Gn=async(h,g)=>{g&&(h.date=new Date(g),await t.persist.updateDay(h),await t.persist.refresh())},Cn=async h=>{var w;if(!h)return;for(const M of he(h))await Sn(M);await t.persist.removeDay(h);const g=(t.days||[]).indexOf(h);g>=0&&t.days.splice(g,1),await t.persist.refresh(),E.value=(w=ye.value[0])==null?void 0:w.id},it=async()=>{var F,Y;const h=ye.value,g=h[h.length-1],w=g?new Date(new Date(g.date).getTime()+864e5):new Date;let M;try{M=a.value.createDay(w)}catch{t.persist.notify("warning",s.value.saveEventFirst);return}try{await((Y=(F=t.persist).createDay)==null?void 0:Y.call(F,M));for(const fe of t.places||[])await we(fe,M);await t.persist.refresh()}catch{t.persist.notify("negative",s.value.createFailed);return}E.value=M.id,t.persist.notify("positive",`${s.value.dayAdded}: ${Ct(M)}`)},he=h=>((h==null?void 0:h.schedules)||[]).slice().sort((g,w)=>{const M=G(g),F=G(w);return M.localeCompare(F,"ru")}),G=h=>{if(t.hallName)return t.hallName(h);const g=h.place||(t.places||[]).find(w=>w.id===h.placeId);return(g==null?void 0:g.name)||s.value.hall},Qe=()=>{V.value=!0},Pt=e.computed(()=>{const h=Ce.value,g=new Set(((h==null?void 0:h.schedules)||[]).map(w=>w.placeId));return(t.places||[]).filter(w=>!g.has(w.id))}),we=async(h,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(h,g,a.value.createSchedule);return}const w=a.value.createSchedule(h.id,g.id);await t.persist.createSchedule(w)},ae=async h=>{V.value=!1;const g=Ce.value;if(!g){t.persist.notify("warning",s.value.selectDayFirst);return}if(he(g).some(w=>w.placeId===h.id)){t.persist.notify("warning",s.value.alreadyAdded);return}try{await we(h,g)}catch(w){console.warn("addPlaceToDay failed:",w),t.persist.notify("negative",s.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),E.value=g.id},ve=async()=>{var w,M,F;const h=(w=N.value)==null?void 0:w.trim();if(!h){t.persist.notify("warning",s.value.enterName);return}const g=a.value.createPlace(h);try{if(!await((F=(M=t.persist).createPlace)==null?void 0:F.call(M,g))){t.persist.notify("negative",s.value.hallCreateFailed);return}}catch(Y){console.warn("createPlace failed:",Y),t.persist.notify("negative",s.value.hallCreateFailed);return}N.value="",await ae(g),t.persist.notify("positive",s.value.hallCreated.replace("{name}",h))},Mt=async h=>{await Sn(h);const g=rt(h);g&&(g.schedules=(g.schedules||[]).filter(w=>w.id!==h.id)),await t.persist.refresh()},Sn=async h=>{for(const g of h.sessions||[]){for(const w of l(g))await t.persist.removeSlot(w);await t.persist.removeSession(g)}for(const g of c(h))await t.persist.removeSlot(g);await t.persist.removeSchedule(h)},rt=h=>(t.days||[]).find(g=>(g.schedules||[]).some(w=>w.id===h.id)),st=h=>[...l(h)].sort(cr),Ye=h=>(h.sessions||[]).some(g=>l(g).length>0),Jt=new WeakMap,Ut=h=>{const g=Jt.get(h),w=c(h);if(g&&g.src===w)return g.list;const M=new Set((h.sessions||[]).map(Y=>Y.id)),F=w.filter(Y=>!Y.sessionId||!M.has(Y.sessionId));return Jt.set(h,{src:w,list:F}),F},De=h=>[...o.value?(h.sessions||[]).map(g=>({kind:"session",item:g})):[],...Ut(h).map(g=>({kind:"slot",item:g}))],ee=h=>o.value?(h.sessions||[]).map(g=>({kind:"session",item:g})):[],le=e.computed(()=>{var g,w;const h=(((g=Ce.value)==null?void 0:g.schedules)||[]).flatMap(M=>De(M));for(const M of((w=Ce.value)==null?void 0:w.schedules)||[])for(const F of M.sessions||[])h.push(...st(F).map(Y=>({kind:"slot",item:Y})));return Sa(h)}),lt=e.computed(()=>{const h=[];for(let g=le.value.start;g<=le.value.end;g+=60)h.push({min:g,label:Ge(g)});return h}),gt=e.computed(()=>{const h=[];for(let g=le.value.start+30;g<le.value.end;g+=60)h.push({min:g,label:Ge(g)});return h}),Kt=h=>ka(h,le.value),kn=e.computed(()=>{if(!$.value||!y.value)return{};const h=le.value,g=($.value.minutes-h.start)/h.total*100,w=Math.max(y.value.duration/h.total*100,2.5);return{top:g+"%",height:w+"%"}}),It=e.computed(()=>!$.value||!y.value?"":Ge($.value.minutes+y.value.duration)),_r=e.computed(()=>{if(!$.value)return{};const h=le.value,g=($.value.minutes-h.start)/h.total*100,w=Math.max(wn/h.total*100,1.5);return{top:g+"%",height:w+"%"}}),xn=e.computed(()=>{var F,Y,fe,Pe,Ie;if(!$.value||!y.value||!y.value.id)return 0;const h=Yn($.value.scheduleId);if(!h)return 0;const g={startTime:$.value.time,endTime:It.value},w=(F=$.value.session)==null?void 0:F.id;let M=0;for(const A of De(h))A.item.id!==((Y=y.value)==null?void 0:Y.id)&&(((fe=y.value)==null?void 0:fe.kind)==="slot"&&A.kind==="session"&&A.item.id===w||go(g,A.item)&&M++);if(((Pe=y.value)==null?void 0:Pe.kind)==="slot"&&$.value.session)for(const A of st($.value.session))A.id!==((Ie=y.value)==null?void 0:Ie.id)&&go(g,A)&&M++;return M}),hi=e.computed(()=>xn.value>0),en=(h,g)=>Ea(De(h),g,go),Hr=(h,g)=>Ba(st(h),g,go),Ur=(h,g)=>xa(h,g),vr=h=>{const g=le.value,w=ce(h.item.startTime),M=ce(h.item.endTime);return!isFinite(w)||!isFinite(M)?48:(M-w)/g.total*Je.value},tn=h=>Na(vr(h)),B=h=>{const g=t.slotName?t.slotName(h.item):h.item.name||(h.kind==="session"?s.value.session:s.value.slot);if(h.kind==="slot"&&tn(h)!=="h-full"){const w=p(h.item);if(w)return`${g} — ${w}`}return g},P=(h,g)=>{const w=m(h);if(g!=="h-full"){const M=p(h);if(M)return`${w} — ${M}`}return w},I=h=>{const g=`${h.item.startTime||"?"}–${h.item.endTime||"?"}`;if(h.kind==="slot"){const w=p(h.item);return[m(h.item),g,w?`${s.value.participants}: ${w}`:""].filter(Boolean).join(`
23
+ `)}return[f(h.item),g].filter(Boolean).join(`
24
+ `)},L=h=>{const g=p(h);return[m(h),`${h.startTime}–${h.endTime}`,g?`${s.value.participants}: ${g}`:""].filter(Boolean).join(`
25
+ `)},Z=(h,g)=>{var w;return{conflict:Hr(h.item,g),dragging:((w=Rt.value)==null?void 0:w.perfom.id)===g.id,[tn(h)]:!0}},Se=e.ref(null),be=(h,g)=>{const w=h.getBoundingClientRect(),M=Math.min(Math.max((g-w.top)/w.height,0),1);return le.value.start+yo(M*le.value.total,wn)},te=(h,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||j.value||(Se.value={gi:h,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",H),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",Ke),window.addEventListener("keydown",So))},H=h=>{const g=Se.value;if(g){if(!g.moved){if(Math.hypot(h.clientX-g.startX,h.clientY-g.startY)<Ta)return;g.moved=!0;const w=_n(g.gi.item.startTime,g.gi.item.endTime);y.value={kind:g.gi.kind,id:g.gi.item.id,name:g.gi.item.name||(g.gi.kind==="session"?s.value.session:s.value.slot),duration:isFinite(w)&&w>0?w:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}U(h.clientX,h.clientY),v(h.clientX,h.clientY)}},U=(h,g)=>{var Pe,Ie;const w=document.elementFromPoint(h,g),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id");if(!M||!F){b.value=void 0,$.value=null;return}const Y=Yn(F);if(!Y)return;b.value=Y.id;const fe=be(M,g);$.value={scheduleId:Y.id,minutes:fe,time:Ge(fe),hallName:G(Y),...((Pe=y.value)==null?void 0:Pe.kind)==="slot"&&o.value?{session:pi(Y.sessions,fe,fe+(((Ie=y.value)==null?void 0:Ie.duration)||30),ce)}:{}},R.value={x:h,y:g}},v=(h,g)=>{const w=ze.value;if(!w)return;const M=w.getBoundingClientRect();g<M.top+48?w.scrollTop-=14:g>M.bottom-48&&(w.scrollTop+=14),h<M.left+48?w.scrollLeft-=14:h>M.right-48&&(w.scrollLeft+=14)},q=h=>{oe(h)},oe=async h=>{const g=Se.value;if(me(),Se.value=null,!g||!g.moved)return;se.value=Date.now();const w=document.elementFromPoint(h.clientX,h.clientY),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id"),Y=F?Yn(F):void 0;if(M&&Y){const fe=be(M,h.clientY);await El(Y,fe)}ke()},me=()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",Ke),window.removeEventListener("keydown",So)},ke=()=>{Se.value=null,y.value=null,b.value=void 0,$.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor="",se.value=Date.now()},Ke=()=>{me(),ke()},So=h=>{h.key==="Escape"&&Ke()};e.onBeforeUnmount(()=>{me(),Wr(),gw(),document.body.style.userSelect="",document.body.style.cursor=""});const Qn=h=>{if(!h)return null;for(const g of t.days||[])for(const w of g.schedules||[]){const M=(w.sessions||[]).find(Y=>Y.id===h);if(M)return{kind:"session",item:M,schedule:w};const F=c(w).find(Y=>Y.id===h);if(F)return{kind:"slot",item:F,schedule:w}}return null},qr=()=>{var h;return Qn((h=y.value)==null?void 0:h.id)},aw=(h,g)=>{g.preventDefault(),g.stopPropagation();const w=h.item,M=ce(w.startTime),F=ce(w.endTime);if(!isFinite(M)||!isFinite(F))return;const Y=g.clientY;j.value=!0;const fe=A=>{const Q=(A.clientY-Y)/Ne.value*60,J=yo(F+Q,wn);w.endTime=Ge(Math.max(J,M+wn))},Pe=async()=>{window.removeEventListener("pointermove",fe),window.removeEventListener("pointerup",Ie),j.value=!1,se.value=Date.now();const A=Qn(w.id);A&&(await St(w,A.kind),await t.persist.refresh())},Ie=()=>{Pe()};window.addEventListener("pointermove",fe),window.addEventListener("pointerup",Ie)},Rt=e.ref(null),lw=(h,g,w)=>{if(w.target.closest(".nested-edit, .nested-resize")||w.button!==0||j.value)return;const M=w.target.closest(".session-perfoms"),F=ce(h.startTime),Y=ce(h.endTime),fe=_n(g.startTime,g.endTime);!M||!isFinite(F)||!isFinite(Y)||Y<=F||(Rt.value={perfom:g,session:h,startX:w.clientX,startY:w.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:F,sessionDur:Y-F,durMin:isFinite(fe)&&fe>0?fe:30,container:M},window.addEventListener("pointermove",Sl),window.addEventListener("pointerup",kl),window.addEventListener("pointercancel",jr),window.addEventListener("keydown",xl))},Sl=h=>{const g=Rt.value;if(!g)return;if(!g.moved){if(Math.hypot(h.clientX-g.startX,h.clientY-g.startY)<Ta)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const w=g.container.getBoundingClientRect(),M=Math.min(Math.max((h.clientY-w.top)/w.height,0),1);let F=g.sessionStart+yo(M*g.sessionDur,wn);const Y=g.sessionStart+g.sessionDur-g.durMin;F=Math.min(Math.max(F,g.sessionStart),Math.max(Y,g.sessionStart)),g.perfom.startTime=Ge(F),g.perfom.endTime=Ge(F+g.durMin),R.value={x:h.clientX,y:h.clientY}},kl=h=>{cw(h)},cw=async h=>{var fe;const g=Rt.value;if(Wr(),Rt.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;se.value=Date.now();const w=document.elementFromPoint(h.clientX,h.clientY),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id"),Y=F?Yn(F):void 0;if(M&&Y){y.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||s.value.slot,duration:g.durMin};const Pe=be(M,h.clientY),Ie=Ge(Pe),A=_n(g.perfom.startTime,g.perfom.endTime),Q=wt(Ie,A>0?A:30),J=((fe=Nl(g.perfom))==null?void 0:fe.id)===Y.id&&g.perfom.startTime===Ie&&g.perfom.endTime===Q;await El(Y,Pe),J&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),y.value=null;return}g.perfom.startTime=yn(g.perfom.startTime),g.perfom.endTime=yn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},jr=()=>{const h=Rt.value;Wr(),h&&(h.perfom.startTime=h.savedStart,h.perfom.endTime=h.savedEnd),Rt.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor=""},Wr=()=>{window.removeEventListener("pointermove",Sl),window.removeEventListener("pointerup",kl),window.removeEventListener("pointercancel",jr),window.removeEventListener("keydown",xl)},xl=h=>{h.key==="Escape"&&jr()},dw=(h,g,w)=>{w.preventDefault(),w.stopPropagation();const M=ce(h.startTime),F=ce(h.endTime),Y=ce(g.startTime),fe=w.target.closest(".nested-perfom"),Pe=fe==null?void 0:fe.closest(".session-perfoms");if(!fe||!Pe||!isFinite(M)||!isFinite(F)||F<=M||!isFinite(Y))return;const Ie=Pe.getBoundingClientRect(),A=F-M;j.value=!0;const Q=vt=>{const xw=Math.min(Math.max((vt.clientY-Ie.top)/Ie.height,0),1),Ew=Math.min(Math.max(Y+wn,M+yo(xw*A,wn)),F);g.endTime=Ge(Ew)},J=async()=>{window.removeEventListener("pointermove",Q),window.removeEventListener("pointerup",W),j.value=!1,se.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},W=()=>{J()};window.addEventListener("pointermove",Q),window.addEventListener("pointerup",W)},El=async(h,g)=>{var Q;b.value=void 0,$.value=null,R.value=null;const w=qr();if(!w)return;const M=Ge(g),F=_n(w.item.startTime,w.item.endTime),Y=wt(M,F>0?F:30);if(((Q=w.schedule)==null?void 0:Q.id)===h.id&&w.item.startTime===M&&w.item.endTime===Y)return;const fe=w.item.startTime;if(w.item.startTime=M,w.item.endTime=Y,w.kind==="slot"&&o.value){const J=pi(h.sessions,ce(M),ce(Y),ce);J?w.item.sessionId=J.id:delete w.item.sessionId}else w.kind==="slot"&&delete w.item.sessionId;if(w.kind==="session"){const J=ce(M)-ce(fe);for(const W of st(w.item))W.startTime&&(W.startTime=wt(W.startTime,J),W.endTime&&(W.endTime=wt(W.endTime,J)),W.scheduleId=h.id,await St(W,"slot"))}const Pe=w.schedule,Ie=w.kind==="session"?h.sessions:c(h),A=w.item;if(Pe&&Pe.id!==h.id){A.scheduleId=h.id;const J=w.kind==="session"?Pe.sessions:c(Pe);z.H.Classes.RemoveFromClassById(A.id,J,[]),Ie.push(A)}await St(A,w.kind),await t.persist.refresh()},uw=async(h,g)=>{if(g.target.closest(".timeline-block"))return;const w=be(g.currentTarget,g.clientY),M=a.value.createSlot(h);if(M.startTime=Ge(w),M.endTime=Ge(w+30),o.value){const Y=pi(h.sessions,w,w+30,ce);Y!=null&&Y.id&&(M.sessionId=Y.id)}await t.persist.createSlot(M),await t.persist.refresh();const F=Qn(M.id);F&&nn(F)},Bl=async(h,g,w)=>{if(h.added){if(h.added.element.scheduleId=g.id,w==="slot"&&h.added.element.sessionId&&((g.sessions||[]).some(F=>F.id===h.added.element.sessionId)||delete h.added.element.sessionId),await St(h.added.element,w),w==="session")for(const M of l(h.added.element))M.scheduleId=g.id,await t.persist.updateSlot(M);await t.persist.refresh()}},Yn=h=>{for(const g of t.days||[]){const w=(g.schedules||[]).find(M=>M.id===h);if(w)return w}},pi=(h,g,w,M)=>Va(h,g,w,M),Vl=h=>o.value?((h==null?void 0:h.sessions)||[]).map(g=>({id:g.id,label:f(g)})):[],Nl=h=>{for(const g of t.days||[])for(const w of g.schedules||[])if(c(w).some(M=>M.id===h.id)||h.sessionId&&(w.sessions||[]).some(M=>M.id===h.sessionId))return w},$l=e.computed(()=>{const h=T.value;if(h)return h.kind==="session"?Yn(h.item.scheduleId)||Tl(h.item,"session"):Nl(h.item)}),fw=e.computed(()=>{const h=T.value;return!h||h.kind!=="slot"?[]:Vl($l.value)}),Tl=(h,g)=>{for(const w of t.days||[])for(const M of w.schedules||[])if(g==="session"){if((M.sessions||[]).some(F=>F.id===h.id))return M}else if(c(M).some(F=>F.id===h.id))return M},Pl=async(h,g)=>{g?h.sessionId=g:delete h.sessionId,await t.persist.updateSlot(h),await t.persist.refresh()},Ml=async h=>{if(!o.value)return;const g=a.value.createSession(h);await t.persist.createSession(g),await t.persist.refresh()},mw=async(h,g)=>{const w=a.value.createSlot(h);if(w.startTime=Ge(g),w.endTime=wt(w.startTime,30),o.value){const F=pi(h.sessions,g,g+30,ce);F!=null&&F.id&&(w.sessionId=F.id)}await t.persist.createSlot(w),await t.persist.refresh();const M=Qn(w.id);M&&nn(M)},Il=async h=>{const g=a.value.createSlot(h),w=[...c(h)].sort(cr).slice(-1)[0];g.startTime=yn(w==null?void 0:w.endTime)||"9:00",g.endTime=wt(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},At=e.ref(null),hw=h=>{At.value=null,h.action()},Gr=(h,g)=>{const w=g.length*34+12;At.value={x:Math.min(h.clientX,window.innerWidth-210),y:Math.min(h.clientY,window.innerHeight-w-8),items:g}},Rl=()=>{At.value=null},Al=()=>{At.value=null},zl=h=>{h.key==="Escape"&&(At.value=null)},gi=()=>{At.value=null},Qr=e.ref(!1),pw=()=>{Qr.value||(window.addEventListener("click",Rl),window.addEventListener("contextmenu",Al),window.addEventListener("keydown",zl),window.addEventListener("scroll",gi,!0),window.addEventListener("resize",gi),Qr.value=!0)},gw=()=>{window.removeEventListener("click",Rl),window.removeEventListener("contextmenu",Al),window.removeEventListener("keydown",zl),window.removeEventListener("scroll",gi,!0),window.removeEventListener("resize",gi),Qr.value=!1};pw();const yw=(h,g)=>{const w=[{icon:"edit",label:s.value.edit,action:()=>nn(h)},{icon:"content_copy",label:s.value.duplicate,action:()=>void Dl(h)},{icon:"delete",label:s.value.delete,danger:!0,action:()=>void ko(h.item,h.kind)}];Gr(g,w)},ww=(h,g)=>{const w={kind:"slot",item:h},M=[{icon:"edit",label:s.value.edit,action:()=>nn(w)},{icon:"content_copy",label:s.value.duplicate,action:()=>void Dl(w)},{icon:"delete",label:s.value.delete,danger:!0,action:()=>void ko(h,"slot")}];Gr(g,M)},bw=(h,g)=>{const w=be(g.currentTarget,g.clientY),M=Ge(w),F=[{icon:"mic",label:`${s.value.addSlot} · ${M}`,action:()=>void mw(h,w)}];o.value&&F.push({icon:"groups",label:`${s.value.addSession} · ${M}`,action:()=>void Cw(h,w)}),Gr(g,F)},Cw=async(h,g)=>{if(!o.value)return;const w=a.value.createSession(h);w.startTime=Ge(g),w.endTime=wt(w.startTime,30),await t.persist.createSession(w),await t.persist.refresh()},Dl=async h=>{const g=Yn(h.item.scheduleId)||Tl(h.item,h.kind);if(!g)return;const w=_n(h.item.startTime,h.item.endTime)||30,M=yn(h.item.endTime)||"9:00";if(h.kind==="slot"){const F=a.value.createSlot(g);F.name=h.item.name?`${h.item.name} (копия)`:h.item.name,F.startTime=M,F.endTime=wt(M,w),F.sessionId=h.item.sessionId,h.item.description&&(F.description=h.item.description),h.item.payload&&(F.payload={...h.item.payload}),await t.persist.createSlot(F)}else{const F=a.value.createSession(g);F.name=h.item.name?`${h.item.name} (копия)`:h.item.name,F.startTime=M,F.endTime=wt(M,w),F.scheduleId=g.id,await t.persist.createSession(F)}await t.persist.refresh()},ko=async(h,g)=>{if(g==="slot")await t.persist.removeSlot(h);else{for(const w of l(h))delete w.sessionId,await t.persist.updateSlot(w);await t.persist.removeSession(h)}await t.persist.refresh()},St=async(h,g)=>{const w=yn(h.startTime),M=yn(h.endTime);if(!w){t.persist.notify("warning",s.value.correctStartTime);return}h.startTime=w,h.endTime=M||wt(w,30),g==="slot"?await t.persist.updateSlot(h):await t.persist.updateSession(h)},nn=h=>{j.value||Date.now()-se.value<400||(T.value={kind:h.kind,item:h.item},C.value=!0)},Sw=async()=>{const h=T.value;h&&(await St(h.item,h.kind),C.value=!1,T.value=null,await t.persist.refresh())},kw=async()=>{const h=T.value;h&&(await ko(h.item,h.kind),C.value=!1,T.value=null)};return t.persist.loadOptions&&t.persist.loadOptions(),(h,g)=>{var Pe,Ie;const w=e.resolveComponent("PButton"),M=e.resolveComponent("PInput"),F=e.resolveComponent("PTooltip"),Y=e.resolveComponent("PSelect"),fe=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",eh,[(Pe=n.days)!=null&&Pe.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",nh,[i.value?(e.openBlock(),e.createBlock(e.unref(x.QTabs),{key:0,modelValue:E.value,"onUpdate:modelValue":g[0]||(g[0]=A=>E.value=A),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,A=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:A.id,name:A.id,label:Ct(A)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QSpace)),i.value&&Ce.value?(e.openBlock(),e.createBlock(M,{key:1,"model-value":Zt(Ce.value.date),label:s.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=A=>Gn(Ce.value,A))},null,8,["model-value","label"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(w,{key:2,size:"sm",color:"negative",outline:"",icon:"delete",label:s.value.deleteDay,disable:!Ce.value,onClick:g[2]||(g[2]=A=>Cn(Ce.value))},null,8,["label","disable"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(w,{key:3,size:"sm",color:"primary",outline:"",icon:"event",label:s.value.addDay,onClick:it},null,8,["label"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(w,{key:4,size:"sm",color:"primary",outline:"",icon:"add",label:s.value.addHall,onClick:Qe},null,8,["label"])):e.createCommentVNode("",!0),k.value==="grid"?(e.openBlock(),e.createElementBlock("div",oh,[e.createVNode(e.unref(x.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(x.QBtnToggle),{modelValue:Ne.value,"onUpdate:modelValue":g[3]||(g[3]=A=>Ne.value=A),"toggle-color":"primary",options:Te,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QBtnToggle),{modelValue:k.value,"onUpdate:modelValue":g[4]||(g[4]=A=>k.value=A),"toggle-color":"primary",options:[{label:s.value.grid,value:"grid",icon:"calendar_view_week"},{label:s.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),k.value==="grid"?(e.openBlock(),e.createElementBlock("div",ih,[he(Ce.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:ze,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":he(Ce.value).length,"--hours":Math.max(le.value.total/60,1),"--half-hours":Math.max(le.value.total/60*2,2)})},[e.createElementVNode("div",sh,[g[17]||(g[17]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Ce.value),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:e.normalizeClass(["hall-head",{"drag-over":b.value===A.id}])},[e.createElementVNode("div",ah,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",lh,e.toDisplayString(G(A)),1),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:Q=>Il(A)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),o.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:Q=>Ml(A)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.addSession),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(w,{key:1,size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>Mt(A)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2))),128))]),e.createElementVNode("div",{class:"grid-body",style:e.normalizeStyle({height:pt.value})},[e.createElementVNode("div",ch,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.min,class:"hour-label",style:e.normalizeStyle({top:(A.min-le.value.start)/le.value.total*100+"%"})},e.toDisplayString(A.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(gt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.min,class:"half-label",style:e.normalizeStyle({top:(A.min-le.value.start)/le.value.total*100+"%"})},e.toDisplayString(A.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Ce.value),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:e.normalizeClass(["hall-col",{"drag-over":b.value===A.id}]),"data-schedule-id":A.id,onDblclick:Q=>uw(A,Q),onContextmenu:e.withModifiers(Q=>bw(A,Q),["prevent","stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De(A),Q=>{var J;return e.openBlock(),e.createElementBlock("div",{key:Q.item.id,class:e.normalizeClass(["timeline-block",[Q.kind,{conflict:en(A,Q),dragging:((J=y.value)==null?void 0:J.id)===Q.item.id},tn(Q)]]),style:e.normalizeStyle(Kt(Q)),title:I(Q),onPointerdown:W=>te(Q,W),onClick:W=>nn(Q),onContextmenu:e.withModifiers(W=>yw(Q,W),["prevent","stop"])},[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",fh,[e.createElementVNode("div",mh,e.toDisplayString(Q.item.startTime)+"–"+e.toDisplayString(Q.item.endTime),1),e.createElementVNode("div",hh,e.toDisplayString(B(Q)),1),Q.kind==="slot"&&p(Q.item)?(e.openBlock(),e.createElementBlock("div",ph,e.toDisplayString(p(Q.item)),1)):e.createCommentVNode("",!0)]),Q.kind==="session"&&st(Q.item).length?(e.openBlock(),e.createElementBlock("div",gh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st(Q.item),W=>(e.openBlock(),e.createElementBlock("div",{key:W.id,class:e.normalizeClass(["nested-perfom",Z(Q,W)]),style:e.normalizeStyle(Ur(Q.item,W)),title:L(W),onPointerdown:e.withModifiers(vt=>lw(Q.item,W,vt),["stop"]),onClick:e.withModifiers(vt=>nn({kind:"slot",item:W}),["stop"]),onContextmenu:e.withModifiers(vt=>ww(W,vt),["prevent","stop"])},[e.createElementVNode("div",wh,e.toDisplayString(W.startTime)+"–"+e.toDisplayString(W.endTime),1),e.createElementVNode("div",bh,e.toDisplayString(P(W,tn(Q))),1),p(W)?(e.openBlock(),e.createElementBlock("div",Ch,e.toDisplayString(p(W)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),e.createElementVNode("div",{class:"nested-resize",title:s.value.changeDurationTitle,onPointerdown:e.withModifiers(vt=>dw(Q.item,W,vt),["stop","prevent"])},null,40,Sh)],46,yh))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",kh,[en(A,Q)?(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.conflictTitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:e.withModifiers(W=>nn(Q),["stop"])},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",{class:"block-resize",title:s.value.changeDurationTitle,onPointerdown:e.withModifiers(W=>aw(Q,W),["stop","prevent"])},null,40,xh)],46,uh)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee(A),Q=>{var J;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+Q.item.id,class:e.normalizeClass(["session-spine",{dragging:((J=y.value)==null?void 0:J.id)===Q.item.id}]),style:e.normalizeStyle(Kt(Q)),title:f(Q.item)},[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",Bh,e.toDisplayString(f(Q.item)),1)],14,Eh)}),128)),$.value&&$.value.scheduleId===A.id&&y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:hi.value}]),style:e.normalizeStyle(_r.value)},null,6)):e.createCommentVNode("",!0),$.value&&$.value.scheduleId===A.id&&y.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[y.value.kind,{conflict:hi.value}]]),style:e.normalizeStyle(kn.value)},[e.createElementVNode("div",Vh,[e.createTextVNode(e.toDisplayString($.value.time)+"–"+e.toDisplayString(It.value)+" ",1),$.value.session?(e.openBlock(),e.createElementBlock("span",Nh,e.toDisplayString(s.value.intoSession),1)):e.createCommentVNode("",!0),xn.value?(e.openBlock(),e.createElementBlock("span",$h," ⚠ "+e.toDisplayString(s.value.conflictCount)+": "+e.toDisplayString(xn.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Th,e.toDisplayString(y.value.name),1)],6)):e.createCommentVNode("",!0)],42,dh))),128))],4),e.createElementVNode("div",Ph,e.toDisplayString(s.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",rh,[e.createTextVNode(e.toDisplayString(s.value.noHalls)+" ",1),r.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"primary",size:"sm",label:s.value.addHall,onClick:Qe},null,8,["label"])):e.createCommentVNode("",!0)])),R.value&&$.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:R.value.x+"px",top:R.value.y+"px"})},[e.createVNode(e.unref(x.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString($.value.time)+" · "+e.toDisplayString($.value.hallName)+" ",1),$.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[18]||(g[18]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(x.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(s.value.intoSession)+" «"+e.toDisplayString(f($.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),xn.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[19]||(g[19]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(x.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(xn.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(Ie=Rt.value)!=null&&Ie.moved&&R.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:R.value.x+"px",top:R.value.y+"px"})},[e.createVNode(e.unref(x.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(Rt.value.perfom.startTime)+"–"+e.toDisplayString(Rt.value.perfom.endTime)+" · "+e.toDisplayString(s.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Mh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Ce.value),A=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{key:A.id,class:"hall-card q-mb-md"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"hall-card-head"},{default:e.withCtx(()=>[e.createElementVNode("div",Ih,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",Rh,e.toDisplayString(G(A)),1),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:s.value.session,onClick:Q=>Ml(A)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:s.value.slot,onClick:Q=>Il(A)},null,8,["label","onClick"]),r.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>Mt(A)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])]),_:2},1024),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var Q;return[o.value&&((Q=A.sessions)!=null&&Q.length)?(e.openBlock(),e.createElementBlock("div",Ah,[e.createElementVNode("div",zh,[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(s.value.sessionsTitle),1)]),e.createVNode(e.unref(wi),{list:A.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:J=>Bl(J,A,"session")},{item:e.withCtx(({element:J})=>[e.createElementVNode("div",Dh,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(M,{"model-value":J.name,label:s.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":W=>J.name=W,onBlur:W=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(M,{"model-value":J.startTime,label:s.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>J.startTime=W,onBlur:W=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(M,{"model-value":J.endTime,label:s.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>J.endTime=W,onBlur:W=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.renderSlot(h.$slots,"session-row-extra",{element:J,schedule:A},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>ko(J,"session")},null,8,["onClick"])]),st(J).length?(e.openBlock(),e.createElementBlock("div",Fh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st(J),W=>(e.openBlock(),e.createElementBlock("div",{key:W.id,class:"list-row nested-row"},[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),e.createElementVNode("div",Oh,e.toDisplayString(m(W)),1),e.createElementVNode("div",Lh,e.toDisplayString(W.startTime)+"–"+e.toDisplayString(W.endTime),1),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:vt=>nn({kind:"slot",item:W})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",_h,[e.createElementVNode("div",Hh,[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(s.value.slotsTitle),1)]),e.createVNode(e.unref(wi),{list:Ut(A),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:J=>Bl(J,A,"slot")},{item:e.withCtx(({element:J})=>[e.createElementVNode("div",Uh,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(M,{"model-value":J.name,label:s.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":W=>J.name=W,onBlur:W=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(M,{"model-value":J.startTime,label:s.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>J.startTime=W,onBlur:W=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(M,{"model-value":J.endTime,label:s.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>J.endTime=W,onBlur:W=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),o.value?(e.openBlock(),e.createBlock(Y,{key:0,"model-value":J.sessionId,label:s.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:Vl(A),"option-value":"id","option-label":"label","onUpdate:modelValue":W=>Pl(J,W)},null,8,["model-value","label","options","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"slot-row-extra",{element:J,schedule:A},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>ko(J,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!Ut(A).length&&!Ye(A)?(e.openBlock(),e.createElementBlock("div",vh,e.toDisplayString(s.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",qh,e.toDisplayString(s.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",th,[e.createVNode(e.unref(x.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(s.value.noDays),1),e.createVNode(w,{color:"primary",outline:"",label:s.value.addDay,icon:"event",class:"q-mt-sm",onClick:it},null,8,["label"])])),e.createVNode(fe,{modelValue:V.value,"onUpdate:modelValue":g[7]||(g[7]=A=>V.value=A)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"700px","max-width":"80vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",jh,e.toDisplayString(s.value.addHall),1)]),_:1}),e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",Wh,[e.createVNode(M,{modelValue:N.value,"onUpdate:modelValue":g[5]||(g[5]=A=>N.value=A),label:s.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(ve,["enter"])},null,8,["modelValue","label"]),e.createVNode(w,{color:"primary",label:s.value.create,icon:"add",dense:"",onClick:ve},null,8,["label"])]),e.renderSlot(h.$slots,"places-list",{day:Ce.value,add:ae},()=>[Pt.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Gh,e.toDisplayString(s.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"place-row row items-center q-gutter-sm"},[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),e.createElementVNode("span",Qh,e.toDisplayString(u(A)),1),e.createVNode(w,{size:"sm",color:"primary",outline:"",label:s.value.addHall,icon:"add",dense:"",onClick:Q=>ae(A)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(x.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(w,{label:s.value.close,color:"primary",onClick:g[6]||(g[6]=A=>V.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(fe,{modelValue:C.value,"onUpdate:modelValue":g[14]||(g[14]=A=>C.value=A)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"640px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>{var A;return[e.createElementVNode("div",Yh,e.toDisplayString(((A=T.value)==null?void 0:A.kind)==="session"?s.value.session:s.value.slot),1)]}),_:1}),T.value?(e.openBlock(),e.createBlock(e.unref(x.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(M,{modelValue:T.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=A=>T.value.item.name=A),label:s.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",Xh,[e.createElementVNode("div",Zh,[e.createVNode(M,{modelValue:T.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=A=>T.value.item.startTime=A),label:s.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",Jh,[e.createVNode(M,{modelValue:T.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=A=>T.value.item.endTime=A),label:s.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),T.value.kind==="slot"&&o.value?(e.openBlock(),e.createBlock(Y,{key:0,"model-value":T.value.item.sessionId,label:s.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:fw.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=A=>Pl(T.value.item,A))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"edit-form",{kind:T.value.kind,item:T.value.item,schedule:$l.value},void 0,!0),T.value.kind==="slot"?(e.openBlock(),e.createBlock(M,{key:1,modelValue:T.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=A=>T.value.item.description=A),label:s.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QCardActions),{align:"right"},{default:e.withCtx(()=>[T.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"negative",label:s.value.delete,onClick:kw},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{flat:"",label:s.value.cancel,color:"primary",onClick:g[13]||(g[13]=A=>C.value=!1)},null,8,["label"]),e.createVNode(w,{label:s.value.save,color:"primary",onClick:Sw},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),At.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"ctx-menu",style:e.normalizeStyle({left:At.value.x+"px",top:At.value.y+"px"}),onClick:g[15]||(g[15]=e.withModifiers(()=>{},["stop"])),onContextmenu:g[16]||(g[16]=e.withModifiers(()=>{},["prevent","stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(At.value.items,(A,Q)=>(e.openBlock(),e.createElementBlock("div",{key:Q,class:e.normalizeClass(["ctx-item",{"ctx-item--danger":A.danger}]),onClick:J=>hw(A)},[e.createVNode(e.unref(x.QIcon),{name:A.icon,size:"15px"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(A.label),1)],10,Kh))),128))],36)):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-b4f8340b"]]),ep={class:"schedule-timeline"},tp={key:0,class:"timeline-container"},np={class:"day-header"},op={class:"day-title"},ip={class:"timeline"},rp={key:0,class:"schedule-place"},sp={class:"events-column"},ap={key:0,class:"event-item session-item"},lp={class:"event-content"},cp={class:"event-time"},dp={class:"event-main"},up={class:"event-name"},fp={key:0,class:"speakers-list"},mp=["onClick"],hp={class:"speaker-details"},pp={class:"speaker-name"},gp={class:"bio-text"},yp=["onClick"],wp={key:0,class:"perfom-divider"},bp={class:"event-content"},Cp={class:"event-time"},Sp={class:"event-main"},kp={class:"event-name"},xp={class:"event-badges"},Ep={key:0,class:"speakers-list"},Bp=["onClick"],Vp={class:"speaker-details"},Np={class:"speaker-name"},$p={class:"bio-text"},Tp={key:1,class:"no-program"},Ma=D(e.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:t}){const o=n,i=t,r=e.computed(()=>({noProgram:o.noProgramText||"Программа пока не опубликована"})),s=y=>{if(o.dayTitle)return o.dayTitle(y);const b=new Date(y.date);return isNaN(b.getTime())||b.getFullYear()<2e3?"":b.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=y=>{var b;return o.placeName?o.placeName(y):((b=y.place)==null?void 0:b.name)||y.placeName||""},c=y=>o.slotName?o.slotName(y):(y==null?void 0:y.name)||"",l=y=>o.sessionName?o.sessionName(y):(y==null?void 0:y.name)||"",u=y=>o.slotParticipants?o.slotParticipants(y):(y==null?void 0:y.participants)||[],f=y=>o.sessionParticipants?o.sessionParticipants(y):(y==null?void 0:y.participants)||[],m=y=>{var b,$;return o.participantName?o.participantName(y):(y==null?void 0:y.name)||(y==null?void 0:y.fullName)||(($=(b=y==null?void 0:y.human)==null?void 0:b.getFullName)==null?void 0:$.call(b))||""},p=y=>o.participantBio?o.participantBio(y):(y==null?void 0:y.bio)||(y==null?void 0:y.regalias)||"",k=y=>o.slotListOf?o.slotListOf(y):(y==null?void 0:y.slots)||[],E=y=>o.nestedSlotListOf?o.nestedSlotListOf(y):(y==null?void 0:y.slots)||[],V=y=>y.schedules.filter(b=>{var $;return k(b).length>0||((($=b.sessions)==null?void 0:$.length)||0)>0}),N=y=>{const b=[],$=new Set((y.sessions||[]).map(j=>j.id));for(const j of y.sessions||[]){b.push({kind:"session",item:j,nested:!1,index:0});for(const se of E(j))b.push({kind:"slot",item:se,nested:!0,index:0})}let R=0;for(const j of k(y).filter(se=>!se.sessionId||!$.has(se.sessionId)))b.push({kind:"slot",item:j,nested:!1,index:R++});return b},C=e.computed(()=>{var y;return(y=o.days)==null?void 0:y.some(b=>{var $;return($=b.schedules)==null?void 0:$.some(R=>{var j;return k(R).length>0||(((j=R.sessions)==null?void 0:j.length)||0)>0})})}),T=(y,b)=>`${y} - ${b}`;return(y,b)=>(e.openBlock(),e.createElementBlock("div",ep,[C.value?(e.openBlock(),e.createElementBlock("div",tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,$=>(e.openBlock(),e.createElementBlock("div",{key:$.id,class:"day-section"},[e.createElementVNode("div",np,[e.createElementVNode("div",op,[e.createVNode(e.unref(x.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s($)),1)])]),e.createElementVNode("div",ip,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V($),R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:"time-slot"},[a(R)?(e.openBlock(),e.createElementBlock("div",rp,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(R)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",sp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N(R),j=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:j.item.id},[j.kind==="session"?(e.openBlock(),e.createElementBlock("div",ap,[e.createElementVNode("div",lp,[e.createElementVNode("div",cp,e.toDisplayString(T(j.item.startTime,j.item.endTime)),1),e.createElementVNode("div",dp,[e.createElementVNode("div",up,e.toDisplayString(l(j.item)),1),f(j.item).length?(e.openBlock(),e.createElementBlock("div",fp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(j.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:ze=>i("open-participant",se)},[e.createElementVNode("div",hp,[e.createElementVNode("div",pp,[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",gp,e.toDisplayString(p(se)),1)])],8,mp))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":j.item.active,"nested-item":j.nested},{clickable:o.slotClickable}]]),onClick:se=>o.slotClickable&&i("slot-click",j.item)},[!j.nested&&j.index>0?(e.openBlock(),e.createElementBlock("div",wp)):e.createCommentVNode("",!0),e.createElementVNode("div",bp,[e.createElementVNode("div",Cp,e.toDisplayString(T(j.item.startTime,j.item.endTime)),1),e.createElementVNode("div",Sp,[e.createElementVNode("div",kp,e.toDisplayString(c(j.item)),1),e.createElementVNode("div",xp,[e.renderSlot(y.$slots,"badges",{item:j.item},void 0,!0)]),u(j.item).length?(e.openBlock(),e.createElementBlock("div",Ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(j.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:ze=>i("open-participant",se)},[e.createElementVNode("div",Vp,[e.createElementVNode("div",Np,[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",$p,e.toDisplayString(p(se)),1)])],8,Bp))),128))])):e.createCommentVNode("",!0)])])],10,yp))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",Tp,[e.createVNode(e.unref(x.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),e.createElementVNode("p",null,e.toDisplayString(r.value.noProgram),1)])),e.renderSlot(y.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),Pp=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Pa,ScheduleTimeline:Ma},Symbol.toStringTag,{value:"Module"})),Mp=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:wt,blockSizeClass:Na,blockStyle:ka,byStart:cr,diffM:_n,findEnclosingSession:Va,fromMin:Ge,gridBounds:Sa,hasConflict:Ea,intersects:go,nestedConflict:Ba,nestedSlotStyle:xa,normTime:yn,snapMinutes:yo,toMin:ce},Symbol.toStringTag,{value:"Module"}));let Ip=class extends Ve{constructor(){super(Ko,"schedule-days")}};const Rp=new Ip;let Ap=class extends Ve{constructor(){super(Ln,"schedule-places")}};const zp=new Ap;let Dp=class extends Ve{constructor(){super(On,"schedule-sessions")}};const Fp=new Dp;let Op=class extends Ve{constructor(){super(Ft,"schedule-slots")}};const Lp=new Op;let _p=class extends Ve{constructor(){super(po,"schedule-timetables")}};const Hp=new _p,Up=Object.freeze(Object.defineProperty({__proto__:null,C:Km,Components:Pp,H:Mp,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Rp,SchedulePlacesStore:zp,ScheduleSessionsStore:Fp,ScheduleSlotsStore:Lp,SchedulesStore:Hp},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:$a,defaultScheduleLabels:dr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),ur=e.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:t}){const o=t,i=e.useAttrs(),r=e.computed(()=>{const s={};for(const a of Object.keys(i))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=i[a]);return s});return(s,a)=>(e.openBlock(),e.createBlock(e.unref(x.QChip),e.mergeProps(e.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]=c=>o("remove"))}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[s.$slots.avatar?{name:"avatar",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"avatar")]),key:"0"}:void 0,s.$slots.remove?{name:"remove",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"remove")]),key:"1"}:void 0]),1040,["label","color","text-color","outline","square","dense","removable"]))}}),vp={class:"tags-selector"},qp={key:0,class:"empty-state"},ei=D(e.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:t}){const o=n,i=e.ref(""),r=o.store.Options,s=e.computed(()=>r.filter(l=>z.H.Strings.SearchIn(l.label,i.value))),a=t;e.onBeforeMount(async()=>{await o.store.GetOptions()});const c=async l=>{await o.store.Get(l.value),a("select",o.store.Item)};return(l,u)=>{const f=e.resolveDirective("ripple");return e.openBlock(),e.createElementBlock("div",vp,[e.createVNode(Ze,{modelValue:e.unref(i),"onUpdate:modelValue":u[0]||(u[0]=m=>e.isRef(i)?i.value=m:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),e.createVNode(e.unref(x.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QList),{dense:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.QItem),{key:m.value,clickable:"",class:"tag-item",onClick:p=>c(m)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemSection),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[f]])),128)),e.unref(s).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",qp,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),jp={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},Wp={class:"edit-dialog-header"},Gp={class:"edit-dialog-title"},Qp={class:"edit-dialog-content"},Yp={key:0,class:"edit-dialog-actions"},Hn=D(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},jp),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:o}){const i=x.ClosePopup,r=n,s=o,a=e.ref(!1);e.watch(()=>r.modelValue,p=>{a.value=p},{immediate:!0});const c=async()=>{s("confirm"),l()},l=()=>{s("close"),a.value=!1,s("update:modelValue",!1)},u=()=>{a.value&&l()};t({opened:a,toggle:()=>{a.value=!a.value,s("update:modelValue",a.value)}});const m=async()=>{await e.nextTick();const p=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');p&&"focus"in p&&p.focus()};return(p,k)=>(e.openBlock(),e.createBlock(un,{modelValue:e.unref(a),"onUpdate:modelValue":[k[0]||(k[0]=E=>e.isRef(a)?a.value=E:null),l],position:"top",onKeydown:[e.withKeys(c,["enter"]),e.withKeys(u,["escape"])],onShow:m},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:r.width})},[e.createElementVNode("div",Wp,[e.createElementVNode("div",Gp,e.toDisplayString(r.title),1),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(i)]])]),e.createElementVNode("div",Qp,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),r.showConfirm?(e.openBlock(),e.createElementBlock("div",Yp,[e.withDirectives(e.createVNode(ne,{flat:"",label:r.cancelLabel,size:"sm"},null,8,["label"]),[[e.unref(i)]]),e.createVNode(ne,{flat:"",label:r.confirmLabel,color:"primary",disable:r.disabled,size:"sm",onClick:c},null,8,["label","disable"])])):e.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-4c8226ef"]]),fr=D(e.defineComponent({__name:"PTableBadge",props:{row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"}},emits:["click"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(),s=()=>{r.value.toggle(),i("click")},a=async c=>{o.row[o.prop]=c,await o.store.Update(o.row),r.value.toggle()};return(c,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"tags-cell"},{default:e.withCtx(()=>{var u,f,m;return[e.createVNode(ur,{color:(u=n.row[n.prop])!=null&&u.id?"primary":"grey-3","text-color":(f=n.row[n.prop])!=null&&f.id?"white":"grey-6",outline:!((m=n.row[n.prop])!=null&&m.id),size:"sm",clickable:"",class:"tags-chip",onClick:s},{default:e.withCtx(()=>{var p;return[(p=n.row[n.prop])!=null&&p.id?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.row[n.prop][n.labelKey]),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(x.QIcon),{name:"add",size:"16px"}),l[0]||(l[0]=e.createTextVNode(" Добавить ",-1))],64))]}),_:1},8,["color","text-color","outline"])]}),_:1})),e.createVNode(Hn,{ref_key:"edit",ref:r,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},()=>[e.createVNode(ei,{store:n.storeOpts,onSelect:a},null,8,["store"])],!0)]),_:3},512)],64))}}),[["__scopeId","data-v-29efd68b"]]),Xp={class:"tag-name"},Zp={key:0,class:"tag-extra"},mr=e.defineComponent({__name:"PTableBadges",props:{items:{},row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"},cellKey:{default:""}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.items!==void 0?t.items:t.row?t.row[t.prop??""]:[]),r=e.computed(()=>i.value?(Array.isArray(i.value)?i.value:[i.value]).filter(f=>f==null?void 0:f.id):[]),s=e.computed(()=>r.value.length),a=e.computed(()=>{var u;return((u=r.value[0])==null?void 0:u[t.labelKey])||""}),c=e.computed(()=>Math.max(0,s.value-1)),l=async u=>{t.row&&t.prop&&t.store&&(t.row[t.prop]=u,await t.store.Update(t.row)),o.value.toggle()};return(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.cellKey,class:"tags-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["tags-badge",{empty:!e.unref(s),clickable:e.unref(s)}]),onClick:f[1]||(f[1]=e.withModifiers(m=>e.unref(s)?e.unref(o).toggle():void 0,["stop"]))},[e.unref(s)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",Xp,e.toDisplayString(e.unref(a)),1),e.unref(c)?(e.openBlock(),e.createElementBlock("span",Zp,"+"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:1,name:"add",size:"18px",color:"grey-5",onClick:f[0]||(f[0]=m=>e.unref(o).toggle())}))],2)]),_:1})),e.createVNode(Hn,{ref_key:"edit",ref:o,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},()=>[n.storeOpts?(e.openBlock(),e.createBlock(ei,{key:0,store:n.storeOpts,onSelect:l},null,8,["store"])):e.createCommentVNode("",!0)])]),_:3},512)],64))}}),Jp={key:0,class:"relation-label"},Kp={class:"relation-count"},hr=D(e.defineComponent({__name:"PTableCount",props:{label:{},count:{},to:{},cellKey:{default:""}},emits:["click"],setup(n,{emit:t}){const o=n,i=t,r=()=>{o.count!==0&&(o.to&&z.H.Router.To(o.to),i("click"))};return(s,a)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.cellKey,class:"relation-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["relation-badge",{"has-items":n.count>0}]),onClick:r},[n.label?(e.openBlock(),e.createElementBlock("span",Jp,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.createElementVNode("span",Kp,e.toDisplayString(n.count),1)],2)]),_:1}))}}),[["__scopeId","data-v-20c0d0d2"]]),pr=e.defineComponent({__name:"PTableEdit",props:{domen:{},row:{}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{"auto-width":""},{default:e.withCtx(()=>[e.createVNode(ne,{size:"sm",round:"",dense:"",icon:"edit",color:"primary",class:"q-mr-xs",onClick:o[0]||(o[0]=i=>e.unref(z).H.Router.To(`/admin/${n.domen}/${n.row.id}`))})]),_:1}))}}),eg={class:"cell-text"},gr=D(e.defineComponent({__name:"PTableNumber",props:{row:{},prop:{default:"name"},store:{},readonly:{type:Boolean,default:!1},label:{default:""},decimals:{default:void 0},min:{default:void 0},max:{default:void 0},step:{default:void 0},emptyPlaceholder:{default:"—"},tooltipThreshold:{default:10}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.row[t.prop]),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=i.value;return l!=null&&String(l).length>t.tooltipThreshold}),a=e.computed(()=>{const l=i.value;return l==null||l===""?t.emptyPlaceholder:typeof l=="number"&&t.decimals!==void 0?l.toFixed(t.decimals):String(l)}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"p-table-number-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",eg,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(tt,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(Hn,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(Ze,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),modelModifiers:{number:!0},type:"number",class:"q-mb-md",autofocus:"",label:n.label,min:n.min,max:n.max,step:n.step},null,8,["modelValue","label","min","max","step"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-4e17e527"]]),wo=e.defineComponent({inheritAttrs:!1,__name:"PSelect",props:e.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:()=>[]},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=e.useModel(n,"modelValue"),r=o,s=e.ref(null);function a(){var b;(b=s.value)==null||b.focus()}function c(){var b;(b=s.value)==null||b.blur()}function l(){var b;(b=s.value)==null||b.showPopup()}function u(){var b;(b=s.value)==null||b.hidePopup()}async function f(){var b;return await((b=s.value)==null?void 0:b.validate())??!0}function m(){var b;(b=s.value)==null||b.resetValidation()}t({focus:a,blur:c,showPopup:l,hidePopup:u,validate:f,resetValidation:m});const p=e.useAttrs(),k=e.computed(()=>typeof p.id=="string"?p.id:void 0),E=e.computed(()=>{const b={};for(const $ of Object.keys(p))$!=="id"&&$!=="disable"&&(b[$]=p[$]);return b}),V=n,N=e.computed(()=>p.disable??V.disabled),C=b=>{r("change",b)},T=()=>{r("clear",void 0)},y=e.computed(()=>{const b={};return V.margin&&(b.margin=V.margin),V.padding&&(b.padding=V.padding),V.width&&(b.width=V.width),V.inPadding&&(b.padding=V.inPadding),b});return(b,$)=>(e.openBlock(),e.createBlock(e.unref(x.QSelect),e.mergeProps({ref_key:"selectRef",ref:s,modelValue:i.value,"onUpdate:modelValue":$[0]||($[0]=R=>i.value=R)},e.unref(E),{for:e.unref(k),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,rules:n.rules,disable:e.unref(N),readonly:n.readonly,"input-style":{color:n.color||void 0},style:e.unref(y),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":C,onClear:T}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(b.$slots,"before",{},()=>[e.renderSlot(b.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(b.$slots,"append",{},()=>[e.renderSlot(b.$slots,"right")])]),_:2},[b.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"prepend")]),key:"0"}:void 0,b.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"after")]),key:"1"}:void 0,b.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"default")]),key:"2"}:void 0,b.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"label")]),key:"3"}:void 0,b.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"error")]),key:"4"}:void 0,b.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"hint")]),key:"5"}:void 0,b.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"counter")]),key:"6"}:void 0,b.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"loading")]),key:"7"}:void 0,b.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"selected")]),key:"8"}:void 0,b.$slots.option?{name:"option",fn:e.withCtx(R=>[e.renderSlot(b.$slots,"option",e.normalizeProps(e.guardReactiveProps(R)))]),key:"9"}:void 0,b.$slots["no-option"]?{name:"no-option",fn:e.withCtx(R=>[e.renderSlot(b.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(R)))]),key:"10"}:void 0,b.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"before-options")]),key:"11"}:void 0,b.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"after-options")]),key:"12"}:void 0,b.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(R=>[e.renderSlot(b.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(R)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","rules","disable","readonly","input-style","style"]))}}),yr=D(e.defineComponent({__name:"PTableSelect",props:{row:{},prop:{},storeOpts:{},store:{}},setup(n){const t=n,o=e.computed(()=>t.storeOpts.Options);return e.onBeforeMount(async()=>{await t.storeOpts.GetOptions()}),(i,r)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"relation-cell"},{default:e.withCtx(()=>[e.createVNode(wo,{modelValue:n.row[n.prop+"Id"],"onUpdate:modelValue":r[0]||(r[0]=s=>n.row[n.prop+"Id"]=s),clearable:!1,dense:"",filled:"","map-options":"",options:e.unref(o)},null,8,["modelValue","options"])]),_:1}))}}),[["__scopeId","data-v-a2c49ff8"]]),tg={class:"cell-text"},wr=D(e.defineComponent({__name:"PTableString",props:{row:{},prop:{default:"name"},store:{},maxLength:{default:200},truncateLength:{default:40},readonly:{type:Boolean,default:!1},label:{default:""}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.row[t.prop]||""),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=i.value;return typeof l=="string"&&l.length>t.truncateLength}),a=e.computed(()=>{const l=i.value;return typeof l!="string"?l:l.length>t.truncateLength?l.slice(0,t.truncateLength)+"...":l}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"p-table-string-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",tg,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(tt,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(Hn,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(Ze,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),class:"q-mb-md",maxlength:n.maxLength,autofocus:"",label:n.label},null,8,["modelValue","maxlength","label"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-8856da5a"]]),br=D(e.defineComponent({__name:"PTable",props:{cols:{},items:{},store:{},rowKey:{default:"name"},rowsPerPageOptions:{default:()=>[25,50,75,100]},paginationLabel:{type:Function,default:(n,t,o)=>`${n}-${t} из ${o}`}},emits:["request"],setup(n,{emit:t}){const o=n,i=t,r=e.ref({page:0,rowsNumber:o.store.Count,rowsPerPage:25,sortBy:"desc",descending:!1});e.watch(()=>o.store.Count,()=>{r.value.rowsNumber=o.store.Count});const s=c=>{z.F.FTSP.Get().p.page=c.pagination.page-1,z.F.FTSP.Get().p.rowsPerPage=c.pagination.rowsPerPage,r.value.page=c.pagination.page,r.value.rowsPerPage=c.pagination.rowsPerPage},a=async c=>{s(c),await o.store.FTSP(),i("request")};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(x.QTable),{pagination:e.unref(r),"onUpdate:pagination":l[0]||(l[0]=u=>e.isRef(r)?r.value=u:null),columns:n.cols,rows:n.items,"row-key":n.rowKey,flat:"",bordered:"","rows-per-page-label":"На странице","pagination-label":n.paginationLabel,"rows-per-page-options":n.rowsPerPageOptions,class:"p-table",onRequest:a},{header:e.withCtx(u=>[e.createVNode(e.unref(x.QTr),{props:u},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QTh),{"auto-width":""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.cols,f=>(e.openBlock(),e.createBlock(e.unref(x.QTh),{key:f.name,props:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["props"]))),128))]),_:2},1032,["props"])]),body:e.withCtx(u=>[e.createVNode(e.unref(x.QTr),{props:u},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{row:u.row},void 0,!0)]),_:2},1032,["props"])]),_:3},8,["pagination","columns","rows","row-key","pagination-label","rows-per-page-options"]))}}),[["__scopeId","data-v-025f97ac"]]);function Ia(n){n.component("PTable",br),n.component("PTableBadge",fr),n.component("PTableBadges",mr),n.component("PTableCount",hr),n.component("PTableEdit",pr),n.component("PTableNumber",gr),n.component("PTableSelect",yr),n.component("PTableString",wr)}const ng=Object.freeze(Object.defineProperty({__proto__:null,PTable:br,PTableBadge:fr,PTableBadges:mr,PTableCount:hr,PTableEdit:pr,PTableNumber:gr,PTableSelect:yr,PTableString:wr,default:Ia},Symbol.toStringTag,{value:"Module"})),og=["innerHTML"],Cr=D(e.defineComponent({__name:"PTabs",props:{tabsStore:{type:Object,required:!0},vertical:{type:Boolean,default:!1},color:{type:String,default:"",required:!1},dark:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:t}){const o=n,i=t;e.onBeforeMount(()=>{o.tabsStore.Select()});const r=s=>{o.tabsStore.Select(s),i("select")};return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tabs-wrapper",{compact:n.compact,vertical:n.vertical}])},[e.createVNode(e.unref(x.QTabs),{"model-value":n.tabsStore.value,vertical:n.vertical,class:e.normalizeClass(["tabs-header",n.color?`bg-${n.color} text-white`:"",{"tabs-header--dark":n.dark}]),dense:"",align:"justify","narrow-indicator":"","active-class":"active-tab","onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:c.value,name:c.value,label:c.htmlLabel?void 0:c.label,icon:c.icon,"no-caps":""},{default:e.withCtx(()=>[c.htmlLabel?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:c.htmlLabel},null,8,og)):e.createCommentVNode("",!0),c.alert?(e.openBlock(),e.createBlock(e.unref(x.QBadge),{key:1,color:"negative",floating:"",rounded:""},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("!",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:2},1032,["name","label","icon"]))),128))]),_:1},8,["model-value","vertical","class"]),e.createVNode(e.unref(x.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"tabs-panels","transition-prev":"slide-right","transition-next":"slide-left"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(x.QTabPanel),{key:c.value,name:c.value,class:"tab-panel"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{item:c,tab:c},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])],2))}}),[["__scopeId","data-v-80c4d829"]]),ig={class:"q-pa-md"},Sr=D(e.defineComponent({__name:"PTabsLeft",props:{buttons:{type:Array,default:()=>[]},tabsStore:{type:Object,required:!0}},emits:["select"],setup(n,{emit:t}){const o=n,i=t,r=a=>{o.tabsStore.Select(a),i("select")},s=e.ref(20);return(a,c)=>(e.openBlock(),e.createBlock(e.unref(x.QSplitter),{modelValue:e.unref(s),"onUpdate:modelValue":c[0]||(c[0]=l=>e.isRef(s)?s.value=l:null),class:"full-height"},{before:e.withCtx(()=>[e.createVNode(e.unref(x.QTabs),{vertical:"",class:"text-teal","model-value":n.tabsStore.value,"onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,l=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:l.value,name:l.value,label:l.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",ig,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(l,u)=>(e.openBlock(),e.createBlock(ne,{key:u,label:l.text,color:l.color,class:"q-mb-sm full-width",onClick:f=>l.action(l)},null,8,["label","color","onClick"]))),128))])]),after:e.withCtx(()=>[e.createVNode(e.unref(x.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"shadow-2 rounded-borders"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.GetItems(),l=>(e.openBlock(),e.createBlock(e.unref(x.QTabPanel),{key:l.value,name:l.value},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{item:l},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-a7a16408"]]);class ti{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","");d(this,"value","")}preSelect(){var o;const t=z.H.Router.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select((o=this.items[0])==null?void 0:o.value);return}this.Select(t)}static ToTab(t,o="",i=""){return{label:i,value:o,...t}}static Create(t,o){const i=new ti;return i.key=t,i.items=o,i.items.length&&i.preSelect(),i}Select(t){if(!this.items.length)return;if(t===void 0)return this.preSelect();this.idx=this.items.findIndex(i=>i.value===t),this.value=t;const o=this.GetValue();o&&z.H.Router.SetQueryParam(this.key,o)}GetMenu(){return this.items[this.idx]}GetComponent(){var t;return(t=this.items[this.idx])==null?void 0:t.component}GetValue(){var t;return(t=this.items[this.idx])==null?void 0:t.value}GetItems(){return this.items}}function Ra(n){n.component("PTabs",Cr),n.component("PTabsLeft",Sr)}const rg=Object.freeze(Object.defineProperty({__proto__:null,Contacts:hm,Forms:Lm,Menus:Gm,Schedule:Up,Table:ng,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:Cr,PTabsLeft:Sr,TabsStore:ti,default:Ra},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Aa=e.defineComponent({inheritAttrs:!1,__name:"PCheckBox",props:e.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:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{i("change",o.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-checkbox",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QCheckbox),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),sg={class:"row items-center justify-end"},ni="DD.MM.YYYY",oi=e.defineComponent({__name:"PDateInput",props:e.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},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const o=x.ClosePopup,i=n,r=t,s=e.useModel(n,"modelValue"),a=ni.replace(/[DMY]/g,"#"),c=e.ref(null),l=V=>{if(i.modelType){c.value=i.modelType;return}V instanceof Date?c.value="date":(typeof V=="string"&&V||c.value===null)&&(c.value="string")},u=V=>{if(!V)return"";if(V instanceof Date)return Number.isNaN(V.getTime())?"":x.date.formatDate(V,ni);const N=String(V).match(/^(\d{4})-(\d{2})-(\d{2})/);if(N)return`${N[3]}.${N[2]}.${N[1]}`;const C=new Date(V);return Number.isNaN(C.getTime())?"":x.date.formatDate(C,ni)},f=V=>{const N=V.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!N)return null;const C=+N[1],T=+N[2],y=+N[3];if(C<1||C>31||T<1||T>12||y<1900||y>2100)return null;const b=new Date(y,T-1,C);return b.getFullYear()!==y||b.getMonth()!==T-1||b.getDate()!==C?null:b},m=e.ref(u(s.value));l(s.value),e.watch(s,V=>{l(V);const N=u(V);N!==m.value&&(m.value=N)});const p=V=>{const N=typeof V=="number"?String(V):V;if(!N){const T=c.value==="date"?null:"";s.value=T,r("input",T);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(N))return;const C=f(N);if(C)if(c.value==="date")s.value=C,r("input",C);else{const T=C.getFullYear(),y=String(C.getMonth()+1).padStart(2,"0"),b=String(C.getDate()).padStart(2,"0"),$=`${T}-${y}-${b}`;s.value=$,r("input",$)}},k=()=>{r("blur",s.value)},E={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(V,N)=>(e.openBlock(),e.createBlock(Ze,{modelValue:e.unref(m),"onUpdate:modelValue":[N[1]||(N[1]=C=>e.isRef(m)?m.value=C:null),p],class:"fit",label:n.label,placeholder:n.placeholder,mask:e.unref(a),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,rules:n.rules,inputmode:"numeric",onBlur:k},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QDate),{modelValue:e.unref(m),"onUpdate:modelValue":N[0]||(N[0]=C=>e.isRef(m)?m.value=C:null),mask:ni,"today-btn":"",locale:E},{default:e.withCtx(()=>[e.createElementVNode("div",sg,[e.withDirectives(e.createVNode(ne,{label:"Готово",color:"primary",flat:""},null,512),[[e.unref(o)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:e.withCtx(()=>[e.renderSlot(V.$slots,"before")]),append:e.withCtx(()=>[e.renderSlot(V.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width","rules"]))}}),ag=e.defineComponent({inheritAttrs:!1,__name:"PDatePicker",props:e.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:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useModel(n,"modelValue"),r=c=>{const l=c.getFullYear(),u=String(c.getMonth()+1).padStart(2,"0"),f=String(c.getDate()).padStart(2,"0");return`${l}-${u}-${f}`},s=c=>{o("input",c instanceof Date?r(c):c??null)},a=()=>{o("blur")};return(c,l)=>(e.openBlock(),e.createBlock(oi,{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.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:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),append:e.withCtx(()=>[e.renderSlot(c.$slots,"right")]),_:3},8,["modelValue","label","placeholder","margin","padding"]))}}),lg={class:"row items-center justify-end"},cg={class:"row items-center justify-end"},za=e.defineComponent({__name:"PDateTimeInput",props:e.mergeModels({label:{type:String,default:"Дата и время"},placeholder:{type:String,default:"ДД.ММ.ГГГГ ЧЧ:мм"},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=x.ClosePopup,o=e.useModel(n,"modelValue"),i=e.ref(""),r=e.ref(""),s=e.ref(""),a=E=>E?x.date.formatDate(E,"DD.MM.YYYY HH:mm"):"",c=E=>{if(!E||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(E))return null;const V=x.date.extractDate(E,"DD.MM.YYYY HH:mm");return Number.isNaN(V.getTime())?null:V},l=E=>{o.value=E},u=E=>{const V=String(E??"");i.value=V.replace(/[_\s]/g,"")===""?"":V},f=()=>{const E=c(i.value);E?l(E):i.value===""?l(null):i.value=a(o.value)},m=()=>{if(r.value){const E=o.value?x.date.formatDate(o.value,"HH:mm"):"00:00",V=`${r.value} ${E}`,N=c(V);N&&(i.value=a(N),l(N))}r.value=""},p=()=>{if(s.value){const E=o.value?x.date.formatDate(o.value,"DD.MM.YYYY"):"",V=x.date.formatDate(new Date,"DD.MM.YYYY"),N=E?`${E} ${s.value}`:`${V} ${s.value}`,C=c(N);C&&(i.value=a(C),l(C))}s.value=""};e.watch(o,E=>{E!==c(i.value)&&(i.value=a(E??null))},{immediate:!0});const k={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(E,V)=>(e.openBlock(),e.createBlock(Ze,{"model-value":e.unref(i),label:n.label,placeholder:n.placeholder,disable:n.disable,readonly:n.readonly,error:n.error,"error-message":n.errorMessage,rules:n.rules,mask:"##.##.#### ##:##","fill-mask":"","onUpdate:modelValue":u,onBlur:f},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QDate),{modelValue:e.unref(r),"onUpdate:modelValue":V[0]||(V[0]=N=>e.isRef(r)?r.value=N:null),mask:"DD.MM.YYYY",locale:k},{default:e.withCtx(()=>[e.createElementVNode("div",lg,[e.withDirectives(e.createVNode(ne,{label:"OK",color:"primary",flat:"",onClick:m},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"access_time",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QTime),{modelValue:e.unref(s),"onUpdate:modelValue":V[1]||(V[1]=N=>e.isRef(s)?s.value=N:null),mask:"HH:mm",format24h:"",locale:k},{default:e.withCtx(()=>[e.createElementVNode("div",cg,[e.withDirectives(e.createVNode(ne,{label:"OK",color:"primary",flat:"",onClick:p},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model-value","label","placeholder","disable","readonly","error","error-message","rules"]))}}),dg=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"flex-line flex",style:e.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})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-71357bc9"]]),ug={key:0,class:"p-form__actions row justify-end q-gutter-sm q-mt-md"},fg=D(e.defineComponent({name:"PForm",__name:"PForm",props:e.mergeModels({greedy:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},noErrorFocus:{type:Boolean,default:!1},noResetFocus:{type:Boolean,default:!1}},{valid:{type:Boolean,default:void 0},validModifiers:{}}),emits:e.mergeModels(["submit","reset","validation-success","validation-error"],["update:valid"]),setup(n,{expose:t,emit:o}){const i=o,r=e.useModel(n,"valid"),s=e.ref(!0),a=C=>{s.value=C,r.value!==void 0&&(r.value=C)},c=e.ref(),l=()=>{a(!0),i("validation-success")},u=()=>{a(!1),i("validation-error")},f=C=>{i("submit",C)},m=()=>{var C;(C=c.value)==null||C.resetValidation(),a(!0),i("reset")},p=async()=>{var T;const C=await((T=c.value)==null?void 0:T.validate())??!1;return a(C),C},k=()=>{var C;(C=c.value)==null||C.resetValidation(),a(!0)};return t({validate:p,resetValidation:k,focus:()=>{var C;return(C=c.value)==null?void 0:C.focus()},submit:C=>{var T;return(T=c.value)==null?void 0:T.submit(C)},reset:C=>{var T;return(T=c.value)==null?void 0:T.reset(C)}}),(C,T)=>(e.openBlock(),e.createBlock(e.unref(x.QForm),{ref_key:"qFormRef",ref:c,greedy:n.greedy,autofocus:n.autofocus,"no-error-focus":n.noErrorFocus,"no-reset-focus":n.noResetFocus,class:"p-form",onSubmit:f,onReset:m,onValidationSuccess:l,onValidationError:u},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"default",{},void 0,!0),C.$slots.actions?(e.openBlock(),e.createElementBlock("div",ug,[e.renderSlot(C.$slots,"actions",{valid:e.unref(s),validate:p,resetValidation:k},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["greedy","autofocus","no-error-focus","no-reset-focus"]))}}),[["__scopeId","data-v-a64ba3d2"]]),mg={class:"p-hint-popup"},kr=D(e.defineComponent({__name:"PHint",props:{text:{}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.text?(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:i[0]||(i[0]=e.withModifiers(r=>t.value=!0,["stop"]))},{default:e.withCtx(()=>[e.createVNode(tt,{anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"320px"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QMenu),{modelValue:e.unref(t),"onUpdate:modelValue":i[1]||(i[1]=r=>e.isRef(t)?t.value=r:null),anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"340px"},{default:e.withCtx(()=>[e.createElementVNode("div",mg,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),hg=e.defineComponent({__name:"PInputDate",props:e.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:e.mergeModels(["update:modelValue","change","beforeChange","input"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useModel(n,"modelValue");let r=null;const s=c=>{o("input",c),r=c instanceof Date?c:null},a=()=>{r instanceof Date&&(o("beforeChange",r),o("change",r),r=null)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"style-container",style:e.normalizeStyle({width:n.width,position:"relative"})},[e.createVNode(oi,{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.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))}}),pg=D(e.defineComponent({__name:"IconMinus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),gg=D(e.defineComponent({__name:"IconPlus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.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"]]),yg=e.defineComponent({inheritAttrs:!1,__name:"PInputNumber",props:e.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},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useAttrs(),r=e.computed(()=>typeof i.id=="string"?i.id:void 0),s=e.computed(()=>{const $={};for(const R of Object.keys(i))R!=="id"&&($[R]=i[R]);return $}),a=n,c=()=>{const $=a.step.toString();return $.includes(".")?$.split(".")[1].length:0},l=c(),u=e.useModel(n,"modelValue"),m=($=>Math.min(Math.max($,a.min),a.max))(u.value);m!==u.value&&(u.value=m);const p=e.ref(m.toFixed(c())),k=e.computed(()=>{const $={};return a.margin&&($.margin=a.margin),a.padding&&($.padding=a.padding),$}),E=$=>{const R=Math.pow(10,l);return Math.round($*R)/R},V=($,...R)=>{u.value=E($),p.value=E($).toFixed(c()),R.forEach(j=>o(j,u.value))},N=($,...R)=>{a.disabled||$>a.max||$<a.min||V($,...R)},C=()=>N(+p.value+a.step,"change"),T=()=>N(+p.value-a.step,"change"),y=$=>N(Number($),"input"),b=()=>N(+p.value,"change","blur");return($,R)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps(e.unref(s),{for:e.unref(r),"model-value":e.unref(p),label:n.label||void 0,rules:n.rules,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:e.unref(k),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":y,onBlur:b}),{before:e.withCtx(()=>[e.createVNode(e.unref(x.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:T},{default:e.withCtx(()=>[e.createVNode(pg)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(x.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:C},{default:e.withCtx(()=>[e.createVNode(gg)]),_:1})]),_:1},16,["for","model-value","label","rules","disable","input-style","style"]))}}),wg=D(yg,[["__scopeId","data-v-1aec76d0"]]),bg=D(e.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:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.shift?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({minWidth:n.widthClosed,maxWidth:n.widthClosed,height:n.height})},null,4)),e.createElementVNode("div",{class:"LS-body",style:e.normalizeStyle({marginLeft:e.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})},[e.createElementVNode("div",{class:"LS-content",style:e.normalizeStyle({width:`calc(100% - ${n.widthClosed})`,height:n.height,background:"#ffffff"})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4),e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{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=e.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(t,o)=>(e.openBlock(),e.createBlock(e.unref(x.QList),{tag:"ul",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),Sg=e.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(t,o)=>(e.openBlock(),e.createBlock(e.unref(x.QItem),{tag:"li",style:e.normalizeStyle({margin:n.margin,padding:n.padding,borderBottom:n.showDivider?"1px solid":"none",background:n.background})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),Da=e.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var c;const t=n,o=((c=t.storeOpts)==null?void 0:c.Options)??[],i=e.ref(o);async function r(l,u,f,m){var V,N;const k="set"+(((V=u[0])==null?void 0:V.toUpperCase())+u.slice(1)),E=l[k];typeof E=="function"?E(f):(l[u]=f,l[u+"Id"]=f==null?void 0:f.id),await((N=m==null?void 0:m.Update)==null?void 0:N.call(m,l))}const s=(l,u)=>{if(l===""){u(()=>{i.value=o});return}u(()=>{i.value=o.filter(f=>z.H.Strings.SearchInFields(l,[f.label]))})},a=async l=>{l?(await t.storeOpts.Get(l.value),await r(t.item,t.prop,t.storeOpts.Item,t.store)):await r(t.item,t.prop,void 0,t.store)};return e.onBeforeMount(async()=>{o.length>0||await t.storeOpts.GetOptions(t.optLabel,t.optValue)}),(l,u)=>(e.openBlock(),e.createBlock(wo,{"use-input":"",options:e.unref(i),"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:e.withCtx(()=>[e.createVNode(kr,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),kg=e.defineComponent({__name:"PRadio",props:e.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:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=n,s=()=>{i("change",r.value)};return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:"p-radio",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QRadio),{modelValue:o.value,"onUpdate:modelValue":[c[0]||(c[0]=l=>o.value=l),s],val:n.value,name:n.name,label:n.label||void 0,size:n.size,style:e.normalizeStyle({fontSize:n.fontSize})},null,8,["modelValue","val","name","label","size","style"])],4))}}),xg=D(e.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:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"wrapper",style:e.normalizeStyle({maxHeight:n.height,height:n.height})},[e.createElementVNode("div",{class:"content",style:e.normalizeStyle({paddingRight:n.shift?"0":`${n.widthClosed}`})},[e.renderSlot(a.$slots,"content",{},void 0,!0)],4),e.createElementVNode("div",{class:"RS-body",style:e.normalizeStyle({marginRight:e.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"})},[e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"]),e.createElementVNode("div",{class:"RS-content",style:e.normalizeStyle({width:`calc(${n.widthOpened} - ${n.widthClosed} - 2px)`,background:n.background,height:n.height})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4)],4)],4)}}}),[["__scopeId","data-v-8ab50ea6"]]),Eg=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"sticky-block",style:e.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})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4748d546"]]),Fa=D(e.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>t.row[t.prop]),i=async()=>{t.row[t.prop]=!t.row[t.prop],await t.store.Update(t.row)};return(r,s)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["toggle-cell",{clickable:!t.readonly}]),onClick:s[0]||(s[0]=a=>t.readonly?void 0:i())},[e.createVNode(e.unref(x.QIcon),{name:e.unref(o)?"check_circle":"radio_button_unchecked",color:e.unref(o)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),e.createVNode(tt,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),Bg=D(e.defineComponent({inheritAttrs:!1,__name:"PTextarea",props:e.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},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue"),o=e.useAttrs(),i=e.computed(()=>typeof o.id=="string"?o.id:void 0),r=e.computed(()=>{const l={};for(const u of Object.keys(o))u!=="id"&&(l[u]=o[u]);return l}),s=n,a=e.computed(()=>({color:s.color||void 0,resize:s.resize})),c=e.computed(()=>{const l={};return s.margin&&(l.margin=s.margin),s.padding&&(l.padding=s.padding),s.borderColor&&(l["--p-border-color"]=s.borderColor),l});return(l,u)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=f=>t.value=f)},e.unref(r),{for:e.unref(i),label:n.label||void 0,mask:n.mask,rules:n.rules,type:"textarea","input-style":e.unref(a),style:e.unref(c),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>l.$emit("input",t.value)),onBlur:u[2]||(u[2]=f=>l.$emit("blur",t.value)),onFocus:u[3]||(u[3]=f=>l.$emit("focus",t.value))}),{before:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),append:e.withCtx(()=>[e.renderSlot(l.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","rules","input-style","style"]))}}),[["__scopeId","data-v-4cbcc0ca"]]),Oa=e.defineComponent({inheritAttrs:!1,__name:"PToggle",props:e.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:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{i("change",o.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-toggle",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QToggle),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),Vg={class:"top-slider-content"},Ng={class:"center"},$g=D(e.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:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?"0":`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`,height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Vg,[e.createElementVNode("div",Ng,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},void 0,!0)]),_:3},8,["style"])],4)],64))}}),[["__scopeId","data-v-88b1978e"]]);function Tg(n){n.component("PButton",ne),n.component("PBadge",uo),n.component("PCheckBox",Aa),n.component("PChip",ur),n.component("PDateInput",oi),n.component("PDatePicker",ag),n.component("PDateTimeInput",za),n.component("PDialog",un),n.component("PFlex",dg),n.component("PForm",fg),n.component("PHint",kr),n.component("PInput",Ze),n.component("PInputDate",hg),n.component("PInputNumber",wg),n.component("PLeftSlider",bg),n.component("PList",Cg),n.component("PListItem",Sg),n.component("POptionsListSingle",ei),n.component("POpts",Da),n.component("PRadio",kg),n.component("PRightSlider",xg),n.component("PSelect",wo),n.component("PSticky",Eg),n.component("PString",Ji),n.component("PTextarea",Bg),n.component("PTopSlider",$g),n.component("PTableToggle",Fa),n.component("PToggle",Oa),n.component("PTooltip",tt)}const Pg={key:0,class:"mainblock"},Mg={class:"mainblock-right"},Ig={class:"body"},Rg=D(e.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(n){const t=n,o=e.ref(!1),i=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{i.value=!i.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.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}),o.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",Pg,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,maxWidth:e.unref(r)?"100%":n.menuWidth,marginLeft:e.unref(r)?"-110%":"0",position:e.unref(r)?"fixed":"relative",top:e.unref(r)?"140px":""})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"auto":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!e.unref(i)&&e.unref(r)?"110%":"0",borderTopLeftRadius:e.unref(r)?"0":"",borderBottomLeftRadius:e.unref(r)?"0":""}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Mg,[a.$slots.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"title",style:e.normalizeStyle({display:a.$slots.title?"flex":"none"})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",Ig,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),Ag={class:"mainblock-right"},zg={class:"body"},Dg=D(e.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 t=n,o=e.ref(!1),i=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{i.value=!i.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.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}),o.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mainblock",style:e.normalizeStyle({display:e.unref(r)?"block":"flex"})},[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,display:n.leftWidth!=="0px"?"flex":"none",top:e.unref(r)?"58px":"80px"})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!e.unref(i)&&e.unref(r),"0"),overflowX:e.unref(r)?"scroll":"hidden",display:e.unref(r)?"flex":"block",background:e.unref(r)?"#ffffff":"",overflowY:e.unref(r)?"hidden":"auto"}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Ag,[e.createElementVNode("div",{class:"title",style:e.normalizeStyle({position:n.titleSticky?"sticky":"relative",top:n.titleSticky?e.unref(r)?"108px":"58px":"0",zIndex:n.titleSticky?"10":""})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4),e.createElementVNode("div",zg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),La=D(e.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 e.useCssVars(t=>({d143e9f0:n.maxWidth,b9d56180:n.width,v52bd0ff4:n.background,v1795aeac:n.gridGap,v0cfa7c52:n.gridTemplateColumns,v0c6d2a1f:n.gridTemplateRows,a3ccd918:n.margin})),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid-block",n.customClass])},[e.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]),Fg={class:"container"},Og={class:"slide-box"},Lg={class:"image"},_g={class:"image-box"},Hg=["id","src","alt"],Ug={class:"link-number"},vg=["id","onClick"],qg=D(e.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){e.useCssVars(k=>({v582c9d05:o}));const t=n,o=`${t.animationTime}ms`,i=e.ref(t.startActiveGroupIndex),r=e.ref(Bt.None),s=e.ref(Js(t.events,t.quantity)),a=e.computed(()=>s.value[i.value]);e.onMounted(()=>{});const c=()=>i.value=i.value+1<s.value.length?i.value+1:0,l=()=>i.value=i.value-1<0?s.value.length-1:i.value-1,u=k=>{r.value=k,setTimeout(()=>r.value=Bt.None,t.animationTime)},f=k=>{k!=i.value&&(u(k<i.value?Bt.Prev:Bt.Next),setTimeout(()=>i.value=k,t.animationTime/2))},m=()=>{u(Bt.Next),setTimeout(c,t.animationTime/2)},p=()=>{u(Bt.Prev),setTimeout(l,t.animationTime/2)};return(k,E)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",Fg,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:E[0]||(E[0]=e.withModifiers(V=>p(),["stop"]))},[...E[3]||(E[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",Og,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(V,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,class:e.normalizeClass({animationnext:e.unref(r)===e.unref(Bt).Next,animationprev:e.unref(r)===e.unref(Bt).Prev})},[e.createElementVNode("div",Lg,[e.createElementVNode("div",_g,[e.createElementVNode("img",{id:V.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:V.fileInfo.getImageUrl(),alt:V.fileInfo.originalName,onClick:E[1]||(E[1]=C=>k.showImageInFullScreen())},null,12,Hg)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:E[2]||(E[2]=e.withModifiers(V=>m(),["stop"]))},[...E[4]||(E[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",Ug,[e.createVNode(La,{"grid-template-columns":"repeat(auto-fit, minmax(26px, 1fr))","grid-gap":"5px",margin:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(V,N)=>(e.openBlock(),e.createElementBlock("div",{id:N.toString(),key:N,class:"number",style:e.normalizeStyle({background:N.toString()===e.unref(i).toString()?"#9D9D9D":""}),onClick:e.withModifiers(C=>f(N),["stop"])},e.toDisplayString(N+1),13,vg))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),jg=e.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.x),s=e.ref(o.y),a=e.computed(()=>r.value+"px"),c=e.computed(()=>s.value+"px"),l=()=>{i("close")};return(u,f)=>{const m=e.resolveDirective("click-outside");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"context-window",style:e.normalizeStyle({left:e.unref(a),top:e.unref(c)})},[e.renderSlot(u.$slots,"default")],4)),[[m,l]])}}}),Wg={class:"drop-item"},Gg={key:0,class:"drop-item-list"},Qg=D(e.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const t=n,o=e.ref(t.rolledUp),i=async()=>{o.value=!o.value};return(r,s)=>{const a=e.resolveComponent("PString"),c=e.resolveComponent("IconArrowDrop");return e.openBlock(),e.createElementBlock("div",Wg,[e.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=l=>i())},[e.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"]),e.createElementVNode("div",{style:e.normalizeStyle({transform:e.unref(o)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[e.createVNode(c,{size:"10px",margin:"0"})],4)]),e.unref(o)?(e.openBlock(),e.createElementBlock("div",Gg,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),Yg=e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Ni,required:!0}},emits:["load"],setup(n,{emit:t}){const o=n,i=e.ref(!1),r=t,s=()=>{o.model.setBoolean(i.value),i.value?z.F.FTSP.Get().setF(o.model):z.F.FTSP.Get().removeF(o.model),r("load")};return(a,c)=>{const l=e.resolveComponent("PCheckBox");return e.openBlock(),e.createBlock(l,{modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=u=>e.isRef(i)?i.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),Xg=D(e.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const o=t,i=e.ref(void 0),r=async a=>{ut.Get().replaceF(a,i.value),i.value=a,ut.Get().p.drop()},s=async a=>{await r(a),o("load")};return(a,c)=>{const l=e.resolveComponent("PString"),u=e.resolveComponent("PButton"),f=e.resolveComponent("GridContainer"),m=e.resolveComponent("InfoItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(l,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),e.createVNode(m,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:e.withCtx(()=>[...c[0]||(c[0]=[])]),default:e.withCtx(()=>[e.createVNode(f,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(p,k)=>(e.openBlock(),e.createBlock(u,{key:k,color:"blue",height:"auto",text:p.label,"is-toggle":p.valueEq(e.unref(i)),"toggle-mode":!0,inverse:n.inverse,onClick:E=>s(p.valueEq(e.unref(i))?void 0:p)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-949e92b5"]]),Zg=["value","label"],Jg=D(e.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const o=t,i=ut.Get(),r=e.ref(void 0),s=async c=>{i.replaceF(c,r.value),r.value=c},a=async c=>{c?await s(r.value):await s(void 0),o("load")};return(c,l)=>{const u=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(u,{modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=f=>e.isRef(r)?r.value=f:null),clearable:e.unref(r),placeholder:n.defaultLabel,onChange:a},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(f,m)=>(e.openBlock(),e.createElementBlock("option",{key:m,value:f,label:f.label},null,8,Zg))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-fec113c5"]]),Kg=D(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,o)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-963d049b"]]),e1=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:"general-block-item",style:e.normalizeStyle({background:n.background,height:n.height,width:n.width,borderColor:n.borderColor,padding:n.padding,margin:n.margin,transform:n.scale&&e.unref(t)?"scale(1.03, 1.03)":""}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[e.createElementVNode("div",{class:"green",style:e.normalizeStyle({width:`${n.ready}`})},null,4),e.createElementVNode("div",{class:"general-block-item-title",style:e.normalizeStyle({fontSize:n.fontSize})},[e.renderSlot(o.$slots,"general-item",{},void 0,!0)],4),e.createElementVNode("div",{class:"tools-icon",style:e.normalizeStyle({display:n.withIcon?"flex":"none"})},[...i[2]||(i[2]=[e.createElementVNode("svg",{class:"icon-del"},[e.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[e.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"]]),t1={key:0,class:"blur"},n1={style:{display:"flex","justify-content":"center"}},o1=D(e.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:t}){const o=n,i=t,r=o.customClass!==""?o.customClass:"inside-class",s=e.ref(!1),a=e.ref(!1),c=e.ref(!1),l=e.ref(o.close);e.watch(()=>o.close,()=>{a.value=!1});const u=b=>{b.stopPropagation(),b.key==="Escape"&&(o.showSaveDialog?c.value=!0:a.value=!1)};e.watch(a,async()=>{var b,$;await e.nextTick(),a.value?(($=(b=document.getElementById("info-item-opened-content"))==null?void 0:b.querySelector("input"))==null||$.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&i("after-close")});const f=()=>{i("click"),a.value=!!o.withOpenWindow,l.value!==o.close&&(a.value=!1,l.value=!l.value)},m=e.computed(()=>o.customClass===""?{width:o.width,minHeight:"40px",height:"auto",maxWidth:o.maxWidth,minWidth:o.minWidth,margin:o.baseBoxMargin}:void 0),p=e.computed(()=>a.value&&o.withOpenWindow),k=e.computed(()=>({background:o.background?o.background:void 0,zIndex:p.value?"2":"0",padding:p.value?"0":o.padding,margin:o.margin,width:p.value?o.openWidth:o.width,height:p.value?o.openHeight:o.height,minHeight:"40px",maxWidth:o.maxWidth,minWidth:o.minWidth,borderColor:s.value||a.value?o.colorSelected:o.borderColor,color:s.value?o.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${o.colorSelected}`:"none",alignItems:p.value?"end":"center",cursor:(o.withHover,"pointer")})),E=e.computed(()=>({height:p.value?"0":"",overflow:o.closeWindowOverflow,width:o.width})),V=e.computed(()=>({height:p.value?"auto":"0"})),N=e.computed(()=>({color:s.value?o.colorSelected:"#343E5C",fill:s.value?o.colorSelected:"#343E5C",background:o.background})),C=()=>{o.showSaveDialog?c.value=!0:a.value=!1},T=async()=>{await i("keyup-enter"),o.close&&(a.value=!1),c.value=!1},y=()=>{a.value=!1,c.value=!1};return(b,$)=>{const R=e.resolveComponent("PString"),j=e.resolveComponent("PButton"),se=e.resolveComponent("PModal"),ze=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",t1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(m)),onClick:$[2]||($[2]=e.withModifiers(Te=>f(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(k)),onMouseenter:$[0]||($[0]=Te=>n.withHover?s.value=!0:s.value=!1),onMouseleave:$[1]||($[1]=Te=>s.value=!1)},[e.unref(a)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["close-window",n.customClass]),style:e.normalizeStyle(e.unref(E))},[e.renderSlot(b.$slots,"default",{},void 0,!0)],6)),e.unref(a)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:e.normalizeStyle(e.unref(V))},[e.renderSlot(b.$slots,"open-inside-content",{},void 0,!0)],4)),[[ze,C,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(N))},[e.renderSlot(b.$slots,"title",{},()=>[e.createVNode(R,{string:n.title,"font-size":"10px",padding:"0 0 0 3px",style:e.normalizeStyle({color:e.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),e.createVNode(se,{show:e.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",n1,[e.createVNode(j,{text:"Не сохранять",onClick:y}),e.createVNode(j,{text:"Сохранять",onClick:T})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-999853f7"]]),i1=D(e.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:t}){const o=e.ref(!1),i=t,r=s=>{o.value=!o.value,i("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(u,{close:e.unref(o),title:n.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,f=>(e.openBlock(),e.createBlock(l,{key:f,type:"admin",color:"blue",text:f,onClick:m=>r(f)},null,8,["text","onClick"]))),128)),e.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:e.withCtx(()=>[e.createVNode(c,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),r1={class:"mainblock"},s1={class:"mainline"},a1=D(e.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",r1,[e.createElementVNode("div",s1,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:n.leftWidth,maxWidth:n.leftWidth,background:n.background,display:n.leftWidth!=="0px"?"block":"none"})},[e.renderSlot(t.$slots,"left",{},void 0,!0)],4),e.createElementVNode("div",{class:"mainblock-right",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),_a=D(e.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),l1={class:"search-list"},c1=["onClick"],Ha=D(e.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:t}){const o=t,i=n,r=e.ref(i.modelValue),s=e.ref([]);async function a(){o("input",r.value),await c()}async function c(){i.searchFunc&&(s.value=await i.searchFunc(r.value))}async function l(u){r.value="",o("select",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle({width:n.width})},[e.createVNode(Ze,{modelValue:e.unref(r),"onUpdate:modelValue":f[0]||(f[0]=m=>e.isRef(r)?r.value=m:null),placeholder:"Найти",onInput:a},{right:e.withCtx(()=>[e.createVNode(_a,{size:"24px"})]),_:1},8,["modelValue"]),e.unref(r)&&e.unref(r).length>=2?(e.openBlock(),e.createElementBlock("div",{key:0,class:"result",style:e.normalizeStyle({maxHeight:n.maxHeightResultList,zIndex:n.zIndexResultList,boxShadow:n.boxShadowResultList})},[e.createElementVNode("ul",l1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>(e.openBlock(),e.createElementBlock("li",{key:m.value,onClick:p=>l(m)},e.toDisplayString(m.label),9,c1))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),d1=D(e.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=async()=>{};return(i,r)=>{const s=e.resolveComponent("PInput");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(s,{modelValue:t.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value.number=a),onBlur:o},null,8,["modelValue"]),e.createVNode(s,{modelValue:t.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>t.value.description=a),onBlur:o},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-8479448f"]]),u1={style:{display:"flex","justify-content":"center",width:"100%"}},f1={class:"pag-number"},m1={class:"pag-ul"},h1={key:2},p1=D(e.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},setup(n){const t=n,o=m=>m?"active":"neutral",i=m=>m?"not-active":"neutral",r=e.ref(Ks),s=e.ref(!1),a=e.ref(!1);r.value.count=t.store.Count.value,e.watch(t.store.Count,()=>{r.value.count=t.store.Count.value});const c=async m=>{if(m!==r.value.curPage&&(m<1&&(m=1),m>r.value.pagesCount()&&(m=r.value.pagesCount()),!t.showConfirm))return await l(m)},l=async(m,p)=>{r.value.setCurPage(m),ut.Get().p.offset=(m-1)*r.value.limit,await t.store.FTSP(),f()},u=e.computed(()=>{const m=r.value.pagesCount();return m<8?Dt.GenerateNumsRange(2,m-1).filter(p=>p<m&&p>1):Dt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(p=>p<m&&p>1)}),f=()=>{const m=document.querySelector(".el-table__body-wrapper"),p=document.querySelector("#list");m?m.scrollTo({top:0}):p&&p.scrollTo({top:0})};return e.onBeforeUnmount(()=>{ut.Get().p.drop()}),(m,p)=>{const k=e.resolveComponent("ArrowLeft"),E=e.resolveComponent("PButton"),V=e.resolveComponent("DoubleArrowLeft"),N=e.resolveComponent("EllipsisSvg"),C=e.resolveComponent("DoubleArrowRight"),T=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",u1,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",f1,[e.createVNode(E,{skin:"pag",type:i(e.unref(r).curPage===1),onClick:p[0]||(p[0]=y=>c(e.unref(r).curPage-1))},{default:e.withCtx(()=>[e.createVNode(k)]),_:1},8,["type"]),e.createElementVNode("ul",m1,[e.createElementVNode("li",null,[e.createVNode(E,{skin:"pag",type:o(e.unref(r).curPage===1),text:"1",onClick:p[1]||(p[1]=y=>c(1))},null,8,["type"])]),e.unref(r).pagesCount()>8&&e.unref(r).curPage>4?(e.openBlock(),e.createElementBlock("li",{key:0,onMouseenter:p[3]||(p[3]=y=>s.value=!0),onMouseleave:p[4]||(p[4]=y=>s.value=!1)},[e.createVNode(E,{skin:"pag",type:"neutral",onClick:p[2]||(p[2]=y=>c(e.unref(r).curPage-5))},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(V,{key:0})):(e.openBlock(),e.createBlock(N,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),y=>(e.openBlock(),e.createElementBlock("li",{key:y},[e.createVNode(E,{skin:"pag",type:o(y===e.unref(r).curPage),text:y,onClick:b=>c(y)},null,8,["type","text","onClick"])]))),128)),e.unref(r).pagesCount()>=8&&e.unref(r).curPage<e.unref(r).pagesCount()-3?(e.openBlock(),e.createElementBlock("li",{key:1,onMouseenter:p[6]||(p[6]=y=>a.value=!0),onMouseleave:p[7]||(p[7]=y=>a.value=!1)},[e.createVNode(E,{skin:"pag",type:"neutral",onClick:p[5]||(p[5]=y=>c(e.unref(r).curPage+5))},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(C,{key:0})):(e.openBlock(),e.createBlock(N,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",h1,[e.createVNode(E,{skin:"pag",type:o(e.unref(r).pagesCount()===e.unref(r).curPage),text:e.unref(r).pagesCount(),onClick:p[8]||(p[8]=y=>c(e.unref(r).pagesCount()))},null,8,["type","text"])])):e.createCommentVNode("",!0)]),e.createVNode(E,{skin:"pag",type:i(e.unref(r).curPage===e.unref(r).pagesCount()),onClick:p[9]||(p[9]=y=>c(e.unref(r).curPage+1))},{default:e.withCtx(()=>[e.createVNode(T)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),g1=D(e.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:t}){const o=n,i=t,r=e.ref(o.modelValue),s=e.ref();let a=Zi.SearchModel();e.watch(()=>o.focus,()=>{o.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async f=>{if(f.length<2)return;s.value.activated=!0,a=Zi.SearchModel(),a.searchObjects=[],a.query=f,a.key=o.keyValue;const m=a.searchGroups.find(p=>p.key===o.keyValue);return m&&(a.searchGroup=m),await aa.Search.Search(a),a.searchObjects},l=async f=>{i("select",f),r.value=""},u=f=>{i("input",f),f.length===0&&i("input","")};return(f,m)=>(e.openBlock(),e.createBlock(Ha,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":m[0]||(m[0]=p=>e.isRef(r)?r.value=p: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":c,"trigger-on-focus":n.showSuggestions,suggestions:e.unref(a).searchObjects,onSelect:l,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-46a1d0c0"]]),y1={class:"mainblock-body"},w1={class:"mainblock-footer"},b1=D(e.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({background:n.background,padding:n.padding})},[e.createElementVNode("div",{class:"mainblock-header",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"header",{},void 0,!0)],4),e.createElementVNode("div",y1,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",w1,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),C1={class:"right-slider-content"},S1={class:"right-slider-content-header"},k1={class:"right-slider-content-box"},x1={class:"right-slider-button"},E1=D(e.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:t}){const o=n,i=t,r=e.ref(!1);e.watch(()=>o.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("toggle",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"right-slider",style:e.normalizeStyle({marginRight:e.unref(r)?`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`:"0",width:n.sliderOnWidth})},[e.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),e.createElementVNode("div",C1,[e.createElementVNode("div",S1,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",k1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",x1,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),B1={class:"mainblock"},V1={class:"body-block"},N1={class:"tab-block"},$1=D(e.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:t}){const o=n,i=t,r=e.ref(!1),s=e.ref(window.matchMedia("(max-width: 768px)").matches),a=l=>{i("toggle",l)},c=e.ref(!1);return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(o.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}),(l,u)=>(e.openBlock(),e.createElementBlock("div",B1,[e.createElementVNode("div",{class:"slider-block",style:e.normalizeStyle({marginRight:e.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"})},[e.createElementVNode("div",{class:"slider-icon",style:e.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=>c.value=!0),onMouseleave:u[2]||(u[2]=f=>c.value=!1)},[e.createElementVNode("div",{class:"icon-block",style:e.normalizeStyle({transform:e.unref(c)?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"})},[e.renderSlot(l.$slots,"icon",{},void 0,!0)],4)],36),e.createElementVNode("div",{class:"slider-info",style:e.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[e.renderSlot(l.$slots,"slider-body",{},void 0,!0)],4)],4),e.createElementVNode("div",V1,[e.renderSlot(l.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",N1,[e.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),T1=["label","value"],P1=D(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const o={[We.String]:"Текстовый ответ",[We.Text]:"Развёрнутый текстовый ответ",[We.Number]:"Числовой ответ",[We.Date]:"Ответ в виде даты",[We.Radio]:"Выбор одного из вариантов",[We.Set]:"Выбор нескольких вариантов",[We.File]:"Ответ в виде файла",[We.MatrixRadio]:"Матрица с одним выбором",[We.MatrixSet]:"Матрица с несколькими выборами"},i=t,r=s=>{i("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PSelect");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),e.createVNode(l,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(u,f)=>e.createElementVNode("option",{key:u,label:u,value:f},null,8,T1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),M1=["label","value"],I1=D(e.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=e.ref();e.onBeforeMount(()=>{o.value=!0,r.value=dn.GetDefault()});const s=async c=>{r.value=c??dn.GetDefault(),i("load")},a=async c=>{await s(c)};return(c,l)=>{var f;const u=e.resolveComponent("PSelect");return e.unref(o)?(e.openBlock(),e.createBlock(u,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=m=>e.isRef(r)?r.value=m:null),"popper-append-to-body":!1,clearable:!((f=e.unref(r))!=null&&f.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=m=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(dn).Get(),(m,p)=>(e.openBlock(),e.createElementBlock("option",{key:p,label:m.label,value:m},null,8,M1))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-dbb21f2f"]]),R1=["label","value"],A1=D(e.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const o=t,i=e.ref();e.onBeforeMount(()=>{i.value=dn.GetDefault()});const r=async a=>{a||(i.value=dn.GetDefault()),ut.Get().setSortModel(i.value),ut.Get().p.drop(),o("load")},s=async a=>{await r(a)};return(a,c)=>{var u;const l=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(l,{modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=f=>e.isRef(i)?i.value=f:null),"popper-append-to-body":!1,clearable:!((u=e.unref(i))!=null&&u.default),"value-key":"label",onChange:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(dn).Get(),(f,m)=>(e.openBlock(),e.createElementBlock("option",{key:m,label:f.label,value:f},null,8,R1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-fd5da1fc"]]),z1={class:"switch-container"},D1={class:"line"},F1={class:"line"},O1=D(e.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(n,{emit:t}){const o=n,i={background:"inherit",border:"1px solid #c4c4c4"},r=()=>o.firstModel.valueEq(u.value)?void 0:i,s=()=>u.value?i:void 0,a=()=>o.secondModel.valueEq(u.value)?void 0:i,c=m=>{var k;return{color:(k=u.value)!=null&&k.valueEq(m)?"#006bb4":"#B0A4C0"}},l=t,u=e.ref(void 0),f=async m=>{var p;(p=u.value)!=null&&p.valueEq(m)||(u.value=m,l("load"))};return(m,p)=>{const k=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",z1,[e.createElementVNode("div",D1,[e.createVNode(k,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.firstModel)),onClick:p[0]||(p[0]=E=>f(n.firstModel))},null,8,["string","style"]),e.createVNode(k,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(c()),onClick:p[1]||(p[1]=E=>f())},null,8,["style"]),e.createVNode(k,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.secondModel)),onClick:p[2]||(p[2]=E=>f(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",F1,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(r()),onClick:p[3]||(p[3]=E=>f(n.firstModel))},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob2",{active:!e.unref(u)}]),style:e.normalizeStyle(s()),onClick:p[4]||(p[4]=E=>f())},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(a()),onClick:p[5]||(p[5]=E=>f(n.secondModel))},null,6),p[6]||(p[6]=e.createElementVNode("div",{class:"switch-axis"},null,-1)),p[7]||(p[7]=e.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),p[8]||(p[8]=e.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),p[9]||(p[9]=e.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),L1={},_1={class:"flex"};function H1(n,t){return e.openBlock(),e.createElementBlock("div",_1,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const U1=D(L1,[["render",H1],["__scopeId","data-v-5023d414"]]),v1=D(e.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=async()=>{i("submit"),o.value=!o.value};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("GridContainer"),f=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(f,{title:n.title,icon:"edit-title","with-hover":!0,close:e.unref(o),width:"100%",onKeyupEnter:r},{"open-inside-content":e.withCtx(()=>[e.createVNode(u,{"custom-class":"grid"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},void 0,!0),e.createVNode(l,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:e.withCtx(()=>[n.content.length>0?(e.openBlock(),e.createBlock(c,{key:0,string:n.content},null,8,["string"])):(e.openBlock(),e.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-65abc352"]]),q1={class:"top-slider-content"},j1={class:"center"},W1=D(e.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:t}){const o=n,i=t,r=e.ref(!0);e.watch(()=>o.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("toggle",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`:"0",height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",q1,[e.createElementVNode("div",j1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",{class:"click-line",style:e.normalizeStyle({height:n.sliderOffHeight}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},[e.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function G1(n){n.component("PageNotFound",Ys),n.component("AdaptiveContainer",Rg),n.component("AdaptiveContainerHorizontal",Dg),n.component("CarouselImages",qg),n.component("ContextWindow",jg),n.component("DropList",Qg),n.component("FilterCheckbox",Yg),n.component("FiltersButtonsSelect",Xg),n.component("FilterSelect",Jg),n.component("FTSPPanel",Kg),n.component("GeneralItem",e1),n.component("GridContainer",La),n.component("InfoItem",o1),n.component("InfoItemSelectButtons",i1),n.component("LeftRightContainer",a1),n.component("PAutocomplete",Ha),n.component("PhoneForm",d1),n.component("PPagination",p1),n.component("RemoteSearch",g1),n.component("ResearcheContainer",b1),n.component("RightSliderContainer",E1),n.component("RightTabsContainer",$1),n.component("SelectValueType",P1),n.component("SortList",I1),n.component("SortSelect",A1),n.component("Switch3Pos",O1),n.component("ThemeWrapper",U1),n.component("ToggleInfoItem",v1),n.component("TopSliderContainer",W1)}const Q1=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),Y1=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),X1=D(e.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[e.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"]]),Z1=D(e.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"]]),Ua=D(e.defineComponent({__name:"IconClose",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[e.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"]]),J1=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),K1=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),ey=D(e.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[e.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"]]),ty=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),ny=D(e.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[e.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"}),e.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"]]),oy=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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"]]),iy=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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"]]),ry=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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"]]),sy=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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"]]),ay=D(e.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 t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),i[3]||(i[3]=e.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 ly(n){n.component("IconDownload",Q1),n.component("IconFilter",Y1),n.component("ArrowLeft",oy),n.component("ArrowRight",iy),n.component("DoubleArrowLeft",ry),n.component("DoubleArrowRight",sy),n.component("EllipsisSvg",ay),n.component("IconArrowLeft",X1),n.component("IconCheckDefault",Z1),n.component("IconClose",Ua),n.component("IconEdit",J1),n.component("IconEmail",K1),n.component("IconMove",ey),n.component("IconPhone",ty),n.component("IconSearch",_a),n.component("IconSelectArrow",ny)}const cy=e.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const t=e.ref(n.initActiveIdx),o=i=>{t.value=i};return e.watch(()=>n.initActiveIdx,()=>{o(n.initActiveIdx)}),{changeActiveId:o,activeIdx:t}}});function dy(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const uy=D(cy,[["render",dy]]),fy=e.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:t}){const o=e.ref(n.activeId==="0"),i=()=>{o.value=!o.value,t("changeActiveId",n.tabId)};return e.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(o.value=!0)}),e.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(o.value=!1)}),{collapsed:o,handleItemClick:i}}}),my=["for"],hy={class:"inside-icon"};function py(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"tab",style:e.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?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:t[0]||(t[0]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[3]||(t[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])])):n.isCollaps&&!n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:t[1]||(t[1]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[4]||(t[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("label",{for:n.tabId,onClick:t[2]||(t[2]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[e.createElementVNode("div",{style:e.normalizeStyle({cursor:n.isCollaps?"pointer":"default",background:n.changeColor?n.background:n.backgroundAttention,padding:n.padding,borderRadius:"5px"}),class:"tab-name"},[e.createElementVNode("div",hy,[e.renderSlot(n.$slots,"icon",{},void 0,!0)]),e.createElementVNode("div",{class:"title-in",style:e.normalizeStyle({marginRight:n.isCollaps?"50px":"0",width:n.isCollaps?"calc(100% - 50px)":"100%"})},[e.renderSlot(n.$slots,"inside-title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)],4),e.createElementVNode("div",{class:e.normalizeClass(["tools-bar",{"hidden-part":n.showToolsOnHover}])},[e.renderSlot(n.$slots,"tools",{},void 0,!0)],2)],4)],8,my),e.createElementVNode("div",{style:e.normalizeStyle({maxHeight:n.isCollaps?"":"1000000vh",background:n.changeColor?n.background:n.backgroundAttention}),class:e.normalizeClass(n.collapsed?"tab-content-down":"tab-content-up")},[e.renderSlot(n.$slots,"default",{},void 0,!0)],6)],4),t[5]||(t[5]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-37d79495><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-37d79495></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-37d79495></path></symbol></svg>',1))],64)}const gy=D(fy,[["render",py],["__scopeId","data-v-37d79495"]]),yy={class:"tab"},wy={class:"rotate"},by=D(e.defineComponent({__name:"VerticalCollapseContainer",setup(n){const t=e.ref(!1),o=async()=>{t.value=!t.value};return(i,r)=>{const s=e.resolveComponent("ArrowRight"),a=e.resolveComponent("ArrowLeft");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",yy,[e.renderSlot(i.$slots,"main",{},void 0,!0),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"20px",transition:"0.3s"}),class:"left"},[e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"100%":"0",transition:"0.3s"}),class:"left-content"},[e.renderSlot(i.$slots,"inside-content-left",{},void 0,!0)],4),e.createElementVNode("div",{class:"arrow-bar",onClick:o},[e.createElementVNode("div",wy,[e.renderSlot(i.$slots,"inside-title",{},void 0,!0)]),e.unref(t)?(e.openBlock(),e.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(e.openBlock(),e.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"100%",transition:"0.3s"}),class:"right"},[e.renderSlot(i.$slots,"inside-content-right",{},void 0,!0)],4)]),e.createVNode(a),e.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),Cy={class:"add-block_body"},Sy=D(e.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(t,o)=>{const i=e.resolveComponent("PSticky");return e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createVNode(i,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",Cy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),ky=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),xy={class:"add-block_body"},Ey=D(e.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(t,o)=>{const i=e.resolveComponent("PSticky"),r=e.resolveComponent("PContainer");return e.openBlock(),e.createBlock(r,{background:n.background,margin:n.margin,padding:n.padding},{default:e.withCtx(()=>[e.createVNode(i,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",xy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),By={class:"select-dialog"},Vy={class:"select-dialog-header"},Ny={class:"select-dialog-title"},$y={class:"select-dialog-content"},Ty={class:"select-dialog-actions"},va=D(e.defineComponent({__name:"PAddDialog",props:e.mergeModels({title:{type:String,default:""},store:{type:Object,required:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["add","close"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.useModel(n,"modelValue"),a=e.ref([]),c=x.Ripple,l=x.ClosePopup,u=async()=>{await i.store.GetOptions(),a.value=i.store.Options},f=async N=>{await i.store.Get(N.value);const C=i.store.Item,T=new C.constructor(C);r("add",T),m()},m=()=>{r("close"),s.value=!1},p=N=>{N||r("close")},k=()=>{s.value&&m()},E=()=>{s.value=!s.value},V=async()=>{await e.nextTick();const N=document.querySelector(".select-dialog-content .q-item");N&&"focus"in N&&N.focus()};return t({opened:s,toggle:E}),e.onBeforeMount(u),(N,C)=>(e.openBlock(),e.createBlock(un,{modelValue:s.value,"onUpdate:modelValue":[C[0]||(C[0]=T=>s.value=T),p],position:"top",onKeydown:e.withKeys(k,["escape"]),onShow:V},{default:e.withCtx(()=>[e.createElementVNode("div",By,[e.createElementVNode("div",Vy,[e.createElementVNode("div",Ny,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(l)]])]),e.createElementVNode("div",$y,[e.createVNode(e.unref(x.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),T=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.QItem),{key:T.value,clickable:"",class:"q-px-md q-py-sm",onClick:y=>f(T)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemSection),null,{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemLabel),{class:"text-body1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(c)]])),128))]),_:1})]),e.createElementVNode("div",Ty,[e.withDirectives(e.createVNode(ne,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[e.unref(l)]])])])]),_:1},8,["modelValue"]))}}),[["__scopeId","data-v-9f6a2f5b"]]),Py=["src"],My={key:0,class:"header-row"},Iy={class:"title-wrapper"},Ry={key:0,class:"title-icon"},Ay={class:"title-text"},zy={class:"text-subtitle1 text-weight-medium"},Dy={key:0,class:"caption-row"},Fy={class:"text-caption text-grey-6"},Oy=["innerHTML"],Ly={key:1,class:"card-footer"},qa=D(e.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:t}){const o=e.ref(null),i=n,r=t,s=e.computed(()=>i.img?i.isMain?"365px":"200px":"0"),a=c=>{i.noPointer||r("click",c)};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{class:e.normalizeClass(["card",{"no-hover":n.noHover,"cursor-pointer":!n.noPointer}]),flat:"",bordered:"",style:e.normalizeStyle({height:n.height}),onClick:a},{default:e.withCtx(()=>[n.img?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image-container",style:e.normalizeStyle({height:s.value})},[e.createElementVNode("img",{class:"image-img",src:n.img,alt:"image",style:e.normalizeStyle({height:s.value})},null,12,Py)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QCardSection),{class:"card-content",style:e.normalizeStyle({maxHeight:n.maxHeight})},{default:e.withCtx(()=>[n.title||c.$slots.title||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",My,[e.createElementVNode("div",Iy,[n.icon||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",Ry,[e.renderSlot(c.$slots,"icon",{},()=>[e.createVNode(e.unref(x.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ay,[e.renderSlot(c.$slots,"title",{},()=>[e.createElementVNode("span",zy,e.toDisplayString(n.title),1)],!0)])]),c.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",Dy,[e.renderSlot(c.$slots,"caption",{},()=>[e.createElementVNode("span",Fy,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||c.$slots.title?(e.openBlock(),e.createBlock(e.unref(x.QSeparator),{key:1,class:"header-separator"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"content-wrapper"},[e.renderSlot(c.$slots,"default",{},()=>[n.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(n.isMain?"main-content":"preview-content"),innerHTML:n.content},null,10,Oy)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",Ly,[e.renderSlot(c.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),_y={key:0,class:"list-title"},Hy={class:"draggable-item"},Uy={class:"drag-handle"},vy={class:"item-content"},qy={key:0,class:"item-actions"},jy={class:"item-content"},Wy={key:0,class:"item-actions"},Gy={key:4,class:"add-button-container"},Qy=e.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:z.H.BaseStore,default:void 0},addFunc:{type:Function,default:void 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:t}){e.useCssVars(l=>({v2a47a50e:n.background}));const o=n,i=t,r=async()=>{const l=o.addFunc?await o.addFunc():void 0;l&&(typeof l.order<"u"&&(l.order=o.list.length),o.addToList&&o.store&&o.store.AppendToAll(l),o.store&&await o.store.Create(l)),await c(),i("add",l)},s=async l=>{o.removeFromList&&z.H.Classes.RemoveFromClassById(l,o.list),o.store&&await o.store.Remove(l),await c(),i("remove",l)},a=async l=>{o.store&&await o.store.Update(l),i("update",l)},c=async()=>{!o.sortable||o.list.length===0||typeof o.list[0].order>"u"||(z.H.Sorter.Sort(o.list),o.store&&await o.store.UpdateMany(o.list),i("sort"))};return(l,u)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(l.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(e.openBlock(),e.createElementBlock("div",_y,e.toDisplayString(n.title),1)):e.renderSlot(l.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(wi),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:c},{item:e.withCtx(({element:f,index:m})=>[e.createElementVNode("div",Hy,[e.createElementVNode("div",Uy,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",vy,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(Ze,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",qy,[e.createVNode(ne,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)])]),_:3},8,["list"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(n.list,(f,m)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"static-item",style:e.normalizeStyle({background:n.background})},[e.createElementVNode("div",jy,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(Ze,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",Wy,[e.createVNode(ne,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)],4))),128)),n.showAdd?(e.openBlock(),e.createElementBlock("div",Gy,[e.createVNode(ne,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),ja=D(Qy,[["__scopeId","data-v-c87ed91c"]]),Yy={class:"del-block_title"},Xy={class:"del-block_body"},Zy=D(e.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(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"del-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createElementVNode("div",Yy,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",Xy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),Wa=D(e.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:t}){const o=n,i=t,r=a=>{a.key==="Escape"&&s()};e.onMounted(()=>{document.body.addEventListener("keydown",r)}),e.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{o.closable&&i("close")};return(a,c)=>{const l=e.resolveComponent("IconClose");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:s})):e.createCommentVNode("",!0),n.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"modal-w",style:e.normalizeStyle({maxWidth:n.width,width:n.width,margin:n.margin,padding:n.padding,top:n.top,maxHeight:n.maxHeight})},[n.closable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[e.createVNode(l,{size:"20px"})])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function Jy(n){n.component("CollapseContainer",uy),n.component("CollapseItem",gy),n.component("VerticalCollapseContainer",by),n.component("PAdd",Sy),n.component("PAddDialog",va),n.component("PCard",qa),n.component("PCrudList",ja),n.component("PEditDialog",Hn),n.component("PModal",Wa),n.component("PContainer",ky),n.component("PContainerStickyHead",Ey),n.component("PDel",Zy)}const Ky={class:"btn-group"},Ga=D(e.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:t}){const o=t,i=e.computed(()=>Oe.Form.GetButtons()),r=e.useTemplateRef("fields"),s=async c=>{if(!c.isSubmit){Oe.Form.SetChunk(c.GetChunk()),a();return}const l=Oe.Form.Validate();if(l.length>0){Gt.Notify.Error(l.join("<br/>"));return}o("submit")},a=()=>{if(!r.value)return;const c=r.value[0];c&&c.$refs.input.focus()};return e.onMounted(async()=>{await a()}),e.onBeforeUnmount(()=>{Oe.Form.Reset()}),(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"auth-card",style:e.normalizeStyle({maxWidth:n.width,margin:n.margin,padding:n.padding,background:n.background})},[e.createVNode(Ji,{string:e.unref(Oe).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Oe).Form.GetFields(),u=>(e.openBlock(),e.createBlock(Ze,{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)),e.createElementVNode("div",Ky,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(u,f)=>(e.openBlock(),e.createBlock(ne,{id:u.id,key:u.GetChunk(),disabled:e.unref(Oe).Form.IsBlock,type:f===0?e.unref(pe).Success:e.unref(pe).Primary,skin:"base",text:u.text,margin:"10px 0 0 0",width:"100%",onClick:m=>s(u)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),e0=e.defineComponent({__name:"PAuthModal",props:{width:{type:String,default:"320px"},margin:{type:String,default:"0"},padding:{type:String,default:"2vw"}},emits:["submit"],setup(n){const t=()=>{Oe.Form.Reset(),Oe.Modal.Close()};return(o,i)=>(e.openBlock(),e.createBlock(Wa,{show:e.unref(Oe).Modal.Visible,closable:e.unref(Oe).Modal.Closable,width:n.width,padding:n.padding,onClose:t},{default:e.withCtx(()=>[e.createVNode(Ga,{margin:n.margin,padding:"0",onSubmit:i[0]||(i[0]=r=>o.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),t0=["onClick"],n0=D(e.defineComponent({__name:"PMenuTabs",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:t}){const o=n,i=t,r=e.ref(window.innerWidth),s=e.ref(),a=e.ref(Number(o.tabHeight.replace(/[^+\d]/g,""))),c=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(o.tabHeight.replace(/[^+\d]/g,""))};e.onMounted(()=>window.addEventListener("resize",c)),e.onUnmounted(()=>window.removeEventListener("resize",c));const l=e.computed(()=>`calc(100% - ${a.value}px + 1px)`);e.onBeforeMount(()=>{o.menus.Select()});const u=f=>{o.menus.Select(f),i("select")};return(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({height:`calc(100% - ${n.outTopMargin} - ${n.tabHeight}`,margin:n.margin,borderRadius:n.borderRadius})},[e.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:e.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${n.minMenuItemWidth}, 1fr))`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menus.items,(p,k)=>(e.openBlock(),e.createElementBlock("div",{key:k},[e.createElementVNode("div",{class:e.normalizeClass({"selected-tab":k===n.menus.idx,tab:k!==n.menus.idx}),style:e.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:E=>u(k)},e.toDisplayString(p.name),15,t0)]))),128))],4),e.createElementVNode("div",{class:"body-container",style:e.normalizeStyle({background:n.background,height:e.unref(l)})},[e.renderSlot(f.$slots,"default",{},()=>[n.menus.idx>-1?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.menus.GetComponent()),{key:0})):e.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-1046962d"]]),o0=["id"],i0=["for"],r0={class:"left-field"},s0=["href","download"],a0={key:1,class:"text-field__input"},l0={class:"right-field"},c0=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new xt},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:t}){const o=n,i=t,r=Xe.GUID(),s=Xe.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!l(f.name)){Nn.Error(`Загруженный файл должен быть в одном из форматов: ${o.formats.join(", ")}`);return}const m=new xt;m.setFile(f),m.url=URL.createObjectURL(f),i("upload",m)},c=()=>{i("remove")};e.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const l=u=>{let f=Zs.Get(u);return!!o.formats.includes(f.toLowerCase())};return(u,f)=>{const m=e.resolveComponent("PString"),p=e.resolveComponent("PFlex"),k=e.resolveComponent("PButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("input",{id:e.unref(r),type:"file",hidden:"",onChange:a},null,40,o0),e.createElementVNode("div",{class:"text-field",style:e.normalizeStyle({margin:n.margin,padding:n.padding})},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"text-field__label",for:n.label},e.toDisplayString(n.label),9,i0)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",r0,[e.createVNode(p,null,{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},void 0,!0),e.createVNode(m,{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?(e.openBlock(),e.createElementBlock("div",{key:0,class:"text-field__input",style:e.normalizeStyle({color:n.color})},[e.createElementVNode("a",{href:n.fileInfo.getFileUrl(),target:"_blank",download:n.fileInfo.originalName},[e.createElementVNode("div",null,e.toDisplayString(n.fileInfo.originalName),1)],8,s0),e.createVNode(k,{skin:"text",type:"del",onClick:c},{default:e.withCtx(()=>[e.createVNode(Ua,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",a0,[e.createVNode(m,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",l0,[e.createVNode(k,{id:e.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)}}}),d0=D(c0,[["__scopeId","data-v-8b73ee22"]]);function Qa(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),o.push.apply(o,i)}return o}function de(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Qa(Object(o),!0).forEach(function(i){ft(n,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Qa(Object(o)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(o,i))})}return n}function ft(n,t,o){return t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function u0(n,t){if(n==null)return{};var o,i,r=function(a,c){if(a==null)return{};var l,u,f={},m=Object.keys(a);for(u=0;u<m.length;u++)l=m[u],c.indexOf(l)>=0||(f[l]=a[l]);return f}(n,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)o=s[i],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(n,o)&&(r[o]=n[o])}return r}function bn(n){return function(t){if(Array.isArray(t))return xr(t)}(n)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(n)||function(t,o){if(t){if(typeof t=="string")return xr(t,o);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return xr(t,o)}}(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 xr(n,t){(t==null||t>n.length)&&(t=n.length);for(var o=0,i=new Array(t);o<t;o++)i[o]=n[o];return i}var Ya,f0,ii,Me=(Ya=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 t={}.hasOwnProperty;function o(){for(var i=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")i.push(s);else if(Array.isArray(s)){if(s.length){var c=o.apply(null,s);c&&i.push(c)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var l in s)t.call(s,l)&&s[l]&&i.push(l);else i.push(s.toString())}}return i.join(" ")}n.exports?(o.default=o,n.exports=o):window.classNames=o})()},Qa(ni={path:u0,exports:{},require:function(n,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&ni.path)}},ni.exports),ni.exports),Ct=function(n){return function(t,o){if(!t)return n;var i;typeof t=="string"?i=t:o=t;var r=n;return i&&(r+="__"+i),r+(o?Object.keys(o).reduce(function(s,a){var c=o[a];return c&&(s+=" "+(typeof c=="boolean"?r+"--"+a:r+"--"+a+"_"+c)),s},""):"")}};function Er(n,t,o){var i,r,s,a,c;function l(){var f=Date.now()-a;f<t&&f>=0?i=setTimeout(l,t-f):(i=null,o||(c=n.apply(s,r),s=r=null))}t==null&&(t=100);var u=function(){s=this,r=arguments,a=Date.now();var f=o&&!i;return i||(i=setTimeout(l,t)),f&&(c=n.apply(s,r),s=r=null),c};return u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(c=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},u}Er.debounce=Er;var Br=Er,Z=function(){return Z=Object.assign||function(n){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},Z.apply(this,arguments)};/*! *****************************************************************************
30
+ */(function(){var t={}.hasOwnProperty;function o(){for(var i=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")i.push(s);else if(Array.isArray(s)){if(s.length){var c=o.apply(null,s);c&&i.push(c)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var l in s)t.call(s,l)&&s[l]&&i.push(l);else i.push(s.toString())}}return i.join(" ")}n.exports?(o.default=o,n.exports=o):window.classNames=o})()},Ya(ii={path:f0,exports:{},require:function(n,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&ii.path)}},ii.exports),ii.exports),bt=function(n){return function(t,o){if(!t)return n;var i;typeof t=="string"?i=t:o=t;var r=n;return i&&(r+="__"+i),r+(o?Object.keys(o).reduce(function(s,a){var c=o[a];return c&&(s+=" "+(typeof c=="boolean"?r+"--"+a:r+"--"+a+"_"+c)),s},""):"")}};function Er(n,t,o){var i,r,s,a,c;function l(){var f=Date.now()-a;f<t&&f>=0?i=setTimeout(l,t-f):(i=null,o||(c=n.apply(s,r),s=r=null))}t==null&&(t=100);var u=function(){s=this,r=arguments,a=Date.now();var f=o&&!i;return i||(i=setTimeout(l,t)),f&&(c=n.apply(s,r),s=r=null),c};return u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(c=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},u}Er.debounce=Er;var Br=Er,X=function(){return X=Object.assign||function(n){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},X.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 Ya(n,t){var o,i;return n&&t?(o=""+n+t[0].toUpperCase()+t.slice(1),i=n+"-"+t):(o=n||t,i=n||t),{name:o,classname:i}}function Xa(n){return/^blob:/.test(n)}function Za(n){return Xa(n)||function(t){return/^data:/.test(t)}(n)}function Hn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function ze(n){return n===void 0}function oi(n){return typeof n=="object"&&n!==null}function Nr(n,t,o){var i={};return oi(n)?(Object.keys(t).forEach(function(r){ze(n[r])?i[r]=t[r]:oi(t[r])?oi(n[r])?i[r]=Nr(n[r],t[r],o[r]):i[r]=n[r]?t[r]:o[r]:t[r]===!0||t[r]===!1?i[r]=!!n[r]:i[r]=n[r]}),i):n?t:o}function ii(n){var t=Number(n);return Number.isNaN(t)?n:t}function Ja(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!Ka(n)}function Ka(n){return n!=n}function el(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var yo=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},f0=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},Vr=function(n){this.type="move",this.directions=n},m0=function(){function n(t,o,i,r,s){this.type="drag",this.nativeEvent=t,this.position=i,this.previousPosition=r,this.element=o,this.anchor=s}return n.prototype.shift=function(){var t=this,o=t.element,i=t.anchor,r=t.position;if(o){var s=o.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-i.left,top:r.top-c-i.top}}return{left:0,top:0}},n}(),$r={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=wn(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(t,o){return{clientX:t.clientX+o.clientX/n.touches.length,clientY:t.clientY+o.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 t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),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 t=this.$refs.draggable.getBoundingClientRect(),o=t.left,i=t.right,r=t.bottom,s=t.top;this.anchor={left:n.clientX-o,top:n.clientY-s,bottom:r-n.clientY,right:i-n.clientX}},processMove:function(n,t){var o=wn(t);if(this.touches.length){if(this.touches.length===1&&o.length===1){var i=this.$refs.draggable;this.$emit("drag",new m0(n,i,{left:o[0].clientX,top:o[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=o}},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"]};$r.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"draggable",class:o.classname,onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:t[3]||(t[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:t[4]||(t[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],34)};var Tr=Ct("vue-handler-wrapper"),tl={name:"HandlerWrapper",components:{DraggableElement:$r},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var n;if(this.horizontalPosition||this.verticalPosition){var t,o=Ya(this.horizontalPosition,this.verticalPosition);n=Tr((mt(t={},o.classname,!0),mt(t,"disabled",this.disabled),t))}else n=Tr({disabled:this.disabled});return{root:n,draggable:Tr("draggable")}}},emits:["leave","enter","drag","drag-end"]};tl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock("div",{class:s.classes.root},[e.createVNode(a,{class:s.classes.draggable,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var h0=Ct("vue-line-wrapper"),nl={name:"LineWrapper",components:{DraggableElement:$r},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return h0((mt(n={},this.position,!0),mt(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};nl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock(a,{class:s.classname,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var $t=["left","right","top","bottom"],p0=["left","right"],g0=["top","bottom"],y0=["left","top"],w0=["fill-area","fit-area","stencil","none"],ol={left:0,top:0,width:0,height:0};function il(n,t,o){return!(o=o||["width","height","left","top"]).some(function(i){return n[i]!==t[i]})}function Tt(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function Un(n,t){return{left:n.left-t.left,top:n.top-t.top}}function ve(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function wo(n,t){var o={left:0,top:0,right:0,bottom:0};return $t.forEach(function(i){var r=t[i],s=Tt(n)[i];o[i]=r!==void 0&&s!==void 0?i==="left"||i==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),o}function Mt(n,t){return{left:n.left-t.left,top:n.top-t.top,width:n.width+t.left+t.right,height:n.height+t.top+t.bottom}}function ri(n){return{left:-n.left,top:-n.top}}function ot(n,t){return Z(Z({},n),{left:n.left+t.left,top:n.top+t.top})}function ht(n,t,o,i){if(t!==1){if(o){var r=ve(n);return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2+(o.left-r.left)*(1-t),top:n.top+n.height*(1-t)/2+(o.top-r.top)*(1-t)}}return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2,top:n.top+n.height*(1-t)/2}}return n}function ce(n){return n.width/n.height}function vn(n,t){return Math.min(t.right!==void 0&&t.left!==void 0?(t.right-t.left)/n.width:1/0,t.bottom!==void 0&&t.top!==void 0?(t.bottom-t.top)/n.height:1/0)}function qn(n,t){var o={left:0,top:0},i=wo(n,t);return i.left&&i.left>0?o.left=i.left:i.right&&i.right>0&&(o.left=-i.right),i.top&&i.top>0?o.top=i.top:i.bottom&&i.bottom>0&&(o.top=-i.bottom),o}function Mr(n,t){var o;return t.minimum&&n<t.minimum?o=t.minimum:t.maximum&&n>t.maximum&&(o=t.maximum),o}function rl(n,t){var o=ce(n),i=ce(t);return t.width<1/0&&t.height<1/0?o>i?{width:t.width,height:t.width/o}:{width:t.height*o,height:t.height}:t.width<1/0?{width:t.width,height:t.width/o}:t.height<1/0?{width:t.height*o,height:t.height}:n}function sl(n,t){var o=t*Math.PI/180;return{width:Math.abs(n.width*Math.cos(o))+Math.abs(n.height*Math.sin(o)),height:Math.abs(n.width*Math.sin(o))+Math.abs(n.height*Math.cos(o))}}function Yt(n,t){var o=t*Math.PI/180;return{left:n.left*Math.cos(o)-n.top*Math.sin(o),top:n.left*Math.sin(o)+n.top*Math.cos(o)}}function si(n,t){var o=wo(qe(n,t),t);return o.left+o.right+o.top+o.bottom?o.left+o.right>o.top+o.bottom?Math.min((n.width+o.left+o.right)/n.width,vn(n,t)):Math.min((n.height+o.top+o.bottom)/n.height,vn(n,t)):1}function qe(n,t,o){o===void 0&&(o=!1);var i=qn(n,t);return ot(n,o?ri(i):i)}function Pr(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 b0(n,t){return Z(Z({},n),{minWidth:Math.min(t.width,n.minWidth),minHeight:Math.min(t.height,n.minHeight),maxWidth:Math.min(t.width,n.maxWidth),maxHeight:Math.min(t.height,n.maxHeight)})}function al(n,t,o){o===void 0&&(o=!0);var i={};return $t.forEach(function(r){var s=n[r],a=t[r];s!==void 0&&a!==void 0?i[r]=r==="left"||r==="top"?o?Math.max(s,a):Math.min(s,a):o?Math.min(s,a):Math.max(s,a):a!==void 0?i[r]=a:s!==void 0&&(i[r]=s)}),i}function ai(n,t){return al(n,t,!0)}function ll(n){var t=n.size,o=n.aspectRatio,i=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||ce(t)>=o.minimum&&ce(t)<=o.maximum)&&t.height<=r.maxHeight&&t.width<=r.maxWidth&&t.width&&t.height&&(i||t.height>=r.minHeight&&t.width>=r.minWidth))}function cl(n,t){return Math.pow(n.width-t.width,2)+Math.pow(n.height-t.height,2)}function Lt(n){var t=n.width,o=n.height,i=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(i.minWidth,Math.min(i.maxWidth,t)),height:Math.max(i.minHeight,Math.min(i.maxHeight,o))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(h,p){return ll({size:p,aspectRatio:r,sizeRestrictions:i,ignoreMinimum:f})&&(!h||cl(p,{width:t,height:o})<cl(h,{width:t,height:o}))?p:h},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),ll({size:s,aspectRatio:r,sizeRestrictions:i})&&c.push(s);var l=a(c)||a(c,!0);return l&&{width:l.width,height:l.height}}function Ir(n){var t=n.event,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=ot(o,t.directions);return ot(s,qn(s,r))}function C0(n){var t=n.coordinates,o=n.transform,i=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,c=n.visibleArea,l=function(f,h){return Ir({coordinates:f,positionRestrictions:s,event:new Vr({left:h.left-f.left,top:h.top-f.top})})},u=Z({},t);return(Array.isArray(o)?o:[o]).forEach(function(f){var h={};ze((h=typeof f=="function"?f({coordinates:u,imageSize:i,visibleArea:c}):f).width)&&ze(h.height)||(u=function(p,k){var C=Z(Z(Z({},p),Lt({width:k.width,height:k.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(C,{left:p.left,top:p.top})}(u,Z(Z({},u),h))),ze(h.left)&&ze(h.top)||(u=l(u,Z(Z({},u),h)))}),u}function S0(n){n.event;var t=n.getAreaRestrictions,o=n.boundaries,i=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,c=n.positionRestrictions;n.stencilReference;var l,u,f,h=Z({},i),p=Z({},r),k=Z({},s);l=ce(k),u=ce(h),f===void 0&&(f=.001),(l===0||u===0?Math.abs(u-l)<f:Math.abs(u/l)<1+f&&Math.abs(u/l)>1-f)||(h=Z(Z({},h),Lt({sizeRestrictions:a,width:h.width,height:h.height,aspectRatio:{minimum:ce(k),maximum:ce(k)}})));var C=si(p=ht(p,h.width*o.width/(p.width*k.width)),t({visibleArea:p,type:"resize"}));return C!==1&&(p=ht(p,C),h=ht(h,C)),p=qe(p=ot(p,Un(ve(h),ve(p))),t({visibleArea:p,type:"move"})),{coordinates:h=qe(h,ai(Tt(p),c)),visibleArea:p}}function k0(n){var t=n.event,o=n.getAreaRestrictions,i=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var c=Z({},r),l=Z({},s);if(r&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};l.width,i.width,ce(i)>ce(c)?(u.height=.8*i.height,u.width=u.height*ce(c)):(u.width=.8*i.width,u.height=u.width*ce(c));var f=si(l=ht(l,c.width*i.width/(l.width*u.width)),o({visibleArea:l,type:"resize"}));l=ht(l,f),f!==1&&(u.height/=f,u.width/=f),l=qe(l=ot(l,Un(ve(c),ve(l))),o({visibleArea:l,type:"move"})),c=qe(c,ai(Tt(l),a))}return{coordinates:c,visibleArea:l}}function x0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.getAreaRestrictions,s=Z({},i),a=Z({},o);if(t.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),l=Math.max(0,a.height-s.height);c>l?s=ht(s,Math.min(a.width/s.width,vn(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=ht(s,Math.min(a.height/s.height,vn(s,r({visibleArea:s,type:"resize"}))))),s=qe(s=ot(s,ri(qn(a,Tt(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function E0(n){var t=n.imageSize,o=n.visibleArea,i=n.coordinates,r=o||t;return{left:(o?o.left:0)+r.width/2-i.width/2,top:(o?o.top:0)+r.height/2-i.height/2}}function B0(n){var t=n.imageSize,o=n.visibleArea,i=n.aspectRatio,r=n.sizeRestrictions,s=o||t,a=Math.min(i.maximum||1/0,Math.max(i.minimum||0,ce(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Lt(Z(Z({},c),{aspectRatio:i,sizeRestrictions:r}))}function N0(n){var t,o,i=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,c=n.sizeRestrictions,l=n.stencilSize,u=r||i;return ce(u)>ce(s)?o=(t=l.height*u.height/s.height)*ce(l):t=(o=l.width*u.width/s.width)/ce(l),Lt({width:o,height:t,aspectRatio:a,sizeRestrictions:c})}function V0(n){var t=n.getAreaRestrictions,o=n.coordinates,i=n.imageSize,r=ce(n.boundaries);if(o){var s={height:Math.max(o.height,i.height),width:Math.max(o.width,i.width)},a=rl({width:ce(s)>r?s.width:s.height*r,height:ce(s)>r?s.width/r:s.height},Pr(t())),c={left:o.left+o.width/2-a.width/2,top:o.top+o.height/2-a.height/2,width:a.width,height:a.height},l=wo(o,Tt(Z({left:0,top:0},i))),u={};return!l.left&&!l.right&&c.width<=i.width&&(u.left=0,u.right=i.width),!l.top&&!l.bottom&&c.height<=i.height&&(u.top=0,u.bottom=i.height),qe(c,u)}var f=ce(i);return a={height:f>r?i.height:i.width/r,width:f>r?i.height*r:i.width},{left:i.width/2-a.width/2,top:i.height/2-a.height/2,width:a.width,height:a.height}}function li(n,t){return al(n,Tt(t))}function $0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,c=n.adjustStencil,l=t.scale,u=t.move,f=Z({},i),h=Z({},o),p=1,k=1,C=l.factor&&Math.abs(l.factor-1)>.001;f=ot(f,{left:u.left||0,top:u.top||0});var N={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,vn(h,a))},area:{maximum:vn(f,s({visibleArea:f,type:"resize"}))}};l.factor&&C&&(l.factor<1?(k=Math.max(l.factor,N.stencil.minimum))>1&&(k=1):l.factor>1&&(k=Math.min(l.factor,Math.min(N.area.maximum,N.stencil.maximum)))<1&&(k=1)),k&&(f=ht(f,k,l.center));var E=o.left-i.left,y=i.width+i.left-(o.width+o.left),M=o.top-i.top,b=i.height+i.top-(o.height+o.top);return f=qe(f=ot(f,qn(f,{left:a.left!==void 0?a.left-E*k:void 0,top:a.top!==void 0?a.top-M*k:void 0,bottom:a.bottom!==void 0?a.bottom+b*k:void 0,right:a.right!==void 0?a.right+y*k:void 0})),s({visibleArea:f,type:"move"})),h.width=h.width*k,h.height=h.height*k,h.left=f.left+E*k,h.top=f.top+M*k,h=qe(h,ai(Tt(f),a)),l.factor&&C&&c&&(l.factor>1?p=Math.min(N.area.maximum,l.factor)/k:l.factor<1&&(p=Math.max(h.height/f.height,h.width/f.width,l.factor/k)),p!==1&&(f=ot(f=qe(f=ht(f,p,l.factor>1?l.center:ve(h)),s({visibleArea:f,type:"move"})),ri(qn(h,Tt(f)))))),{coordinates:h,visibleArea:f}}function T0(n){var t=n.aspectRatio,o=n.getAreaRestrictions,i=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,c=n.imageSize,l=n.previousImageSize,u=n.angle,f=Z({},i),h=Z({},r),p=Yt(ve(Z({left:0,top:0},l)),u);return(f=Z(Z({},Lt({sizeRestrictions:s,aspectRatio:t,width:f.width,height:f.height})),Yt(ve(f),u))).left-=p.left-c.width/2+f.width/2,f.top-=p.top-c.height/2+f.height/2,h=ht(h,si(h,o({visibleArea:h,type:"resize"}))),{coordinates:f=qe(f,a),visibleArea:h=qe(h=ot(h,Un(ve(f),ve(i))),o({visibleArea:h,type:"move"}))}}function M0(n){var t=n.flip,o=n.previousFlip,i=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,c=n.imageSize,l=Z({},s),u=Z({},a),f=o.horizontal!==t.horizontal,h=o.vertical!==t.vertical;if(f||h){var p=Yt({left:c.width/2,top:c.height/2},-i),k=Yt(ve(l),-i),C=Yt({left:f?p.left-(k.left-p.left):k.left,top:h?p.top-(k.top-p.top):k.top},i);l=ot(l,Un(C,ve(l))),k=Yt(ve(u),-i),u=qe(u=ot(u,Un(C=Yt({left:f?p.left-(k.left-p.left):k.left,top:h?p.top-(k.top-p.top):k.top},i),ve(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function dl(n){var t=n.directions,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=n.sizeRestrictions,a=n.preserveRatio,c=n.compensate,l=Z({},t),u=Mt(o,l).width,f=Mt(o,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(o.width-s.minWidth)/(l.left/l.right),l.right=-(o.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(o.width-s.minWidth):l.right<0&&(l.right=-(o.width-s.minWidth))),f<0&&(l.top<0&&l.bottom<0?(l.top=-(o.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(o.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(o.height-s.minHeight):l.bottom<0&&(l.bottom=-(o.height-s.minHeight)));var h=wo(Mt(o,l),r);c&&(h.left&&h.left>0&&h.right===0?(l.right+=h.left,l.left-=h.left):h.right&&h.right>0&&h.left===0&&(l.left+=h.right,l.right-=h.right),h.top&&h.top>0&&h.bottom===0?(l.bottom+=h.top,l.top-=h.top):h.bottom&&h.bottom>0&&h.top===0&&(l.top+=h.bottom,l.bottom-=h.bottom),h=wo(Mt(o,l),r));var p={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if($t.forEach(function(N){var E=h[N];E&&l[N]&&(p[N]=Math.max(0,1-E/l[N]))}),a){var k=Math.min.apply(null,$t.map(function(N){return p[N]}));k!==1/0&&$t.forEach(function(N){l[N]*=k})}else $t.forEach(function(N){p[N]!==1/0&&(l[N]*=p[N])});if(u=Mt(o,l).width,f=Mt(o,l).height,l.right+l.left&&(u>s.maxWidth?p.width=(s.maxWidth-o.width)/(l.right+l.left):u<s.minWidth&&(p.width=(s.minWidth-o.width)/(l.right+l.left))),l.bottom+l.top&&(f>s.maxHeight?p.height=(s.maxHeight-o.height)/(l.bottom+l.top):f<s.minHeight&&(p.height=(s.minHeight-o.height)/(l.bottom+l.top))),a){var C=Math.min(p.width,p.height);C!==1/0&&$t.forEach(function(N){l[N]*=C})}else p.width!==1/0&&p0.forEach(function(N){l[N]*=p.width}),p.height!==1/0&&g0.forEach(function(N){l[N]*=p.height});return l}function ci(n,t,o){return t==0&&o==0?n/2:t==0?0:o==0?n:n*Math.abs(t/(t+o))}var P0=Ct("vue-simple-handler"),I0=Ct("vue-simple-handler-wrapper"),Rr={name:"SimpleHandler",components:{HandlerWrapper:tl},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,t=(mt(n={},this.horizontalPosition,!!this.horizontalPosition),mt(n,this.verticalPosition,!!this.verticalPosition),mt(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),mt(n,"hover",this.hover),n);return{default:Ie(P0(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ie(I0(t),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"]};Rr.render=function(n,t,o,i,r,s){var a=e.resolveComponent("HandlerWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,"vertical-position":o.verticalPosition,"horizontal-position":o.horizontalPosition,disabled:o.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var R0=Ct("vue-simple-line"),A0=Ct("vue-simple-line-wrapper"),Ar={name:"SimpleLine",components:{LineWrapper:nl},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:Ie(R0(mt({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ie(A0(mt({},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"]};Ar.render=function(n,t,o,i,r,s){var a=e.resolveComponent("LineWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,position:o.position,disabled:o.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var zr=Ct("vue-bounding-box"),z0=["east","west",null],D0=["south","north",null],ul={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 Rr}},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 Ar}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return z0.forEach(function(t){D0.forEach(function(o){if(t!==o){var i=Ya(t,o),r=i.name,s=i.classname;n.push({name:r,classname:s,verticalDirection:o,horizontalDirection:t})}})}),{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,t=this.handlersWrappersClasses,o=this.linesClasses,i=this.linesWrappersClasses;return{root:zr(),handlers:n,handlersWrappers:t,lines:o,linesWrappers:i}},lineNodes:function(){var n=this,t=[];return this.points.forEach(function(o){o.horizontalDirection&&o.verticalDirection||!n.lines[o.name]||t.push({name:o.name,component:n.linesComponent,class:Ie(n.classes.lines.default,n.classes.lines[o.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Ie(n.classes.linesWrappers.default,n.classes.linesWrappers[o.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:o.verticalDirection,horizontalDirection:o.horizontalDirection,disabled:!n.resizable})}),t},handlerNodes:function(){var n=this,t=[],o=this.width,i=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class:Ie(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Ie(n.classes.handlersWrappers.default,n.classes.handlersWrappers[r.name]),hoverClass:n.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!n.resizable};if(o&&i){var a=r.horizontalDirection,c=r.verticalDirection,l=a==="east"?o:a==="west"?0:o/2,u=c==="south"?i:c==="north"?0:i/2;s.wrapperClass=zr("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=zr("handler",mt({},r.classname,!0));t.push(s)}}),t}},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,t,o){var i,r=n.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};t==="west"?c.left-=s:t==="east"&&(c.right+=s),o==="north"?c.top-=a:o==="south"&&(c.bottom+=a),!o&&t?i="width":o&&!t&&(i="height"),this.resizable&&this.$emit("resize",new f0(c,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:o==="south"||!o,top:o==="north"||!o},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:i}))}},emits:["resize","resize-end"]};ul.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[e.renderSlot(n.$slots,"default"),e.createVNode("div",null,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.lineNodes,function(a){return e.openBlock(),e.createBlock(e.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(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[1]||(t[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.handlerNodes,function(a){return e.openBlock(),e.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(e.openBlock(),e.createBlock(e.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(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[2]||(t[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var F0=Ct("vue-draggable-area"),fl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:F0()}}},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 t=this.movable&&n.touches.length===1;t&&(this.touches=wn(n.touches)),(this.touchStarted||t)&&(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()):el({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 t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),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 t=this.$refs.container.getBoundingClientRect(),o=t.left,i=t.top;this.anchor={x:n.clientX-o,y:n.clientY-i}},processMove:function(n,t){var o=wn(t);if(this.touches.length){var i=this.$refs.container.getBoundingClientRect(),r=i.left,s=i.top;this.touches.length===1&&o.length===1&&this.$emit("move",new Vr({left:o[0].clientX-(r+this.anchor.x),top:o[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};fl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};function Dr(n){var t,o;return{rotate:n.rotate||0,flip:{horizontal:((t=n==null?void 0:n.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((o=n==null?void 0:n.flip)===null||o===void 0?void 0:o.vertical)||!1}}}function O0(n){return new Promise(function(t,o){try{if(n)if(/^data:/i.test(n))t(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),f=u.length,h=new ArrayBuffer(f),p=new Uint8Array(h),k=0;k<f;k++)p[k]=u.charCodeAt(k);return h}(n));else if(/^blob:/i.test(n)){var i=new FileReader;i.onload=function(l){t(l.target.result)},s=n,a=function(l){i.readAsArrayBuffer(l)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?t(r.response):o("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 o("Error: the image is empty")}catch(l){o(l)}var s,a,c})}function ml(n){var t=n.rotate,o=n.flip,i=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+t+"deg) ",s+=" scaleX("+i*(o.horizontal?-1:1)+") ",s+=" scaleY("+r*(o.vertical?-1:1)+") "}function L0(n){try{var t,o=new DataView(n),i=void 0,r=void 0,s=void 0,a=void 0;if(o.getUint8(0)===255&&o.getUint8(1)===216)for(var c=o.byteLength,l=2;l+1<c;){if(o.getUint8(l)===255&&o.getUint8(l+1)===225){s=l;break}l++}if(s&&(i=s+10,function(k,C,N){var E,y="";for(E=C,N+=C;E<N;E++)y+=String.fromCharCode(k.getUint8(E));return y}(o,s+4,4)==="Exif")){var u=o.getUint16(i);if(((r=u===18761)||u===19789)&&o.getUint16(i+2,r)===42){var f=o.getUint32(i+4,r);f>=8&&(a=i+f)}}if(a){for(var h=o.getUint16(a,r),p=0;p<h;p++)if(l=a+12*p+2,o.getUint16(l,r)===274){l+=8,t=o.getUint16(l,r),o.setUint16(l,1,r);break}}return t}catch{return null}}function hl(n,t){var o=t.getBoundingClientRect(),i=o.left,r=o.top,s={left:0,top:0},a=0;return n.forEach(function(c){s.left+=(c.clientX-i)/n.length,s.top+=(c.clientY-r)/n.length}),n.forEach(function(c){a+=el({x:s.left,y:s.top},{x:c.clientX-i,y:c.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var pl={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=Br(this.processEnd),this.touches=[]},methods:{processMove:function(n,t){if(this.touches.length){if(this.touches.length===1&&t.length===1)this.$emit("move",new yo({left:this.touches[0].clientX-t[0].clientX,top:this.touches[0].clientY-t[0].clientY}));else if(this.touches.length>1&&this.touchResize){var o=hl(t,this.$refs.container),i=this.oldGeometricProperties;i.count===o.count&&i.count>1&&this.$emit("resize",new yo({left:i.centerMass.left-o.centerMass.left,top:i.centerMass.top-o.centerMass.top},{factor:i.spread/o.spread,center:o.centerMass})),this.oldGeometricProperties=o}this.touches=t}},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 t=this.$refs.container,o=t.getBoundingClientRect(),i=o.left,r=o.top,s=o.bottom,a=o.right;this.touches=wn(n.touches).filter(function(c){return c.clientX>i&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=hl(this.touches,t)}},onTouchEnd:function(n){n.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(n){var t=this;if(this.touches.length){var o=wn(n.touches).filter(function(i){return!i.identifier||t.touches.find(function(r){return r.identifier===i.identifier})});this.processEvent(n)&&(this.processMove(n,o),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],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 t=this.$refs.container.getBoundingClientRect(),o=t.left,i=t.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(c=+a)==0||Ka(c)?c:c>0?1:-1),s={left:n.clientX-o,top:n.clientY-i};this.$emit("resize",new yo({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};pl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:t[3]||(t[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};var Fr={components:{TransformableImage:pl},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"]};Fr.render=function(n,t,o,i,r,s){var a=e.resolveComponent("transformable-image");return e.openBlock(),e.createBlock(a,{"touch-move":o.touchMove,"touch-resize":o.touchResize,"mouse-move":o.mouseMove,"wheel-resize":o.wheelResize,onMove:t[1]||(t[1]=function(c){return n.$emit("move",c)}),onResize:t[2]||(t[2]=function(c){return n.$emit("resize",c)})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var di=Ct("vue-preview"),gl={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:di({fill:this.fill}),wrapper:di("wrapper"),imageWrapper:di("image-wrapper"),image:Ie(di("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,t=le(le({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),o=this.imageSize.width,i=this.imageSize.height,r=sl({width:o,height:i},t.rotate),s={width:"".concat(o,"px"),height:"".concat(i,"px"),left:"0px",top:"0px"},a={rotate:{left:(o-r.width)*t.scaleX/2,top:(i-r.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*o/2,top:(1-t.scaleY)*i/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) ")+ml(t),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()}}};gl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[e.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[e.withDirectives(e.createVNode("img",{ref:"image",src:o.image&&o.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[e.vShow,o.image&&o.image.src]])],6)],6)};var yl={components:{Preview:gl},inheritAttrs:!1};yl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("preview");return e.openBlock(),e.createBlock(a,e.mergeProps(n.$attrs,{fill:!0}),null,16)};var Or=Ct("vue-rectangle-stencil"),wl={name:"RectangleStencil",components:{StencilPreview:yl,BoundingBox:ul,DraggableArea:fl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Rr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Ar}},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:Ie(Or({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Ie(Or("preview"),this.previewClass),boundingBox:Ie(Or("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,t=n.height,o=n.width,i=n.left,r=n.top,s={width:"".concat(o,"px"),height:"".concat(t,"px"),transform:"translate(".concat(i,"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"]};wl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("stencil-preview"),c=e.resolveComponent("draggable-area"),l=e.resolveComponent("bounding-box");return e.openBlock(),e.createBlock("div",{class:s.classes.stencil,style:s.style},[e.createVNode(l,{width:o.stencilCoordinates.width,height:o.stencilCoordinates.height,transitions:o.transitions,class:s.classes.boundingBox,handlers:o.handlers,"handlers-component":o.handlersComponent,"handlers-classes":o.handlersClasses,"handlers-wrappers-classes":o.handlersWrappersClasses,lines:o.lines,"lines-component":o.linesComponent,"lines-classes":o.linesClasses,"lines-wrappers-classes":o.linesWrappersClasses,resizable:o.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:e.withCtx(function(){return[e.createVNode(c,{movable:o.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:e.withCtx(function(){return[e.createVNode(a,{image:o.image,coordinates:o.coordinates,width:o.stencilCoordinates.width,height:o.stencilCoordinates.height,class:s.classes.preview,transitions:o.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 _0=["transitions"],_t=Ct("vue-advanced-cropper"),bl={name:"Cropper",components:{BackgroundWrapper:Fr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return wl}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Fr}},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 w0.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 t=n.event,o=n.coordinates,i=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=Z(Z({},o),{right:o.left+o.width,bottom:o.top+o.height}),c=t.params||{},l=Z({},t.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),$t.forEach(function($){u[$]||(l[$]=0)});var f=Mt(a,l=dl({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,h=Mt(a,l).height,p=c.preserveRatio?ce(a):Mr(f/h,i);if(p){var k=c.respectDirection;if(k||(k=a.width>=a.height||p===1?"width":"height"),k==="width"){var C=f/p-a.height;if(u.top&&u.bottom){var N=l.top,E=l.bottom;l.bottom=ci(C,E,N),l.top=ci(C,N,E)}else u.bottom?l.bottom=C:u.top?l.top=C:u.right?l.right=0:u.left&&(l.left=0)}else if(k==="height"){var y=a.width-h*p;if(u.left&&u.right){var M=l.left,b=l.right;l.left=-ci(y,M,b),l.right=-ci(y,b,M)}else u.left?l.left=-y:u.right?l.right=-y:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=dl({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return f=Mt(a,l).width,h=Mt(a,l).height,(p=c.preserveRatio?ce(a):Mr(f/h,i))&&Math.abs(p-f/h)>.001&&$t.forEach(function($){u[$]||(l[$]=0)}),Ir({event:new Vr({left:-l.left,top:-l.top}),coordinates:{width:o.width+l.right+l.left,height:o.height+l.top+l.bottom,left:o.left,top:o.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Ir},initStretcher:{type:Function,default:function(n){var t=n.stretcher,o=n.imageSize,i=ce(o);t.style.width=o.width+"px",t.style.height=t.clientWidth/i+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var t=n.visibleArea,o=n.coordinates,i=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=Z(Z({},o),Lt({width:o.width,height:o.height,aspectRatio:i,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,r.minHeight),minWidth:Math.min(t.width,r.minWidth)}}));return a=qe(a=ot(a,Un(ve(o),ve(a))),ai(Tt(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.getAreaRestrictions,r=n.coordinates,s=Z({},t);s.height=s.width/ce(o),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=ht(s,Math.max(r.height/s.height,r.width/s.width)));var a=ri(qn(r,Tt(s=ht(s,si(s,i({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=qe(s=ot(s,a),i({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:i.width,bottom:i.height}:r==="fit-area"&&(ce(o)>ce(i)?(a={top:0,bottom:i.height},t&&s==="move"&&(t.width>i.width?(a.left=-(t.width-i.width)/2,a.right=i.width-a.left):(a.left=0,a.right=i.width))):(a={left:0,right:i.width},t&&s==="move"&&(t.height>i.height?(a.top=-(t.height-i.height)/2,a.bottom=i.height-a.top):(a.top=0,a.bottom=i.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 t=n.imageSize,o={};return n.imageRestriction!=="none"&&(o={left:0,top:0,right:t.width,bottom:t.height}),o}}},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:le({},ol)}},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(t){return t*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=Nr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Nr(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:ze(this.minWidth)?0:ii(this.minWidth),minHeight:ze(this.minHeight)?0:ii(this.minHeight),maxWidth:ze(this.maxWidth)?1/0:ii(this.maxWidth),maxHeight:ze(this.maxHeight)?1/0:ii(this.maxHeight)});if(n=function(i){var r=i.areaRestrictions,s=i.sizeRestrictions,a=i.boundaries,c=i.positionRestrictions,l=Z(Z({},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});c.left!==void 0&&c.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,c.bottom-c.top));var u=Pr(r),f=rl(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>f.width)&&(l.maxWidth=Math.min(l.maxWidth,f.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>f.height)&&(l.maxHeight=Math.min(l.maxHeight,f.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({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 t=this.getStencilSize(),o=Pr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,o.width*t.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,o.height*t.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:_t(),image:Ie(_t("image"),this.imageClass),stencil:_t("stencil"),boundaries:Ie(_t("boundaries"),this.boundariesClass),stretcher:Ie(_t("stretcher")),background:Ie(_t("background"),this.backgroundClass),foreground:Ie(_t("foreground"),this.foregroundClass),imageWrapper:Ie(_t("image-wrapper")),cropperWrapper:Ie(_t("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,t=n.width,o=n.height,i=n.left,r=n.top;return{width:t/this.coefficient,height:o/this.coefficient,left:(i-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)},t={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},o={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},i=le(le({},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(-t.left-o.left-this.imageTransforms.translateX,"px, ").concat(-t.top-o.top-this.imageTransforms.translateY,"px)")+ml(i)};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,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(o){return n[o]!==t[o]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Br(this.update,this.debounce),this.debouncedDisableTransitions=Br(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(le({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:le({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var o=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?le({},this.visibleArea):null,imageTransforms:t,get canvas(){return o.canvas?o.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?le({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;this.onManipulateImage(new yo({},{factor:1/n,center:t}),{normalize:!1,transitions:r})},move:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;this.onManipulateImage(new yo({left:n||0,top:t||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var t=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=o.autoZoom,r=i===void 0||i,s=o.transitions,a=s===void 0||s;this.$nextTick(function(){t.imageLoaded?(t.transitionsActive||(a&&t.enableTransitions(),t.coordinates=t.applyTransform(n),r&&t.runAutoZoom("setCoordinates"),a&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=n})},refresh:function(){var n=this,t=this.$refs.image;if(this.src&&t)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 t=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){n(),t.awaiting=!1}))},prepareResult:function(n){return this.roundResult?function(t){var o=t.coordinates,i=t.sizeRestrictions,r=t.positionRestrictions,s={width:Math.round(o.width),height:Math.round(o.height),left:Math.round(o.left),top:Math.round(o.top)};return s.width>i.maxWidth?s.width=Math.floor(o.width):s.width<i.minWidth&&(s.width=Math.ceil(o.width)),s.height>i.maxHeight?s.height=Math.floor(o.height):s.height<i.minHeight&&(s.height=Math.ceil(o.height)),qe(s,r)}(le(le({},this.getPublicProperties()),{},{positionRestrictions:li(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,o,i){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?S0:this.autoZoom?k0:x0);var s=r({event:{type:n,params:i},visibleArea:t,coordinates:o,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return le(le({},s),{},{changed:!il(s.visibleArea,t)||!il(s.coordinates,o)})},runAutoZoom:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.transitions,i=o!==void 0&&o,r=d0(t,_0),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,l=s.changed;i&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,i&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(t){var o=t.event,i=t.visibleArea,r=t.coefficient;if(o.type==="manipulateImage")return Z(Z({},o),{move:{left:o.move&&o.move.left?r*o.move.left:0,top:o.move&&o.move.top?r*o.move.top:0},scale:{factor:o.scale&&o.scale.factor?o.scale.factor:1,center:o.scale&&o.scale.center?{left:o.scale.center.left*r+i.left,top:o.scale.center.top*r+i.top}:null}});if(o.type==="resize"){var s=Z(Z({},o),{directions:Z({},o.directions)});return $t.forEach(function(c){s.directions[c]*=r}),s}if(o.type==="move"){var a=Z(Z({},o),{directions:Z({},o.directions)});return y0.forEach(function(c){a.directions[c]*=r}),a}return o}(le(le({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,t=this.$refs.image,o=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,l,u){var f=u.rotate,h=u.flip,p={width:l.naturalWidth,height:l.naturalHeight},k=sl(p,f),C=c.getContext("2d");c.height=k.height,c.width=k.width,C.save();var N=Yt(ve(Z({left:0,top:0},p)),f);return C.translate(-(N.left-k.width/2),-(N.top-k.height/2)),C.rotate(f*Math.PI/180),C.translate(h.horizontal?p.width:0,h.vertical?p.height:0),C.scale(h.horizontal?-1:1,h.vertical?-1:1),C.drawImage(l,0,0,p.width,p.height),C.restore(),c}(this.$refs.sourceCanvas,t,this.imageTransforms):t,i=le({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Lt({sizeRestrictions:{minWidth:r([i.width,i.minWidth])||0,minHeight:r([i.height,i.minHeight])||0,maxWidth:r([i.width,i.maxWidth])||1/0,maxHeight:r([i.height,i.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(i.maxArea&&s.width*s.height>i.maxArea){var a=Math.sqrt(i.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,l,u,f,h){c.width=f?f.width:u.width,c.height=f?f.height:u.height;var p=c.getContext("2d");p.clearRect(0,0,c.width,c.height),h&&(h.imageSmoothingEnabled&&(p.imageSmoothingEnabled=h.imageSmoothingEnabled),h.imageSmoothingQuality&&(p.imageSmoothingQuality=h.imageSmoothingQuality),h.fillColor&&(p.fillStyle=h.fillColor,p.fillRect(0,0,c.width,c.height),p.save()));var k=u.left<0?-u.left:0,C=u.top<0?-u.top:0;p.drawImage(l,u.left+k,u.top+C,u.width,u.height,k*(c.width/u.width),C*(c.height/u.height),c.width,c.height)}(n,o,this.coordinates,s,i),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],o=this.visibleArea&&t?b0(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&t?li(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return C0({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:o,positionRestrictions:i,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?N0:B0);var o=this.sizeRestrictions;o.minWidth,o.minHeight,o.maxWidth,o.maxHeight;var i=Hn(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,r=this.defaultPosition||E0,s=[i,function(a){var c=a.coordinates;return le({},Hn(r)?r({coordinates:c,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,wn(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 t=n.$refs.stretcher;t&&(t.style.height="auto",t.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,t=this.$refs.stretcher,o=this.$refs.cropper;return this.initStretcher({cropper:o,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then(function(){var i={cropper:o,imageSize:n.imageSize};if(Hn(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(i):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,l=s.clientWidth,u=c,f=a.width*c/a.height;return f>l&&(f=l,u=a.height*l/a.width),{width:f,height:u}}(i):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(i),!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=le(le({},this.defaultImageTransforms),{},{flip:le({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var t,o,i,r,s,a,c=n.defaultVisibleArea||V0;n.visibleArea=Hn(c)?c({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(t={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},o=t.visibleArea,i=t.boundaries,r=t.getAreaRestrictions,s=Z({},o),a=ce(i),s.width/s.height!==a&&(s.height=s.width/a),qe(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,t=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(Za(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&l(c)==l(s))}(this.src)){var o=ze(this.crossOrigin)?this.canvas:this.crossOrigin;o===!0&&(o="anonymous"),this.imageAttributes.crossOrigin=o||null}if(this.checkOrientation){var i=(n=this.src,new Promise(function(r){O0(n).then(function(s){var a=L0(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(){i.then(t.onParseImage)},this.transitionTime)}else setTimeout(function(){t.onParseImage({source:t.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var n=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){n.$emit("ready"),n.onChange(!1)}))},onParseImage:function(n){var t=this,o=n.source,i=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,i&&r&&r>1?Xa(o)||!Za(o)?(this.imageAttributes.src=URL.createObjectURL(new Blob([i])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var l=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(i):this.imageAttributes.src=o,Hn(this.defaultTransforms)?this.appliedImageTransforms=Dr(this.defaultTransforms()):oi(this.defaultTransforms)?this.appliedImageTransforms=Dr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Dr({});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=le(le({},this.appliedImageTransforms),{},{flip:le({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=t.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?t.onSuccessLoadImage():t.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(n){var t=this;this.transitionsOptions.enabled||this.awaitRender(function(){t.coordinates=t.moveAlgorithm(le(le({},t.getPublicProperties()),{},{positionRestrictions:li(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(n)})),t.onChange()})},onResize:function(n){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var o=t.sizeRestrictions,i=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(le(le({},t.getPublicProperties()),{},{positionRestrictions:li(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(o.maxWidth,t.visibleArea.width),maxHeight:Math.min(o.maxHeight,t.visibleArea.height),minWidth:Math.max(o.minWidth,i),minHeight:Math.max(o.minHeight,i)},event:t.normalizeEvent(n)})),t.onChange(),t.ticking=!1})},onManipulateImage:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var o=t.transitions,i=o!==void 0&&o,r=t.normalize,s=r===void 0||r;i&&this.enableTransitions();var a=$0(le(le({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,l=a.coordinates;this.visibleArea=c,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),i&&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]:{},t=n.visibleArea,o=n.type,i=o===void 0?"move":o;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:i})},getAspectRatio:function(n){var t,o,i=this.stencilProps,r=i.aspectRatio,s=i.minAspectRatio,a=i.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();t=c.minimum,o=c.maximum}if(ze(t)&&(t=ze(r)?s:r),ze(o)&&(o=ze(r)?a:r),!n&&(ze(t)||ze(o))){var l=this.getStencilSize(),u=l?ce(l):null;ze(t)&&(t=Ja(u)?u:void 0),ze(o)&&(o=Ja(u)?u:void 0)}return{minimum:t,maximum:o}},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)},t=n.boundaries,o=n.stencilSize,i=n.aspectRatio,Mr(ce(r=Hn(o)?o({boundaries:t,aspectRatio:i}):o),i)&&(r=Lt({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:i.minimum,maximum:i.maximum}})),(r.width>t.width||r.height>t.height)&&(r=Lt({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:ce(r),maximum:ce(r)}})),r;var n,t,o,i,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 le({},ol)},flip:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;if(!this.transitionsActive){r&&this.enableTransitions();var s=le({},this.imageTransforms.flip),a=M0({flip:{horizontal:n?!s.horizontal:s.horizontal,vertical:t?!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()}),c=a.visibleArea,l=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.transitions,i=o===void 0||o;if(!this.transitionsActive){i&&this.enableTransitions();var r=le({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=T0({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,c=s.coordinates,l=this.processAutoZoom("rotateImage",a,c);a=l.visibleArea,c=l.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),i&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},H0={key:0,ref:"canvas",style:{display:"none"}},U0={key:1,ref:"sourceCanvas",style:{display:"none"}};bl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"cropper",class:s.classes.cropper},[e.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),e.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.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:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),e.createVNode("div",{class:s.classes.imageWrapper},[e.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:t[1]||(t[1]=e.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),e.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.stencilComponent),e.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},o.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[e.vShow,r.imageLoaded]]),o.canvas?(e.openBlock(),e.createBlock("canvas",H0,null,512)):e.createCommentVNode("",!0),o.canvas?(e.openBlock(),e.createBlock("canvas",U0,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const v0={width:0,height:0,left:0,top:0};class Lr{constructor(){d(this,"id");d(this,"ratio",0);d(this,"src","");d(this,"coordinates",v0)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,o=0,i){const r=new Lr;return r.src=t,r.ratio=o,r.id=i,r}setRatio(t){this.ratio=t}getRatio(){return this.ratio}setSrc(t){this.src=t}getSrc(){return this.src}}const q0={class:"cropper-wrapper"},j0={class:"row justify-end q-mt-md"},W0=D(e.defineComponent({__name:"ImageCropper",props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:1}},emits:["crop","update:ratio"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.ratio),s=e.ref(Lr.Create(o.src,o.ratio));s.value.setRatio(r.value);const a=e.ref(),c=e.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}]),l=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(h=>{var p;i("crop",{blob:h,src:(p=f.canvas)==null?void 0:p.toDataURL()}),i("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,h)=>(e.openBlock(),e.createElementBlock("div",q0,[e.createVNode(go,{modelValue:r.value,"onUpdate:modelValue":[h[0]||(h[0]=p=>r.value=p),h[1]||(h[1]=p=>l(p))],clearable:!1,options:c.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),e.createVNode(e.unref(bl),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:h[2]||(h[2]=p=>s.value.setCoordinates(p.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",j0,[e.createVNode(oe,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),G0={class:"uploader-content"},Q0={class:"uploader-icon"},Y0={class:"tools-button absolute-full column items-center justify-center"},X0={class:"row q-gutter-sm"},Z0=D(e.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:t}){const o=x.ClosePopup,i=n,r=t,s=e.ref(),a=e.ref(),c=e.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),l=e.ref(!1),u=e.ref();e.onMounted(()=>{e.nextTick(()=>{var b;const M=(b=a.value)==null?void 0:b.querySelector(".q-uploader__input");M&&!M.getAttribute("aria-label")&&M.setAttribute("aria-label","Добавить изображение")})});const f=e.ref(i.ratio),h=e.ref(""),p=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),k=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),C=()=>{s.value=void 0,f.value=1,r("update:ratio",1),r("removeFile")},N=M=>{M.blob.src=M.src,i.fileInfo.setFile&&i.fileInfo.setFile(M.blob),i.fileInfo.fileSystemPath&&(s.value=i.fileInfo),l.value=!1,r("crop")},E=M=>{h.value=M.url,l.value=!0},y=M=>{if(M.length===0)return;const b=M[0];b.url=URL.createObjectURL(b),s.value=b,i.fileInfo.setFile&&i.fileInfo.setFile(b),i.withCrop&&E(s.value)};return e.watch(f,M=>{r("update:ratio",M)}),e.watch(()=>[i.fileInfo.description,i.fileInfo.order,i.fileInfo.fileSystemPath],()=>{i.fileInfo.fileSystemPath&&(s.value=i.fileInfo,i.fileInfo.getFileUrl&&(s.value.url=i.fileInfo.getFileUrl()))}),e.onBeforeMount(()=>{i.fileInfo.fileSystemPath&&(s.value=i.fileInfo,i.fileInfo.getFileUrl&&(s.value.url=i.fileInfo.getFileUrl()))}),(M,b)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootEl",ref:a,class:"column items-center q-my-md"},[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"img-container relative-position",style:e.normalizeStyle(e.unref(p))},[e.createVNode(e.unref(x.QImg),{src:e.unref(s).url,ratio:e.unref(f),class:"uploaded-image",alt:"Загруженное изображение","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",Y0,[e.createElementVNode("div",X0,[e.createVNode(oe,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md","aria-label":"Изменить обрезку",onClick:b[0]||(b[0]=$=>E(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...b[5]||(b[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(oe,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md","aria-label":"Удалить изображение",onClick:C},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...b[6]||(b[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(x.QUploader),{key:0,id:e.unref(c),ref_key:"uploader",ref:u,class:"img-uploader",style:e.normalizeStyle(e.unref(k)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:y,onRemoved:C},{header:e.withCtx(()=>[e.createElementVNode("div",G0,[e.createVNode(e.unref(x.QUploaderAddTrigger)),e.createElementVNode("div",Q0,[e.createVNode(e.unref(x.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),b[4]||(b[4]=e.createElementVNode("div",{class:"uploader-text text-primary text-center"},[e.createElementVNode("div",{class:"text-weight-medium"},"Добавить изображение"),e.createElementVNode("div",{class:"text-caption text-grey-6 q-mt-xs"}," Перетащите файл или нажмите для загрузки ")],-1))])]),_:1},8,["id","style","accept","max-file-size"])),e.createVNode(dn,{modelValue:e.unref(l),"onUpdate:modelValue":b[3]||(b[3]=$=>e.isRef(l)?l.value=$:null),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{class:"full-height"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QSpace)),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",round:"",dense:"","aria-label":"Закрыть"},null,512),[[e.unref(o)]])]),_:1}),e.createVNode(e.unref(x.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(W0,{ratio:e.unref(f),"onUpdate:ratio":b[1]||(b[1]=$=>e.isRef(f)?f.value=$:null),src:e.unref(h),onCrop:N,onClose:b[2]||(b[2]=$=>l.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],512))}}),[["__scopeId","data-v-e10bfc0c"]]);function J0(n){n.component("PMenuTabs",t0),n.component("PUploaderFile",c0),n.component("PUploaderImage",Z0),n.component("PAuthForm",Wa),n.component("PAuthModal",Ky)}const K0={install:function(n){$g(n),Zy(n),ay(n),J0(n),W1(n)}};function ew(n,t={}){const{quasarPlugins:o=!0}=t;o&&n.use(x.Quasar,{plugins:{Notify:x.Notify,Dialog:x.Dialog}}),K0.install(n),Ia(n),ca(n),Pa(n)}class tw extends Eo{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new Zr);d(this,"method",En.Login);d(this,"id","field-auth-login")}}const nw=["PF","PFM"];L.AuthButtonLogin=bi,L.AuthButtonRefresh=Yr,L.AuthButtonRegister=Ci,L.AuthButtonRestore=xo,L.AuthChunks=Le,L.AuthFieldsIds=zt,L.AuthFormSettings=Kr,L.AuthMethods=En,L.EmailField=Bo,L.LoginField=tw,L.PAddDialog=Ua,L.PBadge=lo,L.PButton=oe,L.PCard=va,L.PCheckBox=Ra,L.PChip=ur,L.PContactForm=Ki,L.PContactFormDeleteDialog=co,L.PContactFormEdit=er,L.PContactFormEditDialog=uo,L.PContactFormEditEmails=tr,L.PContactFormEditPhones=nr,L.PContactFormView=or,L.PContactFormViewEmails=un,L.PContactFormViewPhones=fn,L.PCrudList=qa,L.PDateInput=ti,L.PDateTimeInput=Aa,L.PDialog=dn,L.PEditDialog=_n,L.PF=z,L.PFM=ig,L.PHint=kr,L.PInput=et,L.POptionsListSingle=Jo,L.POpts=za,L.PSelect=go,L.PTable=br,L.PTableBadge=fr,L.PTableBadges=mr,L.PTableCount=hr,L.PTableEdit=pr,L.PTableNumber=gr,L.PTableSelect=yr,L.PTableString=wr,L.PTableToggle=Da,L.PTabs=Cr,L.PTabsLeft=Sr,L.PToggle=Fa,L.PasswordField=No,L.PasswordRepeatField=Jr,L.Schedule=mo,L.ScheduleDay=Zo,L.ScheduleDefaultLabels=dr,L.ScheduleGridEditor=Ta,L.SchedulePlace=On,L.ScheduleSession=Fn,L.ScheduleSlot=Ot,L.ScheduleTimeline=Ma,L.TabsStore=Ko,L.defaultContactsLabels=Vt,L.installSprof=ew,L.pfName=nw,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
43
+ ***************************************************************************** */function Xa(n,t){var o,i;return n&&t?(o=""+n+t[0].toUpperCase()+t.slice(1),i=n+"-"+t):(o=n||t,i=n||t),{name:o,classname:i}}function Za(n){return/^blob:/.test(n)}function Ja(n){return Za(n)||function(t){return/^data:/.test(t)}(n)}function Un(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Ae(n){return n===void 0}function ri(n){return typeof n=="object"&&n!==null}function Vr(n,t,o){var i={};return ri(n)?(Object.keys(t).forEach(function(r){Ae(n[r])?i[r]=t[r]:ri(t[r])?ri(n[r])?i[r]=Vr(n[r],t[r],o[r]):i[r]=n[r]?t[r]:o[r]:t[r]===!0||t[r]===!1?i[r]=!!n[r]:i[r]=n[r]}),i):n?t:o}function si(n){var t=Number(n);return Number.isNaN(t)?n:t}function Ka(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!el(n)}function el(n){return n!=n}function tl(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var bo=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},m0=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},Nr=function(n){this.type="move",this.directions=n},h0=function(){function n(t,o,i,r,s){this.type="drag",this.nativeEvent=t,this.position=i,this.previousPosition=r,this.element=o,this.anchor=s}return n.prototype.shift=function(){var t=this,o=t.element,i=t.anchor,r=t.position;if(o){var s=o.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-i.left,top:r.top-c-i.top}}return{left:0,top:0}},n}(),$r={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=bn(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(t,o){return{clientX:t.clientX+o.clientX/n.touches.length,clientY:t.clientY+o.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 t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),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 t=this.$refs.draggable.getBoundingClientRect(),o=t.left,i=t.right,r=t.bottom,s=t.top;this.anchor={left:n.clientX-o,top:n.clientY-s,bottom:r-n.clientY,right:i-n.clientX}},processMove:function(n,t){var o=bn(t);if(this.touches.length){if(this.touches.length===1&&o.length===1){var i=this.$refs.draggable;this.$emit("drag",new h0(n,i,{left:o[0].clientX,top:o[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=o}},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"]};$r.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"draggable",class:o.classname,onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:t[3]||(t[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:t[4]||(t[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],34)};var Tr=bt("vue-handler-wrapper"),nl={name:"HandlerWrapper",components:{DraggableElement:$r},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var n;if(this.horizontalPosition||this.verticalPosition){var t,o=Xa(this.horizontalPosition,this.verticalPosition);n=Tr((ft(t={},o.classname,!0),ft(t,"disabled",this.disabled),t))}else n=Tr({disabled:this.disabled});return{root:n,draggable:Tr("draggable")}}},emits:["leave","enter","drag","drag-end"]};nl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock("div",{class:s.classes.root},[e.createVNode(a,{class:s.classes.draggable,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var p0=bt("vue-line-wrapper"),ol={name:"LineWrapper",components:{DraggableElement:$r},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return p0((ft(n={},this.position,!0),ft(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};ol.render=function(n,t,o,i,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock(a,{class:s.classname,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var Nt=["left","right","top","bottom"],g0=["left","right"],y0=["top","bottom"],w0=["left","top"],b0=["fill-area","fit-area","stencil","none"],il={left:0,top:0,width:0,height:0};function rl(n,t,o){return!(o=o||["width","height","left","top"]).some(function(i){return n[i]!==t[i]})}function $t(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function vn(n,t){return{left:n.left-t.left,top:n.top-t.top}}function He(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function Co(n,t){var o={left:0,top:0,right:0,bottom:0};return Nt.forEach(function(i){var r=t[i],s=$t(n)[i];o[i]=r!==void 0&&s!==void 0?i==="left"||i==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),o}function Tt(n,t){return{left:n.left-t.left,top:n.top-t.top,width:n.width+t.left+t.right,height:n.height+t.top+t.bottom}}function ai(n){return{left:-n.left,top:-n.top}}function nt(n,t){return X(X({},n),{left:n.left+t.left,top:n.top+t.top})}function mt(n,t,o,i){if(t!==1){if(o){var r=He(n);return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2+(o.left-r.left)*(1-t),top:n.top+n.height*(1-t)/2+(o.top-r.top)*(1-t)}}return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2,top:n.top+n.height*(1-t)/2}}return n}function ue(n){return n.width/n.height}function qn(n,t){return Math.min(t.right!==void 0&&t.left!==void 0?(t.right-t.left)/n.width:1/0,t.bottom!==void 0&&t.top!==void 0?(t.bottom-t.top)/n.height:1/0)}function jn(n,t){var o={left:0,top:0},i=Co(n,t);return i.left&&i.left>0?o.left=i.left:i.right&&i.right>0&&(o.left=-i.right),i.top&&i.top>0?o.top=i.top:i.bottom&&i.bottom>0&&(o.top=-i.bottom),o}function Pr(n,t){var o;return t.minimum&&n<t.minimum?o=t.minimum:t.maximum&&n>t.maximum&&(o=t.maximum),o}function sl(n,t){var o=ue(n),i=ue(t);return t.width<1/0&&t.height<1/0?o>i?{width:t.width,height:t.width/o}:{width:t.height*o,height:t.height}:t.width<1/0?{width:t.width,height:t.width/o}:t.height<1/0?{width:t.height*o,height:t.height}:n}function al(n,t){var o=t*Math.PI/180;return{width:Math.abs(n.width*Math.cos(o))+Math.abs(n.height*Math.sin(o)),height:Math.abs(n.width*Math.sin(o))+Math.abs(n.height*Math.cos(o))}}function Qt(n,t){var o=t*Math.PI/180;return{left:n.left*Math.cos(o)-n.top*Math.sin(o),top:n.left*Math.sin(o)+n.top*Math.cos(o)}}function li(n,t){var o=Co(Ue(n,t),t);return o.left+o.right+o.top+o.bottom?o.left+o.right>o.top+o.bottom?Math.min((n.width+o.left+o.right)/n.width,qn(n,t)):Math.min((n.height+o.top+o.bottom)/n.height,qn(n,t)):1}function Ue(n,t,o){o===void 0&&(o=!1);var i=jn(n,t);return nt(n,o?ai(i):i)}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 C0(n,t){return X(X({},n),{minWidth:Math.min(t.width,n.minWidth),minHeight:Math.min(t.height,n.minHeight),maxWidth:Math.min(t.width,n.maxWidth),maxHeight:Math.min(t.height,n.maxHeight)})}function ll(n,t,o){o===void 0&&(o=!0);var i={};return Nt.forEach(function(r){var s=n[r],a=t[r];s!==void 0&&a!==void 0?i[r]=r==="left"||r==="top"?o?Math.max(s,a):Math.min(s,a):o?Math.min(s,a):Math.max(s,a):a!==void 0?i[r]=a:s!==void 0&&(i[r]=s)}),i}function ci(n,t){return ll(n,t,!0)}function cl(n){var t=n.size,o=n.aspectRatio,i=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||ue(t)>=o.minimum&&ue(t)<=o.maximum)&&t.height<=r.maxHeight&&t.width<=r.maxWidth&&t.width&&t.height&&(i||t.height>=r.minHeight&&t.width>=r.minWidth))}function dl(n,t){return Math.pow(n.width-t.width,2)+Math.pow(n.height-t.height,2)}function Ot(n){var t=n.width,o=n.height,i=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(i.minWidth,Math.min(i.maxWidth,t)),height:Math.max(i.minHeight,Math.min(i.maxHeight,o))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(m,p){return cl({size:p,aspectRatio:r,sizeRestrictions:i,ignoreMinimum:f})&&(!m||dl(p,{width:t,height:o})<dl(m,{width:t,height:o}))?p:m},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),cl({size:s,aspectRatio:r,sizeRestrictions:i})&&c.push(s);var l=a(c)||a(c,!0);return l&&{width:l.width,height:l.height}}function Ir(n){var t=n.event,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=nt(o,t.directions);return nt(s,jn(s,r))}function S0(n){var t=n.coordinates,o=n.transform,i=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,c=n.visibleArea,l=function(f,m){return Ir({coordinates:f,positionRestrictions:s,event:new Nr({left:m.left-f.left,top:m.top-f.top})})},u=X({},t);return(Array.isArray(o)?o:[o]).forEach(function(f){var m={};Ae((m=typeof f=="function"?f({coordinates:u,imageSize:i,visibleArea:c}):f).width)&&Ae(m.height)||(u=function(p,k){var E=X(X(X({},p),Ot({width:k.width,height:k.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(E,{left:p.left,top:p.top})}(u,X(X({},u),m))),Ae(m.left)&&Ae(m.top)||(u=l(u,X(X({},u),m)))}),u}function k0(n){n.event;var t=n.getAreaRestrictions,o=n.boundaries,i=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,c=n.positionRestrictions;n.stencilReference;var l,u,f,m=X({},i),p=X({},r),k=X({},s);l=ue(k),u=ue(m),f===void 0&&(f=.001),(l===0||u===0?Math.abs(u-l)<f:Math.abs(u/l)<1+f&&Math.abs(u/l)>1-f)||(m=X(X({},m),Ot({sizeRestrictions:a,width:m.width,height:m.height,aspectRatio:{minimum:ue(k),maximum:ue(k)}})));var E=li(p=mt(p,m.width*o.width/(p.width*k.width)),t({visibleArea:p,type:"resize"}));return E!==1&&(p=mt(p,E),m=mt(m,E)),p=Ue(p=nt(p,vn(He(m),He(p))),t({visibleArea:p,type:"move"})),{coordinates:m=Ue(m,ci($t(p),c)),visibleArea:p}}function x0(n){var t=n.event,o=n.getAreaRestrictions,i=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var c=X({},r),l=X({},s);if(r&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};l.width,i.width,ue(i)>ue(c)?(u.height=.8*i.height,u.width=u.height*ue(c)):(u.width=.8*i.width,u.height=u.width*ue(c));var f=li(l=mt(l,c.width*i.width/(l.width*u.width)),o({visibleArea:l,type:"resize"}));l=mt(l,f),f!==1&&(u.height/=f,u.width/=f),l=Ue(l=nt(l,vn(He(c),He(l))),o({visibleArea:l,type:"move"})),c=Ue(c,ci($t(l),a))}return{coordinates:c,visibleArea:l}}function E0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.getAreaRestrictions,s=X({},i),a=X({},o);if(t.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),l=Math.max(0,a.height-s.height);c>l?s=mt(s,Math.min(a.width/s.width,qn(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=mt(s,Math.min(a.height/s.height,qn(s,r({visibleArea:s,type:"resize"}))))),s=Ue(s=nt(s,ai(jn(a,$t(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function B0(n){var t=n.imageSize,o=n.visibleArea,i=n.coordinates,r=o||t;return{left:(o?o.left:0)+r.width/2-i.width/2,top:(o?o.top:0)+r.height/2-i.height/2}}function V0(n){var t=n.imageSize,o=n.visibleArea,i=n.aspectRatio,r=n.sizeRestrictions,s=o||t,a=Math.min(i.maximum||1/0,Math.max(i.minimum||0,ue(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Ot(X(X({},c),{aspectRatio:i,sizeRestrictions:r}))}function N0(n){var t,o,i=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,c=n.sizeRestrictions,l=n.stencilSize,u=r||i;return ue(u)>ue(s)?o=(t=l.height*u.height/s.height)*ue(l):t=(o=l.width*u.width/s.width)/ue(l),Ot({width:o,height:t,aspectRatio:a,sizeRestrictions:c})}function $0(n){var t=n.getAreaRestrictions,o=n.coordinates,i=n.imageSize,r=ue(n.boundaries);if(o){var s={height:Math.max(o.height,i.height),width:Math.max(o.width,i.width)},a=sl({width:ue(s)>r?s.width:s.height*r,height:ue(s)>r?s.width/r:s.height},Mr(t())),c={left:o.left+o.width/2-a.width/2,top:o.top+o.height/2-a.height/2,width:a.width,height:a.height},l=Co(o,$t(X({left:0,top:0},i))),u={};return!l.left&&!l.right&&c.width<=i.width&&(u.left=0,u.right=i.width),!l.top&&!l.bottom&&c.height<=i.height&&(u.top=0,u.bottom=i.height),Ue(c,u)}var f=ue(i);return a={height:f>r?i.height:i.width/r,width:f>r?i.height*r:i.width},{left:i.width/2-a.width/2,top:i.height/2-a.height/2,width:a.width,height:a.height}}function di(n,t){return ll(n,$t(t))}function T0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,c=n.adjustStencil,l=t.scale,u=t.move,f=X({},i),m=X({},o),p=1,k=1,E=l.factor&&Math.abs(l.factor-1)>.001;f=nt(f,{left:u.left||0,top:u.top||0});var V={stencil:{minimum:Math.max(r.minWidth?r.minWidth/m.width:0,r.minHeight?r.minHeight/m.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/m.width:1/0,r.maxHeight?r.maxHeight/m.height:1/0,qn(m,a))},area:{maximum:qn(f,s({visibleArea:f,type:"resize"}))}};l.factor&&E&&(l.factor<1?(k=Math.max(l.factor,V.stencil.minimum))>1&&(k=1):l.factor>1&&(k=Math.min(l.factor,Math.min(V.area.maximum,V.stencil.maximum)))<1&&(k=1)),k&&(f=mt(f,k,l.center));var N=o.left-i.left,C=i.width+i.left-(o.width+o.left),T=o.top-i.top,y=i.height+i.top-(o.height+o.top);return f=Ue(f=nt(f,jn(f,{left:a.left!==void 0?a.left-N*k:void 0,top:a.top!==void 0?a.top-T*k:void 0,bottom:a.bottom!==void 0?a.bottom+y*k:void 0,right:a.right!==void 0?a.right+C*k:void 0})),s({visibleArea:f,type:"move"})),m.width=m.width*k,m.height=m.height*k,m.left=f.left+N*k,m.top=f.top+T*k,m=Ue(m,ci($t(f),a)),l.factor&&E&&c&&(l.factor>1?p=Math.min(V.area.maximum,l.factor)/k:l.factor<1&&(p=Math.max(m.height/f.height,m.width/f.width,l.factor/k)),p!==1&&(f=nt(f=Ue(f=mt(f,p,l.factor>1?l.center:He(m)),s({visibleArea:f,type:"move"})),ai(jn(m,$t(f)))))),{coordinates:m,visibleArea:f}}function P0(n){var t=n.aspectRatio,o=n.getAreaRestrictions,i=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,c=n.imageSize,l=n.previousImageSize,u=n.angle,f=X({},i),m=X({},r),p=Qt(He(X({left:0,top:0},l)),u);return(f=X(X({},Ot({sizeRestrictions:s,aspectRatio:t,width:f.width,height:f.height})),Qt(He(f),u))).left-=p.left-c.width/2+f.width/2,f.top-=p.top-c.height/2+f.height/2,m=mt(m,li(m,o({visibleArea:m,type:"resize"}))),{coordinates:f=Ue(f,a),visibleArea:m=Ue(m=nt(m,vn(He(f),He(i))),o({visibleArea:m,type:"move"}))}}function M0(n){var t=n.flip,o=n.previousFlip,i=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,c=n.imageSize,l=X({},s),u=X({},a),f=o.horizontal!==t.horizontal,m=o.vertical!==t.vertical;if(f||m){var p=Qt({left:c.width/2,top:c.height/2},-i),k=Qt(He(l),-i),E=Qt({left:f?p.left-(k.left-p.left):k.left,top:m?p.top-(k.top-p.top):k.top},i);l=nt(l,vn(E,He(l))),k=Qt(He(u),-i),u=Ue(u=nt(u,vn(E=Qt({left:f?p.left-(k.left-p.left):k.left,top:m?p.top-(k.top-p.top):k.top},i),He(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function ul(n){var t=n.directions,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=n.sizeRestrictions,a=n.preserveRatio,c=n.compensate,l=X({},t),u=Tt(o,l).width,f=Tt(o,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(o.width-s.minWidth)/(l.left/l.right),l.right=-(o.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(o.width-s.minWidth):l.right<0&&(l.right=-(o.width-s.minWidth))),f<0&&(l.top<0&&l.bottom<0?(l.top=-(o.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(o.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(o.height-s.minHeight):l.bottom<0&&(l.bottom=-(o.height-s.minHeight)));var m=Co(Tt(o,l),r);c&&(m.left&&m.left>0&&m.right===0?(l.right+=m.left,l.left-=m.left):m.right&&m.right>0&&m.left===0&&(l.left+=m.right,l.right-=m.right),m.top&&m.top>0&&m.bottom===0?(l.bottom+=m.top,l.top-=m.top):m.bottom&&m.bottom>0&&m.top===0&&(l.top+=m.bottom,l.bottom-=m.bottom),m=Co(Tt(o,l),r));var p={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Nt.forEach(function(V){var N=m[V];N&&l[V]&&(p[V]=Math.max(0,1-N/l[V]))}),a){var k=Math.min.apply(null,Nt.map(function(V){return p[V]}));k!==1/0&&Nt.forEach(function(V){l[V]*=k})}else Nt.forEach(function(V){p[V]!==1/0&&(l[V]*=p[V])});if(u=Tt(o,l).width,f=Tt(o,l).height,l.right+l.left&&(u>s.maxWidth?p.width=(s.maxWidth-o.width)/(l.right+l.left):u<s.minWidth&&(p.width=(s.minWidth-o.width)/(l.right+l.left))),l.bottom+l.top&&(f>s.maxHeight?p.height=(s.maxHeight-o.height)/(l.bottom+l.top):f<s.minHeight&&(p.height=(s.minHeight-o.height)/(l.bottom+l.top))),a){var E=Math.min(p.width,p.height);E!==1/0&&Nt.forEach(function(V){l[V]*=E})}else p.width!==1/0&&g0.forEach(function(V){l[V]*=p.width}),p.height!==1/0&&y0.forEach(function(V){l[V]*=p.height});return l}function ui(n,t,o){return t==0&&o==0?n/2:t==0?0:o==0?n:n*Math.abs(t/(t+o))}var I0=bt("vue-simple-handler"),R0=bt("vue-simple-handler-wrapper"),Rr={name:"SimpleHandler",components:{HandlerWrapper:nl},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,t=(ft(n={},this.horizontalPosition,!!this.horizontalPosition),ft(n,this.verticalPosition,!!this.verticalPosition),ft(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),ft(n,"hover",this.hover),n);return{default:Me(I0(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(R0(t),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"]};Rr.render=function(n,t,o,i,r,s){var a=e.resolveComponent("HandlerWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,"vertical-position":o.verticalPosition,"horizontal-position":o.horizontalPosition,disabled:o.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var A0=bt("vue-simple-line"),z0=bt("vue-simple-line-wrapper"),Ar={name:"SimpleLine",components:{LineWrapper:ol},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:Me(A0(ft({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(z0(ft({},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"]};Ar.render=function(n,t,o,i,r,s){var a=e.resolveComponent("LineWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,position:o.position,disabled:o.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var zr=bt("vue-bounding-box"),D0=["east","west",null],F0=["south","north",null],fl={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 Rr}},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 Ar}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return D0.forEach(function(t){F0.forEach(function(o){if(t!==o){var i=Xa(t,o),r=i.name,s=i.classname;n.push({name:r,classname:s,verticalDirection:o,horizontalDirection:t})}})}),{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,t=this.handlersWrappersClasses,o=this.linesClasses,i=this.linesWrappersClasses;return{root:zr(),handlers:n,handlersWrappers:t,lines:o,linesWrappers:i}},lineNodes:function(){var n=this,t=[];return this.points.forEach(function(o){o.horizontalDirection&&o.verticalDirection||!n.lines[o.name]||t.push({name:o.name,component:n.linesComponent,class:Me(n.classes.lines.default,n.classes.lines[o.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Me(n.classes.linesWrappers.default,n.classes.linesWrappers[o.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:o.verticalDirection,horizontalDirection:o.horizontalDirection,disabled:!n.resizable})}),t},handlerNodes:function(){var n=this,t=[],o=this.width,i=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class:Me(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Me(n.classes.handlersWrappers.default,n.classes.handlersWrappers[r.name]),hoverClass:n.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!n.resizable};if(o&&i){var a=r.horizontalDirection,c=r.verticalDirection,l=a==="east"?o:a==="west"?0:o/2,u=c==="south"?i:c==="north"?0:i/2;s.wrapperClass=zr("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=zr("handler",ft({},r.classname,!0));t.push(s)}}),t}},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,t,o){var i,r=n.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};t==="west"?c.left-=s:t==="east"&&(c.right+=s),o==="north"?c.top-=a:o==="south"&&(c.bottom+=a),!o&&t?i="width":o&&!t&&(i="height"),this.resizable&&this.$emit("resize",new m0(c,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:o==="south"||!o,top:o==="north"||!o},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:i}))}},emits:["resize","resize-end"]};fl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[e.renderSlot(n.$slots,"default"),e.createVNode("div",null,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.lineNodes,function(a){return e.openBlock(),e.createBlock(e.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(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[1]||(t[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.handlerNodes,function(a){return e.openBlock(),e.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(e.openBlock(),e.createBlock(e.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(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[2]||(t[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var O0=bt("vue-draggable-area"),ml={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:O0()}}},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 t=this.movable&&n.touches.length===1;t&&(this.touches=bn(n.touches)),(this.touchStarted||t)&&(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()):tl({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 t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),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 t=this.$refs.container.getBoundingClientRect(),o=t.left,i=t.top;this.anchor={x:n.clientX-o,y:n.clientY-i}},processMove:function(n,t){var o=bn(t);if(this.touches.length){var i=this.$refs.container.getBoundingClientRect(),r=i.left,s=i.top;this.touches.length===1&&o.length===1&&this.$emit("move",new Nr({left:o[0].clientX-(r+this.anchor.x),top:o[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};ml.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};function Dr(n){var t,o;return{rotate:n.rotate||0,flip:{horizontal:((t=n==null?void 0:n.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((o=n==null?void 0:n.flip)===null||o===void 0?void 0:o.vertical)||!1}}}function L0(n){return new Promise(function(t,o){try{if(n)if(/^data:/i.test(n))t(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),f=u.length,m=new ArrayBuffer(f),p=new Uint8Array(m),k=0;k<f;k++)p[k]=u.charCodeAt(k);return m}(n));else if(/^blob:/i.test(n)){var i=new FileReader;i.onload=function(l){t(l.target.result)},s=n,a=function(l){i.readAsArrayBuffer(l)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?t(r.response):o("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 o("Error: the image is empty")}catch(l){o(l)}var s,a,c})}function hl(n){var t=n.rotate,o=n.flip,i=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+t+"deg) ",s+=" scaleX("+i*(o.horizontal?-1:1)+") ",s+=" scaleY("+r*(o.vertical?-1:1)+") "}function _0(n){try{var t,o=new DataView(n),i=void 0,r=void 0,s=void 0,a=void 0;if(o.getUint8(0)===255&&o.getUint8(1)===216)for(var c=o.byteLength,l=2;l+1<c;){if(o.getUint8(l)===255&&o.getUint8(l+1)===225){s=l;break}l++}if(s&&(i=s+10,function(k,E,V){var N,C="";for(N=E,V+=E;N<V;N++)C+=String.fromCharCode(k.getUint8(N));return C}(o,s+4,4)==="Exif")){var u=o.getUint16(i);if(((r=u===18761)||u===19789)&&o.getUint16(i+2,r)===42){var f=o.getUint32(i+4,r);f>=8&&(a=i+f)}}if(a){for(var m=o.getUint16(a,r),p=0;p<m;p++)if(l=a+12*p+2,o.getUint16(l,r)===274){l+=8,t=o.getUint16(l,r),o.setUint16(l,1,r);break}}return t}catch{return null}}function pl(n,t){var o=t.getBoundingClientRect(),i=o.left,r=o.top,s={left:0,top:0},a=0;return n.forEach(function(c){s.left+=(c.clientX-i)/n.length,s.top+=(c.clientY-r)/n.length}),n.forEach(function(c){a+=tl({x:s.left,y:s.top},{x:c.clientX-i,y:c.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var gl={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=Br(this.processEnd),this.touches=[]},methods:{processMove:function(n,t){if(this.touches.length){if(this.touches.length===1&&t.length===1)this.$emit("move",new bo({left:this.touches[0].clientX-t[0].clientX,top:this.touches[0].clientY-t[0].clientY}));else if(this.touches.length>1&&this.touchResize){var o=pl(t,this.$refs.container),i=this.oldGeometricProperties;i.count===o.count&&i.count>1&&this.$emit("resize",new bo({left:i.centerMass.left-o.centerMass.left,top:i.centerMass.top-o.centerMass.top},{factor:i.spread/o.spread,center:o.centerMass})),this.oldGeometricProperties=o}this.touches=t}},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 t=this.$refs.container,o=t.getBoundingClientRect(),i=o.left,r=o.top,s=o.bottom,a=o.right;this.touches=bn(n.touches).filter(function(c){return c.clientX>i&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=pl(this.touches,t)}},onTouchEnd:function(n){n.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(n){var t=this;if(this.touches.length){var o=bn(n.touches).filter(function(i){return!i.identifier||t.touches.find(function(r){return r.identifier===i.identifier})});this.processEvent(n)&&(this.processMove(n,o),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],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 t=this.$refs.container.getBoundingClientRect(),o=t.left,i=t.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(c=+a)==0||el(c)?c:c>0?1:-1),s={left:n.clientX-o,top:n.clientY-i};this.$emit("resize",new bo({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};gl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:t[3]||(t[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};var Fr={components:{TransformableImage:gl},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"]};Fr.render=function(n,t,o,i,r,s){var a=e.resolveComponent("transformable-image");return e.openBlock(),e.createBlock(a,{"touch-move":o.touchMove,"touch-resize":o.touchResize,"mouse-move":o.mouseMove,"wheel-resize":o.wheelResize,onMove:t[1]||(t[1]=function(c){return n.$emit("move",c)}),onResize:t[2]||(t[2]=function(c){return n.$emit("resize",c)})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var fi=bt("vue-preview"),yl={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:fi({fill:this.fill}),wrapper:fi("wrapper"),imageWrapper:fi("image-wrapper"),image:Me(fi("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,t=de(de({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),o=this.imageSize.width,i=this.imageSize.height,r=al({width:o,height:i},t.rotate),s={width:"".concat(o,"px"),height:"".concat(i,"px"),left:"0px",top:"0px"},a={rotate:{left:(o-r.width)*t.scaleX/2,top:(i-r.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*o/2,top:(1-t.scaleY)*i/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) ")+hl(t),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()}}};yl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[e.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[e.withDirectives(e.createVNode("img",{ref:"image",src:o.image&&o.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[e.vShow,o.image&&o.image.src]])],6)],6)};var wl={components:{Preview:yl},inheritAttrs:!1};wl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("preview");return e.openBlock(),e.createBlock(a,e.mergeProps(n.$attrs,{fill:!0}),null,16)};var Or=bt("vue-rectangle-stencil"),bl={name:"RectangleStencil",components:{StencilPreview:wl,BoundingBox:fl,DraggableArea:ml},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Rr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Ar}},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:Me(Or({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Me(Or("preview"),this.previewClass),boundingBox:Me(Or("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,t=n.height,o=n.width,i=n.left,r=n.top,s={width:"".concat(o,"px"),height:"".concat(t,"px"),transform:"translate(".concat(i,"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"]};bl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("stencil-preview"),c=e.resolveComponent("draggable-area"),l=e.resolveComponent("bounding-box");return e.openBlock(),e.createBlock("div",{class:s.classes.stencil,style:s.style},[e.createVNode(l,{width:o.stencilCoordinates.width,height:o.stencilCoordinates.height,transitions:o.transitions,class:s.classes.boundingBox,handlers:o.handlers,"handlers-component":o.handlersComponent,"handlers-classes":o.handlersClasses,"handlers-wrappers-classes":o.handlersWrappersClasses,lines:o.lines,"lines-component":o.linesComponent,"lines-classes":o.linesClasses,"lines-wrappers-classes":o.linesWrappersClasses,resizable:o.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:e.withCtx(function(){return[e.createVNode(c,{movable:o.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:e.withCtx(function(){return[e.createVNode(a,{image:o.image,coordinates:o.coordinates,width:o.stencilCoordinates.width,height:o.stencilCoordinates.height,class:s.classes.preview,transitions:o.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 H0=["transitions"],Lt=bt("vue-advanced-cropper"),Cl={name:"Cropper",components:{BackgroundWrapper:Fr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return bl}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Fr}},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 b0.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 t=n.event,o=n.coordinates,i=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=X(X({},o),{right:o.left+o.width,bottom:o.top+o.height}),c=t.params||{},l=X({},t.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),Nt.forEach(function(b){u[b]||(l[b]=0)});var f=Tt(a,l=ul({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,m=Tt(a,l).height,p=c.preserveRatio?ue(a):Pr(f/m,i);if(p){var k=c.respectDirection;if(k||(k=a.width>=a.height||p===1?"width":"height"),k==="width"){var E=f/p-a.height;if(u.top&&u.bottom){var V=l.top,N=l.bottom;l.bottom=ui(E,N,V),l.top=ui(E,V,N)}else u.bottom?l.bottom=E:u.top?l.top=E:u.right?l.right=0:u.left&&(l.left=0)}else if(k==="height"){var C=a.width-m*p;if(u.left&&u.right){var T=l.left,y=l.right;l.left=-ui(C,T,y),l.right=-ui(C,y,T)}else u.left?l.left=-C:u.right?l.right=-C:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=ul({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return f=Tt(a,l).width,m=Tt(a,l).height,(p=c.preserveRatio?ue(a):Pr(f/m,i))&&Math.abs(p-f/m)>.001&&Nt.forEach(function(b){u[b]||(l[b]=0)}),Ir({event:new Nr({left:-l.left,top:-l.top}),coordinates:{width:o.width+l.right+l.left,height:o.height+l.top+l.bottom,left:o.left,top:o.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Ir},initStretcher:{type:Function,default:function(n){var t=n.stretcher,o=n.imageSize,i=ue(o);t.style.width=o.width+"px",t.style.height=t.clientWidth/i+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var t=n.visibleArea,o=n.coordinates,i=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=X(X({},o),Ot({width:o.width,height:o.height,aspectRatio:i,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,r.minHeight),minWidth:Math.min(t.width,r.minWidth)}}));return a=Ue(a=nt(a,vn(He(o),He(a))),ci($t(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.getAreaRestrictions,r=n.coordinates,s=X({},t);s.height=s.width/ue(o),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=mt(s,Math.max(r.height/s.height,r.width/s.width)));var a=ai(jn(r,$t(s=mt(s,li(s,i({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=Ue(s=nt(s,a),i({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:i.width,bottom:i.height}:r==="fit-area"&&(ue(o)>ue(i)?(a={top:0,bottom:i.height},t&&s==="move"&&(t.width>i.width?(a.left=-(t.width-i.width)/2,a.right=i.width-a.left):(a.left=0,a.right=i.width))):(a={left:0,right:i.width},t&&s==="move"&&(t.height>i.height?(a.top=-(t.height-i.height)/2,a.bottom=i.height-a.top):(a.top=0,a.bottom=i.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 t=n.imageSize,o={};return n.imageRestriction!=="none"&&(o={left:0,top:0,right:t.width,bottom:t.height}),o}}},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:de({},il)}},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(t){return t*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=Vr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Vr(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:Ae(this.minWidth)?0:si(this.minWidth),minHeight:Ae(this.minHeight)?0:si(this.minHeight),maxWidth:Ae(this.maxWidth)?1/0:si(this.maxWidth),maxHeight:Ae(this.maxHeight)?1/0:si(this.maxHeight)});if(n=function(i){var r=i.areaRestrictions,s=i.sizeRestrictions,a=i.boundaries,c=i.positionRestrictions,l=X(X({},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});c.left!==void 0&&c.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,c.bottom-c.top));var u=Mr(r),f=sl(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>f.width)&&(l.maxWidth=Math.min(l.maxWidth,f.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>f.height)&&(l.maxHeight=Math.min(l.maxHeight,f.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({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 t=this.getStencilSize(),o=Mr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,o.width*t.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,o.height*t.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:Lt(),image:Me(Lt("image"),this.imageClass),stencil:Lt("stencil"),boundaries:Me(Lt("boundaries"),this.boundariesClass),stretcher:Me(Lt("stretcher")),background:Me(Lt("background"),this.backgroundClass),foreground:Me(Lt("foreground"),this.foregroundClass),imageWrapper:Me(Lt("image-wrapper")),cropperWrapper:Me(Lt("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,t=n.width,o=n.height,i=n.left,r=n.top;return{width:t/this.coefficient,height:o/this.coefficient,left:(i-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)},t={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},o={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},i=de(de({},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(-t.left-o.left-this.imageTransforms.translateX,"px, ").concat(-t.top-o.top-this.imageTransforms.translateY,"px)")+hl(i)};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,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(o){return n[o]!==t[o]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Br(this.update,this.debounce),this.debouncedDisableTransitions=Br(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(de({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:de({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var o=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?de({},this.visibleArea):null,imageTransforms:t,get canvas(){return o.canvas?o.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?de({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;this.onManipulateImage(new bo({},{factor:1/n,center:t}),{normalize:!1,transitions:r})},move:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;this.onManipulateImage(new bo({left:n||0,top:t||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var t=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=o.autoZoom,r=i===void 0||i,s=o.transitions,a=s===void 0||s;this.$nextTick(function(){t.imageLoaded?(t.transitionsActive||(a&&t.enableTransitions(),t.coordinates=t.applyTransform(n),r&&t.runAutoZoom("setCoordinates"),a&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=n})},refresh:function(){var n=this,t=this.$refs.image;if(this.src&&t)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 t=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){n(),t.awaiting=!1}))},prepareResult:function(n){return this.roundResult?function(t){var o=t.coordinates,i=t.sizeRestrictions,r=t.positionRestrictions,s={width:Math.round(o.width),height:Math.round(o.height),left:Math.round(o.left),top:Math.round(o.top)};return s.width>i.maxWidth?s.width=Math.floor(o.width):s.width<i.minWidth&&(s.width=Math.ceil(o.width)),s.height>i.maxHeight?s.height=Math.floor(o.height):s.height<i.minHeight&&(s.height=Math.ceil(o.height)),Ue(s,r)}(de(de({},this.getPublicProperties()),{},{positionRestrictions:di(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,o,i){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?k0:this.autoZoom?x0:E0);var s=r({event:{type:n,params:i},visibleArea:t,coordinates:o,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return de(de({},s),{},{changed:!rl(s.visibleArea,t)||!rl(s.coordinates,o)})},runAutoZoom:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.transitions,i=o!==void 0&&o,r=u0(t,H0),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,l=s.changed;i&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,i&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(t){var o=t.event,i=t.visibleArea,r=t.coefficient;if(o.type==="manipulateImage")return X(X({},o),{move:{left:o.move&&o.move.left?r*o.move.left:0,top:o.move&&o.move.top?r*o.move.top:0},scale:{factor:o.scale&&o.scale.factor?o.scale.factor:1,center:o.scale&&o.scale.center?{left:o.scale.center.left*r+i.left,top:o.scale.center.top*r+i.top}:null}});if(o.type==="resize"){var s=X(X({},o),{directions:X({},o.directions)});return Nt.forEach(function(c){s.directions[c]*=r}),s}if(o.type==="move"){var a=X(X({},o),{directions:X({},o.directions)});return w0.forEach(function(c){a.directions[c]*=r}),a}return o}(de(de({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,t=this.$refs.image,o=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,l,u){var f=u.rotate,m=u.flip,p={width:l.naturalWidth,height:l.naturalHeight},k=al(p,f),E=c.getContext("2d");c.height=k.height,c.width=k.width,E.save();var V=Qt(He(X({left:0,top:0},p)),f);return E.translate(-(V.left-k.width/2),-(V.top-k.height/2)),E.rotate(f*Math.PI/180),E.translate(m.horizontal?p.width:0,m.vertical?p.height:0),E.scale(m.horizontal?-1:1,m.vertical?-1:1),E.drawImage(l,0,0,p.width,p.height),E.restore(),c}(this.$refs.sourceCanvas,t,this.imageTransforms):t,i=de({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Ot({sizeRestrictions:{minWidth:r([i.width,i.minWidth])||0,minHeight:r([i.height,i.minHeight])||0,maxWidth:r([i.width,i.maxWidth])||1/0,maxHeight:r([i.height,i.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(i.maxArea&&s.width*s.height>i.maxArea){var a=Math.sqrt(i.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,l,u,f,m){c.width=f?f.width:u.width,c.height=f?f.height:u.height;var p=c.getContext("2d");p.clearRect(0,0,c.width,c.height),m&&(m.imageSmoothingEnabled&&(p.imageSmoothingEnabled=m.imageSmoothingEnabled),m.imageSmoothingQuality&&(p.imageSmoothingQuality=m.imageSmoothingQuality),m.fillColor&&(p.fillStyle=m.fillColor,p.fillRect(0,0,c.width,c.height),p.save()));var k=u.left<0?-u.left:0,E=u.top<0?-u.top:0;p.drawImage(l,u.left+k,u.top+E,u.width,u.height,k*(c.width/u.width),E*(c.height/u.height),c.width,c.height)}(n,o,this.coordinates,s,i),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],o=this.visibleArea&&t?C0(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&t?di(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return S0({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:o,positionRestrictions:i,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?N0:V0);var o=this.sizeRestrictions;o.minWidth,o.minHeight,o.maxWidth,o.maxHeight;var i=Un(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,r=this.defaultPosition||B0,s=[i,function(a){var c=a.coordinates;return de({},Un(r)?r({coordinates:c,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,bn(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 t=n.$refs.stretcher;t&&(t.style.height="auto",t.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,t=this.$refs.stretcher,o=this.$refs.cropper;return this.initStretcher({cropper:o,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then(function(){var i={cropper:o,imageSize:n.imageSize};if(Un(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(i):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,l=s.clientWidth,u=c,f=a.width*c/a.height;return f>l&&(f=l,u=a.height*l/a.width),{width:f,height:u}}(i):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(i),!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=de(de({},this.defaultImageTransforms),{},{flip:de({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var t,o,i,r,s,a,c=n.defaultVisibleArea||$0;n.visibleArea=Un(c)?c({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(t={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},o=t.visibleArea,i=t.boundaries,r=t.getAreaRestrictions,s=X({},o),a=ue(i),s.width/s.height!==a&&(s.height=s.width/a),Ue(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,t=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)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&l(c)==l(s))}(this.src)){var o=Ae(this.crossOrigin)?this.canvas:this.crossOrigin;o===!0&&(o="anonymous"),this.imageAttributes.crossOrigin=o||null}if(this.checkOrientation){var i=(n=this.src,new Promise(function(r){L0(n).then(function(s){var a=_0(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(){i.then(t.onParseImage)},this.transitionTime)}else setTimeout(function(){t.onParseImage({source:t.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var n=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){n.$emit("ready"),n.onChange(!1)}))},onParseImage:function(n){var t=this,o=n.source,i=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,i&&r&&r>1?Za(o)||!Ja(o)?(this.imageAttributes.src=URL.createObjectURL(new Blob([i])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var l=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(i):this.imageAttributes.src=o,Un(this.defaultTransforms)?this.appliedImageTransforms=Dr(this.defaultTransforms()):ri(this.defaultTransforms)?this.appliedImageTransforms=Dr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Dr({});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=de(de({},this.appliedImageTransforms),{},{flip:de({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=t.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?t.onSuccessLoadImage():t.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(n){var t=this;this.transitionsOptions.enabled||this.awaitRender(function(){t.coordinates=t.moveAlgorithm(de(de({},t.getPublicProperties()),{},{positionRestrictions:di(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(n)})),t.onChange()})},onResize:function(n){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var o=t.sizeRestrictions,i=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(de(de({},t.getPublicProperties()),{},{positionRestrictions:di(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(o.maxWidth,t.visibleArea.width),maxHeight:Math.min(o.maxHeight,t.visibleArea.height),minWidth:Math.max(o.minWidth,i),minHeight:Math.max(o.minHeight,i)},event:t.normalizeEvent(n)})),t.onChange(),t.ticking=!1})},onManipulateImage:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var o=t.transitions,i=o!==void 0&&o,r=t.normalize,s=r===void 0||r;i&&this.enableTransitions();var a=T0(de(de({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,l=a.coordinates;this.visibleArea=c,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),i&&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]:{},t=n.visibleArea,o=n.type,i=o===void 0?"move":o;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:i})},getAspectRatio:function(n){var t,o,i=this.stencilProps,r=i.aspectRatio,s=i.minAspectRatio,a=i.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();t=c.minimum,o=c.maximum}if(Ae(t)&&(t=Ae(r)?s:r),Ae(o)&&(o=Ae(r)?a:r),!n&&(Ae(t)||Ae(o))){var l=this.getStencilSize(),u=l?ue(l):null;Ae(t)&&(t=Ka(u)?u:void 0),Ae(o)&&(o=Ka(u)?u:void 0)}return{minimum:t,maximum:o}},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)},t=n.boundaries,o=n.stencilSize,i=n.aspectRatio,Pr(ue(r=Un(o)?o({boundaries:t,aspectRatio:i}):o),i)&&(r=Ot({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:i.minimum,maximum:i.maximum}})),(r.width>t.width||r.height>t.height)&&(r=Ot({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:ue(r),maximum:ue(r)}})),r;var n,t,o,i,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 de({},il)},flip:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;if(!this.transitionsActive){r&&this.enableTransitions();var s=de({},this.imageTransforms.flip),a=M0({flip:{horizontal:n?!s.horizontal:s.horizontal,vertical:t?!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()}),c=a.visibleArea,l=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.transitions,i=o===void 0||o;if(!this.transitionsActive){i&&this.enableTransitions();var r=de({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=P0({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,c=s.coordinates,l=this.processAutoZoom("rotateImage",a,c);a=l.visibleArea,c=l.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),i&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},U0={key:0,ref:"canvas",style:{display:"none"}},v0={key:1,ref:"sourceCanvas",style:{display:"none"}};Cl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"cropper",class:s.classes.cropper},[e.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),e.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.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:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),e.createVNode("div",{class:s.classes.imageWrapper},[e.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:t[1]||(t[1]=e.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),e.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.stencilComponent),e.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},o.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[e.vShow,r.imageLoaded]]),o.canvas?(e.openBlock(),e.createBlock("canvas",U0,null,512)):e.createCommentVNode("",!0),o.canvas?(e.openBlock(),e.createBlock("canvas",v0,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const q0={width:0,height:0,left:0,top:0};class Lr{constructor(){d(this,"id");d(this,"ratio",0);d(this,"src","");d(this,"coordinates",q0)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,o=0,i){const r=new Lr;return r.src=t,r.ratio=o,r.id=i,r}setRatio(t){this.ratio=t}getRatio(){return this.ratio}setSrc(t){this.src=t}getSrc(){return this.src}}const j0={class:"cropper-wrapper"},W0={class:"row justify-end q-mt-md"},G0=D(e.defineComponent({__name:"ImageCropper",props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:1}},emits:["crop","update:ratio"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.ratio),s=e.ref(Lr.Create(o.src,o.ratio));s.value.setRatio(r.value);const a=e.ref(),c=e.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}]),l=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(m=>{var p;i("crop",{blob:m,src:(p=f.canvas)==null?void 0:p.toDataURL()}),i("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,m)=>(e.openBlock(),e.createElementBlock("div",j0,[e.createVNode(wo,{modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=p=>r.value=p),m[1]||(m[1]=p=>l(p))],clearable:!1,options:c.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),e.createVNode(e.unref(Cl),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:m[2]||(m[2]=p=>s.value.setCoordinates(p.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",W0,[e.createVNode(ne,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),Q0={class:"uploader-content"},Y0={class:"uploader-icon"},X0={class:"tools-button absolute-full column items-center justify-center"},Z0={class:"row q-gutter-sm"},J0=D(e.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:t}){const o=x.ClosePopup,i=n,r=t,s=e.ref(),a=e.ref(),c=e.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),l=e.ref(!1),u=e.ref();e.onMounted(()=>{e.nextTick(()=>{var y;const T=(y=a.value)==null?void 0:y.querySelector(".q-uploader__input");T&&!T.getAttribute("aria-label")&&T.setAttribute("aria-label","Добавить изображение")})});const f=e.ref(i.ratio),m=e.ref(""),p=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),k=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),E=()=>{s.value=void 0,f.value=1,r("update:ratio",1),r("removeFile")},V=T=>{T.blob.src=T.src,i.fileInfo.setFile&&i.fileInfo.setFile(T.blob),i.fileInfo.fileSystemPath&&(s.value=i.fileInfo),l.value=!1,r("crop")},N=T=>{m.value=T.url,l.value=!0},C=T=>{if(T.length===0)return;const y=T[0];y.url=URL.createObjectURL(y),s.value=y,i.fileInfo.setFile&&i.fileInfo.setFile(y),i.withCrop&&N(s.value)};return e.watch(f,T=>{r("update:ratio",T)}),e.watch(()=>[i.fileInfo.description,i.fileInfo.order,i.fileInfo.fileSystemPath],()=>{i.fileInfo.fileSystemPath&&(s.value=i.fileInfo,i.fileInfo.getFileUrl&&(s.value.url=i.fileInfo.getFileUrl()))}),e.onBeforeMount(()=>{i.fileInfo.fileSystemPath&&(s.value=i.fileInfo,i.fileInfo.getFileUrl&&(s.value.url=i.fileInfo.getFileUrl()))}),(T,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootEl",ref:a,class:"column items-center q-my-md"},[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"img-container relative-position",style:e.normalizeStyle(e.unref(p))},[e.createVNode(e.unref(x.QImg),{src:e.unref(s).url,ratio:e.unref(f),class:"uploaded-image",alt:"Загруженное изображение","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",X0,[e.createElementVNode("div",Z0,[e.createVNode(ne,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md","aria-label":"Изменить обрезку",onClick:y[0]||(y[0]=b=>N(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(tt,null,{default:e.withCtx(()=>[...y[5]||(y[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(ne,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md","aria-label":"Удалить изображение",onClick:E},{default:e.withCtx(()=>[e.createVNode(tt,null,{default:e.withCtx(()=>[...y[6]||(y[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(x.QUploader),{key:0,id:e.unref(c),ref_key:"uploader",ref:u,class:"img-uploader",style:e.normalizeStyle(e.unref(k)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:C,onRemoved:E},{header:e.withCtx(()=>[e.createElementVNode("div",Q0,[e.createVNode(e.unref(x.QUploaderAddTrigger)),e.createElementVNode("div",Y0,[e.createVNode(e.unref(x.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),y[4]||(y[4]=e.createElementVNode("div",{class:"uploader-text text-primary text-center"},[e.createElementVNode("div",{class:"text-weight-medium"},"Добавить изображение"),e.createElementVNode("div",{class:"text-caption text-grey-6 q-mt-xs"}," Перетащите файл или нажмите для загрузки ")],-1))])]),_:1},8,["id","style","accept","max-file-size"])),e.createVNode(un,{modelValue:e.unref(l),"onUpdate:modelValue":y[3]||(y[3]=b=>e.isRef(l)?l.value=b:null),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{class:"full-height"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QSpace)),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",round:"",dense:"","aria-label":"Закрыть"},null,512),[[e.unref(o)]])]),_:1}),e.createVNode(e.unref(x.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(G0,{ratio:e.unref(f),"onUpdate:ratio":y[1]||(y[1]=b=>e.isRef(f)?f.value=b:null),src:e.unref(m),onCrop:V,onClose:y[2]||(y[2]=b=>l.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],512))}}),[["__scopeId","data-v-e10bfc0c"]]);function K0(n){n.component("PMenuTabs",n0),n.component("PUploaderFile",d0),n.component("PUploaderImage",J0),n.component("PAuthForm",Ga),n.component("PAuthModal",e0)}const ew={install:function(n){Tg(n),Jy(n),ly(n),K0(n),G1(n)}};function tw(n,t={}){const{quasarPlugins:o=!0}=t;o&&n.use(x.Quasar,{plugins:{Notify:x.Notify,Dialog:x.Dialog}}),ew.install(n),Ra(n),da(n),Ia(n)}class nw extends Vo{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new Jr);d(this,"method",Bn.Login);d(this,"id","field-auth-login")}}function ow(n,t={}){const o=t.ftsp??ut.Get(),i=e.ref(!1),r=e.computed(()=>n.Items),s=e.computed(()=>n.Count.value),a=e.computed(()=>n.Item),c=e.computed({get:()=>n.searchStr.value,set:E=>{n.searchStr.value=E}});return{loading:i,items:r,count:s,item:a,searchStr:c,ftsp:o,load:async()=>{i.value=!0;try{await n.FTSP({ftsp:o})}finally{i.value=!1}},get:E=>n.Get(E),create:E=>n.Create(E),update:E=>n.Update(E),remove:E=>n.Remove(E),reset:()=>{o.reset(),n.ResetState()}}}function iw(n=ut.Get()){const t=e.reactive(n),o=e.computed(()=>t.f),i=e.computed(()=>t.f.length);return{filters:o,count:i,add:f=>{t.setF(f)},addV2:f=>{t.setF2(f)},replace:(f,m)=>{t.replaceF(f,m)},remove:f=>{t.removeF(f)},has:f=>!!t.findFilterModel(f),clear:()=>{t.resetF()}}}function rw(n=ut.Get()){const t=e.reactive(n),o=e.computed({get:()=>t.p.getPageNum(),set:E=>{t.p.page=(Math.max(1,Math.round(E))-1)*t.p.rowsPerPage}}),i=e.computed({get:()=>t.p.rowsPerPage,set:E=>{t.p.rowsPerPage=E,t.p.page=0}}),r=e.computed(()=>t.p.rowsNumber),s=e.computed(()=>({page:o.value,rowsPerPage:i.value,rowsNumber:r.value}));return{page:o,rowsPerPage:i,rowsNumber:r,goTo:E=>{o.value=E},next:()=>{t.p.page+=t.p.rowsPerPage},prev:()=>{t.p.page=Math.max(0,t.p.page-t.p.rowsPerPage)},reset:()=>{t.p.page=0},drop:()=>{t.p.drop()},setLoadMore:(E,V,N)=>{t.p.setLoadMore(E,V,N)},setLoadMoreV2:(E,V,N)=>{t.p.setLoadMoreV2(E,V,N)},setAllLoaded:E=>{t.p.setAllLoaded(E)},pagination:s}}const sw=["PF","PFM"];O.AuthButtonLogin=bi,O.AuthButtonRefresh=Xr,O.AuthButtonRegister=Ci,O.AuthButtonRestore=Bo,O.AuthChunks=Fe,O.AuthFieldsIds=zt,O.AuthFormSettings=es,O.AuthMethods=Bn,O.EmailField=No,O.LoginField=nw,O.PAddDialog=va,O.PBadge=uo,O.PButton=ne,O.PCard=qa,O.PCheckBox=Aa,O.PChip=ur,O.PContactForm=Ki,O.PContactFormDeleteDialog=fo,O.PContactFormEdit=er,O.PContactFormEditDialog=mo,O.PContactFormEditEmails=tr,O.PContactFormEditPhones=nr,O.PContactFormView=or,O.PContactFormViewEmails=fn,O.PContactFormViewPhones=mn,O.PCrudList=ja,O.PDateInput=oi,O.PDateTimeInput=za,O.PDialog=un,O.PEditDialog=Hn,O.PF=z,O.PFM=rg,O.PHint=kr,O.PInput=Ze,O.POptionsListSingle=ei,O.POpts=Da,O.PSelect=wo,O.PTable=br,O.PTableBadge=fr,O.PTableBadges=mr,O.PTableCount=hr,O.PTableEdit=pr,O.PTableNumber=gr,O.PTableSelect=yr,O.PTableString=wr,O.PTableToggle=Fa,O.PTabs=Cr,O.PTabsLeft=Sr,O.PToggle=Oa,O.PasswordField=$o,O.PasswordRepeatField=Kr,O.Schedule=po,O.ScheduleDay=Ko,O.ScheduleDefaultLabels=dr,O.ScheduleGridEditor=Pa,O.SchedulePlace=Ln,O.ScheduleSession=On,O.ScheduleSlot=Ft,O.ScheduleTimeline=Ma,O.TabsStore=ti,O.defaultContactsLabels=Vt,O.installSprof=tw,O.pfName=sw,O.useCrud=ow,O.useFilters=iw,O.usePagination=rw,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});