sprof 0.2.19 → 0.2.20

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 (26) hide show
  1. package/dist/{ExtractsList-DTe91TQH.js → ExtractsList-C1218Nne.js} +1 -1
  2. package/dist/core/components/atoms/PInputNumber/PInputNumber.stories.d.ts +1 -1
  3. package/dist/core/components/atoms/PInputNumber/PInputNumber.vue.d.ts +1 -1
  4. package/dist/core/components/atoms/index.d.ts +2 -2
  5. package/dist/core/components/molecules/PEditDialog/PEditDialog.stories.d.ts +9 -9
  6. package/dist/core/components/molecules/PEditDialog/PEditDialog.vue.d.ts +1 -1
  7. package/dist/global-components.d.ts +10 -1
  8. package/dist/{index-DpENpoCA.js → index-CLoHvXYT.js} +6352 -5902
  9. package/dist/index.d.ts +2 -0
  10. package/dist/modules/index.d.ts +7 -0
  11. package/dist/modules/table/PTable.test.d.ts +1 -0
  12. package/dist/modules/table/cells/PTableBadge.vue.d.ts +110 -0
  13. package/dist/modules/table/cells/PTableBadges.vue.d.ts +116 -0
  14. package/dist/modules/table/cells/PTableCount.vue.d.ts +14 -0
  15. package/dist/modules/table/cells/PTableEdit.vue.d.ts +6 -0
  16. package/dist/modules/table/cells/PTableNumber.vue.d.ts +119 -0
  17. package/dist/modules/table/cells/PTableSelect.vue.d.ts +9 -0
  18. package/dist/modules/table/cells/PTableString.vue.d.ts +105 -0
  19. package/dist/modules/table/index.d.ts +11 -0
  20. package/dist/sprof.js +52 -43
  21. package/dist/sprof.umd.cjs +15 -15
  22. package/dist/style.css +1 -1
  23. package/package.json +1 -1
  24. /package/dist/core/components/atoms/PTable/{PTable.stories.d.ts → PTableHtml.stories.d.ts} +0 -0
  25. /package/dist/core/components/atoms/PTable/{PTable.test.d.ts → PTableHtml.test.d.ts} +0 -0
  26. /package/dist/core/components/atoms/PTable/{PTable.vue.d.ts → PTableHtml.vue.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- (function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("quasar"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","quasar","vuedraggable","vue-router"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.sprof={},L.Vue,L.Quasar,L.draggable,L.VueRouter))})(this,function(L,e,N,Co,tc){"use strict";var $b=Object.defineProperty;var Vb=(L,e,N)=>e in L?$b(L,e,{enumerable:!0,configurable:!0,writable:!0,value:N}):L[e]=N;var l=(L,e,N)=>Vb(L,typeof e!="symbol"?e+"":e,N);var vt,Ht,nt,Wn,re,st,Jt,_r;var kn=typeof document<"u"?document.currentScript:null,Fe=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Fe||{}),ge=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(ge||{});class Kt{constructor(t,i,o,r){l(this,"text","Сохранить");l(this,"type",ge.Success);l(this,"condition",!0);l(this,"action");l(this,"id","button");l(this,"disabled",!1);this.text=t,this.type=o,this.action=i,r!==void 0&&(this.condition=r)}static Primary(t,i,o){return new Kt(t,i,ge.Primary,o)}static Success(t,i,o){return new Kt(t,i,ge.Success,o)}static Warning(t,i,o){return new Kt(t,i,ge.Warning,o)}static Error(t,i,o){return new Kt(t,i,ge.Error,o)}}class xi extends Kt{constructor(){super();l(this,"id","auth-button");l(this,"chunk",Fe.Login);l(this,"text","");l(this,"isSubmit",!1);l(this,"isLink",!0)}GetChunk(){return this.chunk}}let ko=class extends xi{constructor(){super(...arguments);l(this,"id","auth-button-login");l(this,"text","Войти");l(this,"isSubmit",!1);l(this,"chunk",Fe.Login)}};class Yr extends xi{constructor(){super(...arguments);l(this,"id","auth-button-refresh");l(this,"text","Обновить пароль");l(this,"isSubmit",!1);l(this,"chunk",Fe.Refresh)}}class xo extends xi{constructor(){super(...arguments);l(this,"id","auth-button-register");l(this,"text","Зарегистрироваться");l(this,"isSubmit",!1);l(this,"chunk",Fe.Register)}}class Ei extends xi{constructor(){super(...arguments);l(this,"id","auth-button-restore");l(this,"text","Забыли пароль?");l(this,"isSubmit",!1);l(this,"chunk",Fe.Restore)}}class Xr{constructor(){l(this,"value","");l(this,"label","");l(this,"placeholder","");l(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var At=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(At||{});class Bi extends Xr{constructor(){super(...arguments);l(this,"method");l(this,"id","field-auth");l(this,"name","")}get IsPassword(){return this.id===At.Password||this.id===At.PasswordRepeat}}var xn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(xn||{});const nc=/\S+@\S+\.\S+/;class Zr{constructor(){l(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),nc.test(t)||this.errors.push("Некорректный email"),this.errors}}let ic=class extends Bi{constructor(){super(...arguments);l(this,"id",At.Email);l(this,"label","Email");l(this,"name","email");l(this,"placeholder","Введите email");l(this,"validator",new Zr);l(this,"method",xn.Email)}};const Ni=new ic;class oc{constructor(){l(this,"errors",[]);l(this,"length",3)}validate(t){return t===""||!t?(this.errors.push("Введите пароль"),this.errors):(t.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let rc=class extends Bi{constructor(){super(...arguments);l(this,"label","Пароль");l(this,"validator",new oc);l(this,"name","password");l(this,"placeholder","Введите пароль");l(this,"id",At.Password)}};const $i=new rc;let sc=class extends Bi{constructor(){super(...arguments);l(this,"label","Повторите пароль");l(this,"id",At.PasswordRepeat)}};const Jr=new sc,Kr={allowRestore:!1,[Fe.Login]:{methods:[xn.Email],title:"Вход в систему",action:"login",buttons:[new ko,new xo,new Ei],fields:[Ni,$i],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Fe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new xo,new ko,new Ei],fields:[Ni,$i,Jr],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Fe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Ei],fields:[Ni]},[Fe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Yr],fields:[$i]}};class ac{constructor(){l(this,"block",!1);l(this,"settings",Kr);l(this,"chunk",Fe.Login);l(this,"selectedMethod",xn.Email)}async Block(t){this.block=!0,await t(),this.block=!1}get IsBlock(){return this.block}GetValues(){const t=this.GetFields(),i=new Map;return t.forEach(o=>{o.value&&i.set(o.name,o.value)}),Object.fromEntries(i)}Validate(){if(this.IsRegister){const t=this.GetField(At.Password),i=this.GetField(At.PasswordRepeat);if((t==null?void 0:t.value)!==(i==null?void 0:i.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(i=>{i.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(i=>i.id===t)}}class lc{constructor(){l(this,"visible",!1);l(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 En{constructor(){l(this,"type",ge.Success);l(this,"text","");l(this,"title","")}static ToQuasarColor(t){switch(t){case ge.Success:return"positive";case ge.Warning:return"warning";case ge.Error:return"negative";case ge.Info:return"info";default:return"primary"}}static ContainsHtml(t){return/<[a-z][\s\S]*>/i.test(t)}showMessage(t,i){this.type=i,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 En.ToQuasarColor(this.type)}Info(t){this.showMessage(t,ge.Info)}Success(t){this.showMessage(t,ge.Success)}Error(t){this.showMessage(t,ge.Error)}Warning(t){this.showMessage(t,ge.Warning)}FormMessage(t){let i="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const o of Object.keys(t))t[o][0]&&t[o][0].message&&(i+=`<li>${t[o][0].message}</li>`);return i+="</ul>",i}}class Eo{static Get(t,i,o="-"){return!t||!i?"":`${t}${o}${i}`}static In(t,i,o){return t>=i&&t<=o}static Intersects(t,i,o,r){return t===o||i===r||t>o&&t<r||i>o&&i<r||i>r&&t<o}}const es=1e3,ts=60*es,Bo=60*ts;var Yn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Yn||{});const Vi={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 Bo*t}static D(t){return Bo*t}static W(t){return Bo*t}static NormalizeTime(t){return String(t).padStart(2,"0")}static HMtoM(t){const i=ie.SplitHM(t);return i.length>1?ie.HtoM(i[0])+i[1]:ie.HtoM(i[0])}static HtoM(t){return Number(t)*60}static SplitHM(t){if(!t)return[];const i=t.split(":");return[Number(i[0]),Number(i[1])]}static HmsToHm(t){const i=ie.SplitHM(t);return ie.ConcatHM(i[0],i[1])}static AddMtoHM(t,i){const o=new Date,r=ie.SplitHM(t);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),d=s.getMinutes();return ie.ConcatHM(a,d)}static ConcatHM(t,i){return`${t}:${ie.NormalizeTime(i)}`}static DiffM(t,i){return ie.Gt(i,t)?ie.HMtoM(i)-ie.HMtoM(t):ie.HMtoM(t)-ie.HMtoM(i)}static GetPeriod(t,i){return Eo.Get(t,i)}static Gt(t,i){return ie.HMtoM(t)>ie.HMtoM(i)}static GtOrEq(t,i){return ie.Gt(t,i)||ie.Eq(t,i)}static Eq(t,i){return ie.HMtoM(t)===ie.HMtoM(i)}static PeriodInPeriod(t,i,o,r){return ie.HMtoM(t)>=ie.HMtoM(o)&&ie.HMtoM(i)<=ie.HMtoM(r)}static PeriodsIntersects(t,i,o,r){return Eo.Intersects(ie.HMtoM(t),ie.HMtoM(i),ie.HMtoM(o),ie.HMtoM(r))}}const cc="top";class dc extends En{constructor(){super(...arguments);l(this,"duration",ie.S(3))}showMessage(i,o){if(super.showMessage(i,o),typeof N.Notify.create!="function"){console.warn("[sprof] Quasar Notify plugin is not installed. Add `app.use(Quasar, { plugins: { Notify } })` (imported from 'quasar') to your app.");return}const r=typeof i=="string"?{}:i;N.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:En.ContainsHtml(this.text),position:cc})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",ge.Warning)}Save(){this.showMessage("Изменения успешно сохранены",ge.Success)}}const Bn=new dc;class Et{static Get(t){const i=localStorage.getItem(t);if(i)return JSON.parse(i)}static Set(t,i){i&&localStorage.setItem(t,JSON.stringify(i))}static Remove(t){localStorage.removeItem(t)}}var ut=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(ut||{});class uc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return Et.Get(ut.AccessToken)}getRefreshToken(){return Et.Get(ut.RefreshToken)}setAccessToken(t){Et.Set(ut.AccessToken,t)}setRefreshToken(t){Et.Set(ut.RefreshToken,t)}reset(){Et.Remove(ut.AccessToken),Et.Remove(ut.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class fc{constructor(){l(this,"user");l(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),Et.Set(ut.User,this.user))}reset(){this.user=void 0,Et.Remove(ut.User)}actualize(){const t=Et.Get(ut.User);t&&this.set(t)}}class mc{constructor(){l(this,"isAuth",!1);l(this,"user",new fc);l(this,"tokens",new uc);l(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){Bn.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 hc=(vt=class{constructor(){l(this,"form",e.reactive(new ac));l(this,"status",e.reactive(new mc));l(this,"modal",e.reactive(new lc));if(vt.instance)return vt.instance;vt.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},l(vt,"instance"),vt);const Oe=new hc;var ns=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
1
+ (function(F,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("quasar"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","quasar","vuedraggable","vue-router"],e):(F=typeof globalThis<"u"?globalThis:F||self,e(F.sprof={},F.Vue,F.Quasar,F.draggable,F.VueRouter))})(this,function(F,e,x,xi,uc){"use strict";var vb=Object.defineProperty;var jb=(F,e,x)=>e in F?vb(F,e,{enumerable:!0,configurable:!0,writable:!0,value:x}):F[e]=x;var l=(F,e,x)=>jb(F,typeof e!="symbol"?e+"":e,x);var Ht,Ut,it,Gn,re,at,Jt,Qr;var kn=typeof document<"u"?document.currentScript:null,Fe=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Fe||{}),ge=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(ge||{});class Kt{constructor(t,o,i,r){l(this,"text","Сохранить");l(this,"type",ge.Success);l(this,"condition",!0);l(this,"action");l(this,"id","button");l(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 Kt(t,o,ge.Primary,i)}static Success(t,o,i){return new Kt(t,o,ge.Success,i)}static Warning(t,o,i){return new Kt(t,o,ge.Warning,i)}static Error(t,o,i){return new Kt(t,o,ge.Error,i)}}class No extends Kt{constructor(){super();l(this,"id","auth-button");l(this,"chunk",Fe.Login);l(this,"text","");l(this,"isSubmit",!1);l(this,"isLink",!0)}GetChunk(){return this.chunk}}let Ei=class extends No{constructor(){super(...arguments);l(this,"id","auth-button-login");l(this,"text","Войти");l(this,"isSubmit",!1);l(this,"chunk",Fe.Login)}};class ss extends No{constructor(){super(...arguments);l(this,"id","auth-button-refresh");l(this,"text","Обновить пароль");l(this,"isSubmit",!1);l(this,"chunk",Fe.Refresh)}}class Bi extends No{constructor(){super(...arguments);l(this,"id","auth-button-register");l(this,"text","Зарегистрироваться");l(this,"isSubmit",!1);l(this,"chunk",Fe.Register)}}class $o extends No{constructor(){super(...arguments);l(this,"id","auth-button-restore");l(this,"text","Забыли пароль?");l(this,"isSubmit",!1);l(this,"chunk",Fe.Restore)}}class as{constructor(){l(this,"value","");l(this,"label","");l(this,"placeholder","");l(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var zt=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(zt||{});class Vo extends as{constructor(){super(...arguments);l(this,"method");l(this,"id","field-auth");l(this,"name","")}get IsPassword(){return this.id===zt.Password||this.id===zt.PasswordRepeat}}var xn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(xn||{});const fc=/\S+@\S+\.\S+/;class ls{constructor(){l(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),fc.test(t)||this.errors.push("Некорректный email"),this.errors}}let mc=class extends Vo{constructor(){super(...arguments);l(this,"id",zt.Email);l(this,"label","Email");l(this,"name","email");l(this,"placeholder","Введите email");l(this,"validator",new ls);l(this,"method",xn.Email)}};const Po=new mc;class hc{constructor(){l(this,"errors",[]);l(this,"length",3)}validate(t){return t===""||!t?(this.errors.push("Введите пароль"),this.errors):(t.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let pc=class extends Vo{constructor(){super(...arguments);l(this,"label","Пароль");l(this,"validator",new hc);l(this,"name","password");l(this,"placeholder","Введите пароль");l(this,"id",zt.Password)}};const To=new pc;let gc=class extends Vo{constructor(){super(...arguments);l(this,"label","Повторите пароль");l(this,"id",zt.PasswordRepeat)}};const cs=new gc,ds={allowRestore:!1,[Fe.Login]:{methods:[xn.Email],title:"Вход в систему",action:"login",buttons:[new Ei,new Bi,new $o],fields:[Po,To],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Fe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Bi,new Ei,new $o],fields:[Po,To,cs],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Fe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new $o],fields:[Po]},[Fe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new ss],fields:[To]}};class yc{constructor(){l(this,"block",!1);l(this,"settings",ds);l(this,"chunk",Fe.Login);l(this,"selectedMethod",xn.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 wc{constructor(){l(this,"visible",!1);l(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 En{constructor(){l(this,"type",ge.Success);l(this,"text","");l(this,"title","")}static ToQuasarColor(t){switch(t){case ge.Success:return"positive";case ge.Warning:return"warning";case ge.Error:return"negative";case ge.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 En.ToQuasarColor(this.type)}Info(t){this.showMessage(t,ge.Info)}Success(t){this.showMessage(t,ge.Success)}Error(t){this.showMessage(t,ge.Error)}Warning(t){this.showMessage(t,ge.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 Ni{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 us=1e3,fs=60*us,$i=60*fs;var Xn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Xn||{});const Io={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 us*t}static M(t){return fs*t}static H(t){return $i*t}static D(t){return $i*t}static W(t){return $i*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(),d=s.getMinutes();return ie.ConcatHM(a,d)}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 Ni.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 Ni.Intersects(ie.HMtoM(t),ie.HMtoM(o),ie.HMtoM(i),ie.HMtoM(r))}}const bc="top";class Sc extends En{constructor(){super(...arguments);l(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:En.ContainsHtml(this.text),position:bc})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",ge.Warning)}Save(){this.showMessage("Изменения успешно сохранены",ge.Success)}}const Bn=new Sc;class Et{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 ft=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(ft||{});class Cc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return Et.Get(ft.AccessToken)}getRefreshToken(){return Et.Get(ft.RefreshToken)}setAccessToken(t){Et.Set(ft.AccessToken,t)}setRefreshToken(t){Et.Set(ft.RefreshToken,t)}reset(){Et.Remove(ft.AccessToken),Et.Remove(ft.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class kc{constructor(){l(this,"user");l(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),Et.Set(ft.User,this.user))}reset(){this.user=void 0,Et.Remove(ft.User)}actualize(){const t=Et.Get(ft.User);t&&this.set(t)}}class xc{constructor(){l(this,"isAuth",!1);l(this,"user",new kc);l(this,"tokens",new Cc);l(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){Bn.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 Ec=(Ht=class{constructor(){l(this,"form",e.reactive(new yc));l(this,"status",e.reactive(new xc));l(this,"modal",e.reactive(new wc));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}},l(Ht,"instance"),Ht);const Oe=new Ec;var ms=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 is;(function(n){(function(t){var i=typeof globalThis=="object"?globalThis:typeof ns=="object"?ns:typeof self=="object"?self:typeof this=="object"?this:d(),o=r(n);typeof i.Reflect<"u"&&(o=r(i.Reflect,o)),t(o,i),typeof i.Reflect>"u"&&(i.Reflect=n);function r(c,u){return function(f,m){Object.defineProperty(c,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 d(){return s()||a()}})(function(t,i){var o=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",d=typeof Object.create=="function",c={__proto__:[]}instanceof Array,u=!d&&!c,f={create:d?function(){return bi(Object.create(null))}:c?function(){return bi({__proto__:null})}:function(){return bi({})},has:u?function(B,$){return o.call(B,$)}:function(B,$){return $ in B},get:u?function(B,$){return o.call(B,$)?B[$]:void 0}:function(B,$){return B[$]}},m=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Qn(),w=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Lr(),y=typeof WeakMap=="function"?WeakMap:vr(),S=r?Symbol.for("@reflect-metadata:registry"):void 0,E=wo(),x=Fr(E);function V(B,$,I,_){if(G(I)){if(!qt(B))throw new TypeError;if(!wn($))throw new TypeError;return he(B,$)}else{if(!qt(B))throw new TypeError;if(!we($))throw new TypeError;if(!we(_)&&!G(_)&&!je(_))throw new TypeError;return je(_)&&(_=void 0),I=Je(I),at(B,$,I,_)}}t("decorate",V);function k(B,$){function I(_,Z){if(!we(_))throw new TypeError;if(!G(Z)&&!ke(Z))throw new TypeError;yt(B,$,_,Z)}return I}t("metadata",k);function T(B,$,I,_){if(!we(I))throw new TypeError;return G(_)||(_=Je(_)),yt(B,$,I,_)}t("defineMetadata",T);function M(B,$,I){if(!we($))throw new TypeError;return G(I)||(I=Je(I)),$e(B,$,I)}t("hasMetadata",M);function A(B,$,I){if(!we($))throw new TypeError;return G(I)||(I=Je(I)),Pt(B,$,I)}t("hasOwnMetadata",A);function Q(B,$,I){if(!we($))throw new TypeError;return G(I)||(I=Je(I)),Tt(B,$,I)}t("getMetadata",Q);function se(B,$,I){if(!we($))throw new TypeError;return G(I)||(I=Je(I)),Ut(B,$,I)}t("getOwnMetadata",se);function _e(B,$){if(!we(B))throw new TypeError;return G($)||($=Je($)),Ct(B,$)}t("getMetadataKeys",_e);function Ne(B,$){if(!we(B))throw new TypeError;return G($)||($=Je($)),it(B,$)}t("getOwnMetadataKeys",Ne);function Se(B,$,I){if(!we($))throw new TypeError;if(G(I)||(I=Je(I)),!we($))throw new TypeError;G(I)||(I=Je(I));var _=Sn($,I,!1);return G(_)?!1:_.OrdinaryDeleteMetadata(B,$,I)}t("deleteMetadata",Se);function he(B,$){for(var I=B.length-1;I>=0;--I){var _=B[I],Z=_($);if(!G(Z)&&!je(Z)){if(!wn(Z))throw new TypeError;$=Z}}return $}function at(B,$,I,_){for(var Z=B.length-1;Z>=0;--Z){var Ve=B[Z],Ie=Ve($,I,_);if(!G(Ie)&&!je(Ie)){if(!we(Ie))throw new TypeError;_=Ie}}return _}function $e(B,$,I){var _=Pt(B,$,I);if(_)return!0;var Z=kt($);return je(Z)?!1:$e(B,Z,I)}function Pt(B,$,I){var _=Sn($,I,!1);return G(_)?!1:Xe(_.OrdinaryHasOwnMetadata(B,$,I))}function Tt(B,$,I){var _=Pt(B,$,I);if(_)return Ut(B,$,I);var Z=kt($);if(!je(Z))return Tt(B,Z,I)}function Ut(B,$,I){var _=Sn($,I,!1);if(!G(_))return _.OrdinaryGetOwnMetadata(B,$,I)}function yt(B,$,I,_){var Z=Sn(I,_,!0);Z.OrdinaryDefineOwnMetadata(B,$,I,_)}function Ct(B,$){var I=it(B,$),_=kt(B);if(_===null)return I;var Z=Ct(_,$);if(Z.length<=0)return I;if(I.length<=0)return Z;for(var Ve=new w,Ie=[],ne=0,O=I;ne<O.length;ne++){var H=O[ne],U=Ve.has(H);U||(Ve.add(H),Ie.push(H))}for(var j=0,te=Z;j<te.length;j++){var H=te[j],U=Ve.has(H);U||(Ve.add(H),Ie.push(H))}return Ie}function it(B,$){var I=Sn(B,$,!1);return I?I.OrdinaryOwnMetadataKeys(B,$):[]}function Ce(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 je(B){return B===null}function Rt(B){return typeof B=="symbol"}function we(B){return typeof B=="object"?B!==null:typeof B=="function"}function le(B,$){switch(Ce(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",_=ee(B,s);if(_!==void 0){var Z=_.call(B,I);if(we(Z))throw new TypeError;return Z}return Ye(B)}function Ye(B,$){var I,_;{var Z=B.toString;if(Te(Z)){var _=Z.call(B);if(!we(_))return _}var I=B.valueOf;if(Te(I)){var _=I.call(B);if(!we(_))return _}}throw new TypeError}function Xe(B){return!!B}function Gn(B){return""+B}function Je(B){var $=le(B);return Rt($)?$:Gn($)}function qt(B){return Array.isArray?Array.isArray(B):B instanceof Object?B instanceof Array:Object.prototype.toString.call(B)==="[object Array]"}function Te(B){return typeof B=="function"}function wn(B){return typeof B=="function"}function ke(B){switch(Ce(B)){case 3:return!0;case 4:return!0;default:return!1}}function Ke(B,$){return B===$||B!==B&&$!==$}function ee(B,$){var I=B[$];if(I!=null){if(!Te(I))throw new TypeError;return I}}function Re(B){var $=ee(B,a);if(!Te($))throw new TypeError;var I=$.call(B);if(!we(I))throw new TypeError;return I}function lt(B){return B.value}function ct(B){var $=B.next();return $.done?!1:$}function bn(B){var $=B.return;$&&$.call(B)}function kt(B){var $=Object.getPrototypeOf(B);if(typeof B!="function"||B===m||$!==m)return $;var I=B.prototype,_=I&&Object.getPrototypeOf(I);if(_==null||_===Object.prototype)return $;var Z=_.constructor;return typeof Z!="function"||Z===B?$:Z}function Dt(){var B;!G(S)&&typeof i.Reflect<"u"&&!(S in i.Reflect)&&typeof i.Reflect.defineMetadata=="function"&&(B=Or(i.Reflect));var $,I,_,Z=new y,Ve={registerProvider:Ie,getProvider:O,setProvider:U};return Ve;function Ie(j){if(!Object.isExtensible(Ve))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case B===j:break;case G($):$=j;break;case $===j:break;case G(I):I=j;break;case I===j:break;default:_===void 0&&(_=new w),_.add(j);break}}function ne(j,te){if(!G($)){if($.isProviderFor(j,te))return $;if(!G(I)){if(I.isProviderFor(j,te))return $;if(!G(_))for(var pe=Re(_);;){var be=ct(pe);if(!be)return;var dt=lt(be);if(dt.isProviderFor(j,te))return bn(pe),dt}}}if(!G(B)&&B.isProviderFor(j,te))return B}function O(j,te){var pe=Z.get(j),be;return G(pe)||(be=pe.get(te)),G(be)&&(be=ne(j,te),G(be)||(G(pe)&&(pe=new h,Z.set(j,pe)),pe.set(te,be))),be}function H(j){if(G(j))throw new TypeError;return $===j||I===j||!G(_)&&_.has(j)}function U(j,te,pe){if(!H(pe))throw new Error("Metadata provider not registered.");var be=O(j,te);if(be!==pe){if(!G(be))return!1;var dt=Z.get(j);G(dt)&&(dt=new h,Z.set(j,dt)),dt.set(te,pe)}return!0}}function wo(){var B;return!G(S)&&we(i.Reflect)&&Object.isExtensible(i.Reflect)&&(B=i.Reflect[S]),G(B)&&(B=Dt()),!G(S)&&we(i.Reflect)&&Object.isExtensible(i.Reflect)&&Object.defineProperty(i.Reflect,S,{enumerable:!1,configurable:!1,writable:!1,value:B}),B}function Fr(B){var $=new y,I={isProviderFor:function(H,U){var j=$.get(H);return G(j)?!1:j.has(U)},OrdinaryDefineOwnMetadata:Ie,OrdinaryHasOwnMetadata:Z,OrdinaryGetOwnMetadata:Ve,OrdinaryOwnMetadataKeys:ne,OrdinaryDeleteMetadata:O};return E.registerProvider(I),I;function _(H,U,j){var te=$.get(H),pe=!1;if(G(te)){if(!j)return;te=new h,$.set(H,te),pe=!0}var be=te.get(U);if(G(be)){if(!j)return;if(be=new h,te.set(U,be),!B.setProvider(H,U,I))throw te.delete(U),pe&&$.delete(H),new Error("Wrong provider for target.")}return be}function Z(H,U,j){var te=_(U,j,!1);return G(te)?!1:Xe(te.has(H))}function Ve(H,U,j){var te=_(U,j,!1);if(!G(te))return te.get(H)}function Ie(H,U,j,te){var pe=_(j,te,!0);pe.set(H,U)}function ne(H,U){var j=[],te=_(H,U,!1);if(G(te))return j;for(var pe=te.keys(),be=Re(pe),dt=0;;){var bo=ct(be);if(!bo)return j.length=dt,j;var wt=lt(bo);try{j[dt]=wt}catch(Hr){try{bn(be)}finally{throw Hr}}dt++}}function O(H,U,j){var te=_(U,j,!1);if(G(te)||!te.delete(H))return!1;if(te.size===0){var pe=$.get(U);G(pe)||(pe.delete(j),pe.size===0&&$.delete(pe))}return!0}}function Or(B){var $=B.defineMetadata,I=B.hasOwnMetadata,_=B.getOwnMetadata,Z=B.getOwnMetadataKeys,Ve=B.deleteMetadata,Ie=new y,ne={isProviderFor:function(O,H){var U=Ie.get(O);return!G(U)&&U.has(H)?!0:Z(O,H).length?(G(U)&&(U=new w,Ie.set(O,U)),U.add(H),!0):!1},OrdinaryDefineOwnMetadata:$,OrdinaryHasOwnMetadata:I,OrdinaryGetOwnMetadata:_,OrdinaryOwnMetadataKeys:Z,OrdinaryDeleteMetadata:Ve};return ne}function Sn(B,$,I){var _=E.getProvider(B,$);if(!G(_))return _;if(I){if(E.setProvider(B,$,x))return x;throw new Error("Illegal state.")}}function Qn(){var B={},$=[],I=function(){function ne(O,H,U){this._index=0,this._keys=O,this._values=H,this._selector=U}return ne.prototype["@@iterator"]=function(){return this},ne.prototype[a]=function(){return this},ne.prototype.next=function(){var O=this._index;if(O>=0&&O<this._keys.length){var H=this._selector(this._keys[O],this._values[O]);return O+1>=this._keys.length?(this._index=-1,this._keys=$,this._values=$):this._index++,{value:H,done:!1}}return{value:void 0,done:!0}},ne.prototype.throw=function(O){throw this._index>=0&&(this._index=-1,this._keys=$,this._values=$),O},ne.prototype.return=function(O){return this._index>=0&&(this._index=-1,this._keys=$,this._values=$),{value:O,done:!0}},ne}(),_=function(){function ne(){this._keys=[],this._values=[],this._cacheKey=B,this._cacheIndex=-2}return Object.defineProperty(ne.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),ne.prototype.has=function(O){return this._find(O,!1)>=0},ne.prototype.get=function(O){var H=this._find(O,!1);return H>=0?this._values[H]:void 0},ne.prototype.set=function(O,H){var U=this._find(O,!0);return this._values[U]=H,this},ne.prototype.delete=function(O){var H=this._find(O,!1);if(H>=0){for(var U=this._keys.length,j=H+1;j<U;j++)this._keys[j-1]=this._keys[j],this._values[j-1]=this._values[j];return this._keys.length--,this._values.length--,Ke(O,this._cacheKey)&&(this._cacheKey=B,this._cacheIndex=-2),!0}return!1},ne.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=B,this._cacheIndex=-2},ne.prototype.keys=function(){return new I(this._keys,this._values,Z)},ne.prototype.values=function(){return new I(this._keys,this._values,Ve)},ne.prototype.entries=function(){return new I(this._keys,this._values,Ie)},ne.prototype["@@iterator"]=function(){return this.entries()},ne.prototype[a]=function(){return this.entries()},ne.prototype._find=function(O,H){if(!Ke(this._cacheKey,O)){this._cacheIndex=-1;for(var U=0;U<this._keys.length;U++)if(Ke(this._keys[U],O)){this._cacheIndex=U;break}}return this._cacheIndex<0&&H&&(this._cacheIndex=this._keys.length,this._keys.push(O),this._values.push(void 0)),this._cacheIndex},ne}();return _;function Z(ne,O){return ne}function Ve(ne,O){return O}function Ie(ne,O){return[ne,O]}}function Lr(){var B=function(){function $(){this._map=new h}return Object.defineProperty($.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),$.prototype.has=function(I){return this._map.has(I)},$.prototype.add=function(I){return this._map.set(I,I),this},$.prototype.delete=function(I){return this._map.delete(I)},$.prototype.clear=function(){this._map.clear()},$.prototype.keys=function(){return this._map.keys()},$.prototype.values=function(){return this._map.keys()},$.prototype.entries=function(){return this._map.entries()},$.prototype["@@iterator"]=function(){return this.keys()},$.prototype[a]=function(){return this.keys()},$}();return B}function vr(){var B=16,$=f.create(),I=_();return function(){function O(){this._key=_()}return O.prototype.has=function(H){var U=Z(H,!1);return U!==void 0?f.has(U,this._key):!1},O.prototype.get=function(H){var U=Z(H,!1);return U!==void 0?f.get(U,this._key):void 0},O.prototype.set=function(H,U){var j=Z(H,!0);return j[this._key]=U,this},O.prototype.delete=function(H){var U=Z(H,!1);return U!==void 0?delete U[this._key]:!1},O.prototype.clear=function(){this._key=_()},O}();function _(){var O;do O="@@WeakMap@@"+ne();while(f.has($,O));return $[O]=!0,O}function Z(O,H){if(!o.call(O,I)){if(!H)return;Object.defineProperty(O,I,{value:f.create()})}return O[I]}function Ve(O,H){for(var U=0;U<H;++U)O[U]=Math.random()*255|0;return O}function Ie(O){if(typeof Uint8Array=="function"){var H=new Uint8Array(O);return typeof crypto<"u"?crypto.getRandomValues(H):typeof msCrypto<"u"?msCrypto.getRandomValues(H):Ve(H,O),H}return Ve(new Array(O),O)}function ne(){var O=Ie(B);O[6]=O[6]&79|64,O[8]=O[8]&191|128;for(var H="",U=0;U<B;++U){var j=O[U];(U===4||U===6||U===8)&&(H+="-"),j<16&&(H+="0"),H+=j.toString(16).toLowerCase()}return H}}function bi(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 pc(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 gc=new Uint8Array(16);function yc(){return crypto.getRandomValues(gc)}function jt(n,t,i){return crypto.randomUUID?crypto.randomUUID():wc(n)}function wc(n,t,i){var r;n=n||{};const o=n.random??((r=n.rng)==null?void 0:r.call(n))??yc();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,pc(o)}class ve{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 bc(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 i=n.shift();n[0]=i+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<n.length;o++){var r=n[o];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(o>0&&(r=r.replace(/^[\/]+/,"")),o<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),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 No(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),bc(n)}class ae{static Capitalize(t){return t?t[0].toUpperCase()+t.slice(1):""}static BuildSafeUrl(t,i,o){try{const r=new URL(t);return i&&(r.port=i.toString()),No(r.toString(),o)}catch{throw new Error(`Invalid host URL: ${t}`)}}static ToCamelCase(t){const i=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return t.match(i).map((r,s)=>s===0?r.toLowerCase():ae.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(t,i,o){return t.substring(t.indexOf(i)+2,t.lastIndexOf(o))}static Translit(t,i){const o={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return i&&/[а-яА-Я]/g.test(t)?t.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(o).find(d=>o[d]===r);return a||""}const s=Object.keys(o).find(a=>o[a]===r.toLowerCase());return s?s.toUpperCase():""}):t.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?o[r]:o[r.toLowerCase()].toUpperCase())}static RemoveEmoji(t){const i=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return t.replace(i,"")}static CanBeTranslited(t){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(t)}static StringsEquals(t,i){const o=t.toLowerCase().replaceAll(/\s/g,""),r=i.toLowerCase().replaceAll(/\s/g,""),s=ae.Translit(o),a=ae.Translit(r);return o.includes(r)||s.includes(r)||o.includes(a)}static SearchIn(t,i){return ae.StringsEquals(t,i)}static SearchInFields(t,i){let o=!1;for(let r=0;r<i.length;r++)if(ae.SearchIn(i[r],t)){o=!0;break}return o}static FormatToPercentage(t){return`${t}%`}static ApplyClassToSubStr(t,i,o){const r=o??"highlight-text",s=new RegExp(ae.GetVariants(i).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const i=ae.Translit(t);return[t,ae.Capitalize(t),t.toLowerCase(),t.toUpperCase(),i,ae.Capitalize(i),i.toLowerCase(),i.toUpperCase()]}static ContainsNum(t){return/\d/.test(t)}static JoinSnake(...t){return t.join("_")}static GetDynamicCountName(t,i){const o=[2,0,1,1,1,2];return t.length+" "+i[t.length%100>4&&t.length%100<20?2:o[t.length%10<5?t.length%10:5]]}static TrimText(t){return typeof t=="string"?t.trim():t}}const Zt=class Zt{static BuildClass(t,i){i&&Object.keys(i).forEach(o=>{const r=i[o];if(this.isPrimitive(r))t[o]instanceof Date?t[o]=new Date(r):t[o]=r;else if(r!=null&&!Array.isArray(r))if(t[o]&&t[o].constructor)t[o]=new t[o].constructor(r);else{const s=Reflect.getMetadata(o,t);s&&(t[o]=new s[o](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(o,t);r.length!==0&&!s&&(t[o]=r),s&&(t[o]=r.map(a=>new s[o](a)))}})}static isPrimitive(t){return t!==null&&typeof t<"u"&&t!==Object(t)}static RemoveFromClassByIndex(t,i,o){Zt.RemoveFromClass(t,i,o)}static RemoveFromClassById(t,i,o){if(!t)return;const r=i.findIndex(s=>s.id===t);if(!(r<0))return Zt.RemoveFromClass(r,i,o),t}static RemoveFromClass(t,i,o){if(t<0)return;const r=i[t].id;r&&o&&o.push(r),i.splice(t,1)}static GetPropertyName(t){const i=new t;return new Proxy(i,{get(o,r){return r}})}static InitClassInstance(t,i){const o=t.constructor(i);return Zt.BuildClass(o),o.id=ve.UUID(),o}static ExistsWithId(t,i){return t.some(o=>o.id===i)}static DeepMap(t){return i=>Array.isArray(i)?i.map(Zt.DeepMap(t)):Object(i)===i?Object.fromEntries(Object.entries(i).map(([o,r])=>[o,Zt.DeepMap(t)(r)])):t(i)}static DeepTrim(t){return this.DeepMap(ae.TrimText)(t)}};l(Zt,"GetClassConstructor",t=>(i,o)=>{const r=Reflect.getMetadata(`property:${o}`,i)||{};r[o]=t,Reflect.defineMetadata(o,r,i)});let v=Zt;class en{constructor(t){l(this,"id");l(this,"address");l(this,"description");l(this,"contactId");v.BuildClass(this,t)}static Create(){const t=new en;return t.id=ve.UUID(),t}}class $o{static Setup(t="http://localhost",i="9000",o="api"){this.staticUrl=ae.BuildSafeUrl(t,i,o),this.staticUrl=No(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}l($o,"staticUrl","");class Ze{constructor(t){l(this,"name","");l(this,"url","");l(this,"src","");l(this,"raw");l(this,"blob");l(this,"file");l(this,"type","");l(this,"id");l(this,"originalName","");l(this,"fileSystemPath","");l(this,"itemId");l(this,"itemOneId");l(this,"description","");l(this,"order",0);v.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${$o.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:kn&&kn.tagName.toUpperCase()==="SCRIPT"&&kn.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,i){const o=new Ze;return o.id=i??ve.UUID(),o.originalName=t.name,o.file=t.blob,o.fileSystemPath=ve.UUID(),o}setFile(t){this.id||(this.id=ve.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=ve.UUID(),this.url=t.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(t,i){if(t.target){let o="";return i&&(o=`@/assets/img/${i}`),new URL(o,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:kn&&kn.tagName.toUpperCase()==="SCRIPT"&&kn.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(t){const i=t.split(".");return i[i.length-1]}}class os{constructor(t){l(this,"id");l(this,"name","");l(this,"surname","");l(this,"patronymic","");l(this,"isMale",!0);l(this,"dateBirth",new Date);l(this,"contactId");l(this,"slug","");l(this,"postIndex","");l(this,"address","");l(this,"editNameMode",!1);v.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=ae.Capitalize(this.name),this.surname=ae.Capitalize(this.surname),this.patronymic=ae.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 tn{constructor(t){l(this,"id");l(this,"number");l(this,"description");l(this,"contactId");v.BuildClass(this,t)}static Create(){const t=new tn;return t.id=ve.UUID(),t}}class Ii{constructor(t){l(this,"id");l(this,"address");l(this,"description");v.BuildClass(this,t)}}class Mi{constructor(t){l(this,"id");l(this,"login","");l(this,"email","");l(this,"password","");v.BuildClass(this,t)}static Create(){const t=new Mi;return t.id=ve.UUID(),t}}class Vo{constructor(t){l(this,"id");l(this,"address");l(this,"description");v.BuildClass(this,t)}}let Sc=(Ht=class{},l(Ht,"Phone",tn),l(Ht,"FileInfo",Ze),l(Ht,"Website",Vo),l(Ht,"Email",en),l(Ht,"Human",os),l(Ht,"PostAddress",Ii),l(Ht,"UserAccount",Mi),Ht);var xe=(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))(xe||{});class Pi{constructor(t){l(this,"field","");l(this,"operator",xe.Eq);l(this,"value","");v.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,i){return new Pi({operator:i,field:t})}eq(t){return this.field===t.field&&this.operator===t.operator}isUnary(){return this.operator===xe.Eq||this.operator===xe.Gt||this.operator===xe.Lt}isBetween(){return this.operator===xe.Btw}isSet(){return this.operator===xe.In}}class Io{constructor(t){l(this,"model","");l(this,"field","");l(this,"value","");l(this,"wheres",[]);v.BuildClass(this,t)}static Create(t){const i=new Io;return i.model=t.GetClassName(),i}eq(t){return t.model===this.model&&t.field===this.field}addWhere(t,i){const o=this.findWhere({field:t,operator:i});if(o)return o;const r=Pi.Create(t,i);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(i=>i.eq(t))}}let rs=class ql{constructor(t){l(this,"id");l(this,"model","");l(this,"wheres",[]);l(this,"joins",[]);v.BuildClass(this,t)}static Create(t){const i=new ql;return i.model=t.GetClassName(),i}addWhere(t,i){const o=this.findWhere({field:t,operator:i});if(o)return o;const r=Pi.Create(t,i);return this.wheres.push(r),r}removeWhere(t){const i=this.wheres.findIndex(o=>o.eq(t));i>-1&&this.wheres.splice(i,1)}addJoin(t){const i=this.findJoin({model:t.GetClassName()});if(i)return i;const o=Io.Create(t);return this.joins.push(o),o}findJoin(t){return this.joins.find(i=>i.eq(t))}findWhere(t){return this.wheres.find(i=>i.eq(t))}toRef(){return e.ref(this)}};class zt{static Shuffle(t){for(let i=t.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1));[t[i],t[o]]=[t[o],t[i]]}}static GenerateNumsRange(t,i,o=1){return Array.from({length:(i-t)/o+1},(r,s)=>t+s*o)}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((i,o)=>i.order=o)}static Refill(t,i){t.splice(0,t.length),t.push(...i)}static Eq(t,i){return t.length===i.length&&(t==null?void 0:t.every((o,r)=>t[r]==i[r]))}static SwipeById(t,i,o){const r=t.findIndex(a=>i.id===a.id),s=t.findIndex(a=>o.id===a.id);r<0||s<0||([t[r],t[s]]=[t[s],t[r]])}static Swap(t,i,o){if(i<0||i>=t.length||o<0||o>=t.length)return;const r=t[i];t[i]=t[o],t[o]=r}static MoveUp(t,i){t[i].order=i-1,t[i-1]&&(t[i-1].order=i),[t[i],t[i-1]]=[t[i-1],t[i]]}static MoveDown(t,i){t[i].order=i+1,t[i+1]&&(t[i+1].order=i),[t[i],t[i+1]]=[t[i+1],t[i]]}}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||{}),Cc=Object.defineProperty,kc=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Cc(t,i,r),r};const ss=class ki{constructor(t){l(this,"id");l(this,"model","");l(this,"label","");l(this,"col","");l(this,"operator",xe.Eq);l(this,"date1");l(this,"date2");l(this,"value1","");l(this,"boolean",!1);l(this,"number",0);l(this,"type",Ae.String);l(this,"set",[]);l(this,"isSet",!1);l(this,"joinTable","");l(this,"joinTableModel","");l(this,"joinTableFk","");l(this,"joinTablePk","");l(this,"joinTableId","");l(this,"joinTableIdCol","");v.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===Ae.Join){const i=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===xe.In?i&&zt.Eq(this.set,t.set):i}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?zt.Eq(this.set,t.set):!1}toUrlQuery(){const t=this.type?`"type":"${this.type}"`:"",i=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Ae.Boolean?`"boolean":${this.boolean}`:"",d=this.type===Ae.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",c=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===xe.In?`"set":${JSON.stringify(this.set)}`:"",m=this.type===Ae.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,i,o,r,s,a,d,c,u,f,m].filter(h=>h!=="").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===xe.Eq||this.operator===xe.Gt||this.operator===xe.Lt}isBetweenFilter(){return this.operator===xe.Btw}isSetFilter(){return this.operator===xe.In}static Create(t,i,o){const r=new ki;return r.model=t.GetClassName(),r.col=i??"",r.type=o,r.type===Ae.Number&&(r.value1="0"),r.type===Ae.String&&(r.value1=""),r.type===Ae.Boolean&&(r.value1="false",r.operator=xe.Eq),r}static CreateFilterModelWithJoin(t,i,o,r,s,a,d,c){const u=new ki;return u.id=jt(),u.joinTable=o,u.joinTablePk=r,u.joinTableFk=s,u.col=i,u.type=a,d&&(u.joinTableId=d),c&&(u.joinTableIdCol=c),u}static CreateFilterModelWithJoinV2(t,i,o,r,s,a,d){const c=new ki;return c.model=t,c.joinTableModel=o,c.joinTablePk=r,c.joinTableFk=s,c.col=i,c.type=Ae.Join,a&&(c.joinTableId=a),d&&(c.joinTableIdCol=d),c}static OnlyIfSecondModelExists(t,i){const o=new ki;return o.id=jt(),o.model=ae.ToCamelCase(t.GetClassName()),o.joinTableModel=ae.ToCamelCase(i.GetClassName()),o.type=Ae.Join,o}addToSet(...t){t.forEach(i=>{if(this.set.indexOf(i)===-1){this.set.push(i);return}this.set=this.set.filter(o=>o!==i)})}pushToSet(...t){t.forEach(i=>{this.set.indexOf(i)===-1&&this.set.push(i)})}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,i){if(!t&&!i){this.dropDates();return}if(!i){this.setDate1(t),this.operator=xe.Eq;return}this.setDate2(i),this.operator=xe.Btw}};kc([v.GetClassConstructor(String)],ss.prototype,"set");let Mo=ss;class xc{constructor(){l(this,"operation",xe.Lt);l(this,"column","");l(this,"value");l(this,"initial",!0);l(this,"tableName","");l(this,"version","");l(this,"model","")}toUrlQuery(){const t=this.operation?`"operation":"${this.operation}"`:"",i=this.column?`"column":"${this.column}"`:"",o=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=o?`"value":"${o}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[t,i,r,s,a].filter(d=>d!=="").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 Ti{constructor(t){l(this,"page",0);l(this,"rowsPerPage",25);l(this,"rowsNumber",0);l(this,"cursor",new xc);l(this,"cursorMode",!1);l(this,"append",!1);l(this,"allLoaded",!1);l(this,"version","");v.BuildClass(this,t)}setLoadMore(t,i,o){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=xe.Gt,this.cursor.column=i,this.cursor.tableName=o,this.cursorMode=!0}setLoadMoreV2(t,i,o){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=xe.Gt,this.cursor.column=i,this.cursor.model=o,this.cursorMode=!0,this.version="v2"}setOffset(t){this.page=t}toUrlQuery(){const t=`"offset":${this.offset}`,i=`"limit":${this.limit}`,o=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[t,i,o,r,s,a].toString()}fromUrlQuery(){const t=window.location.search,i=t.substring(t.indexOf("p=")+2,t.lastIndexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.page=Number(o.get("offset")),this.rowsPerPage=Number(o.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,v.BuildClass(this)}}var ft=(n=>(n.Asc="asc",n.Desc="desc",n))(ft||{});class Ri{constructor(t){l(this,"model","");l(this,"col","");l(this,"order");l(this,"label","");l(this,"default",!1);l(this,"selected",!1);v.BuildClass(this,t)}static Create(t,i,o=ft.Asc,r,s){const a=new Ri;return a.model=t.GetClassName(),a.col=i??"",a.order=o??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}"`:"",i=this.col?`"col":"${this.col}"`:"",o=this.order?`"order":"${this.order}"`:"";return[t,i,o].toString()}async fromUrlQuery(){const t=window.location.search,i=t.substring(t.indexOf("s=")+2,t.indexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.model=o.get("model")??"",this.col=o.get("col")??"",this.label=o.get("label")??"",this.default=!!o.get("default"),this.order=o.get("order")??""}asc(){this.order=ft.Asc}desc(){this.order=ft.Desc}}class Di{constructor(){l(this,"model","");l(this,"cols",[]);l(this,"models",[])}static Create(t,i){const o=new Di;return o.model=t.GetClassName(),o.cols=i,o}}var Ec=Object.defineProperty,Xn=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Ec(t,i,r),r};const Nn=(nt=class{constructor(t){l(this,"id");l(this,"f",[]);l(this,"f2",[]);l(this,"s",[]);l(this,"p",new Ti);l(this,"t",new Di);v.BuildClass(this,t)}static Get(){return this.instance||(this.instance=new nt),this.instance}createFrom(t){const i=new nt(JSON.parse(t));this.f=i.f}clearForHTTP(){const t=new nt(this);return t.f=this.f.map(i=>nt.EmptyEntiries(i)),t.f2=this.f2.map(i=>nt.EmptyEntiries(i)),t.s=this.s.map(i=>nt.EmptyEntiries(i)),t.p=nt.EmptyEntiries(this.p),t.t=nt.EmptyEntiries(this.t),t}static EmptyEntiries(t){if(!t)return;const o=Object.entries(t).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(o)}findFilterModel(t){return this.f.find(i=>t.id===i.id)}getFirstSortModel(){return zt.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,i){this.removeF(i),t&&this.setF(t)}removeF(t){const i=this.f.findIndex(o=>o.eq(t));v.RemoveFromClassByIndex(i,this.f)}reset(){this.f=[],this.s=[],this.p=new Ti}resetF(){this.f=[]}},l(nt,"instance"),nt);Xn([v.GetClassConstructor(Mo)],Nn.prototype,"f"),Xn([v.GetClassConstructor(rs)],Nn.prototype,"f2"),Xn([v.GetClassConstructor(Ri)],Nn.prototype,"s"),Xn([v.GetClassConstructor(Ti)],Nn.prototype,"p"),Xn([v.GetClassConstructor(Di)],Nn.prototype,"t");let _t=Nn,Bc=(Wn=class{},l(Wn,"SortModel",Ri),l(Wn,"FilterModel",Mo),l(Wn,"FilterModelV2",rs),l(Wn,"FTSP",_t),Wn);function as(n,t){return function(){return n.apply(t,arguments)}}const{toString:Nc}=Object.prototype,{getPrototypeOf:$n}=Object,{iterator:Zn,toStringTag:ls}=Symbol,Ai=(({hasOwnProperty:n})=>(t,i)=>n.call(t,i))(Object.prototype),Jn=(n,t)=>{let i=n;const o=[];for(;i!=null&&i!==Object.prototype;){if(o.indexOf(i)!==-1)return!1;if(o.push(i),Ai(i,t))return!0;i=$n(i)}return!1},$c=(n,t)=>n!=null&&Jn(n,t)?n[t]:void 0,Po=(n=>t=>{const i=Nc.call(t);return n[i]||(n[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),bt=n=>(n=n.toLowerCase(),t=>Po(t)===n),zi=n=>t=>typeof t===n,{isArray:nn}=Array,Vn=zi("undefined");function In(n){return n!==null&&!Vn(n)&&n.constructor!==null&&!Vn(n.constructor)&&et(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const cs=bt("ArrayBuffer");function Vc(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&cs(n.buffer),t}const Ic=zi("string"),et=zi("function"),ds=zi("number"),Mn=n=>n!==null&&typeof n=="object",Mc=n=>n===!0||n===!1,_i=n=>{if(!Mn(n))return!1;const t=$n(n);return(t===null||t===Object.prototype||$n(t)===null)&&!Jn(n,ls)&&!Jn(n,Zn)},Pc=n=>{if(!Mn(n)||In(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Tc=bt("Date"),Rc=bt("File"),Dc=n=>!!(n&&typeof n.uri<"u"),Ac=n=>n&&typeof n.getParts<"u",zc=bt("Blob"),_c=bt("FileList"),Fc=n=>Mn(n)&&et(n.pipe);function Oc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const us=Oc(),fs=typeof us.FormData<"u"?us.FormData:void 0,Lc=n=>{if(!n)return!1;if(fs&&n instanceof fs)return!0;const t=$n(n);if(!t||t===Object.prototype||!et(n.append))return!1;const i=Po(n);return i==="formdata"||i==="object"&&et(n.toString)&&n.toString()==="[object FormData]"},vc=bt("URLSearchParams"),[Hc,Uc,qc,jc]=["ReadableStream","Request","Response","Headers"].map(bt),Wc=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Kn(n,t,{allOwnKeys:i=!1}={}){if(n===null||typeof n>"u")return;let o,r;if(typeof n!="object"&&(n=[n]),nn(n))for(o=0,r=n.length;o<r;o++)t.call(null,n[o],o,n);else{if(In(n))return;const s=i?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let d;for(o=0;o<a;o++)d=s[o],t.call(null,n[d],d,n)}}function ms(n,t){if(In(n))return null;t=t.toLowerCase();const i=Object.keys(n);let o=i.length,r;for(;o-- >0;)if(r=i[o],t===r.toLowerCase())return r;return null}const on=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hs=n=>!Vn(n)&&n!==on;function To(...n){const{caseless:t,skipUndefined:i}=hs(this)&&this||{},o={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const d=t&&typeof a=="string"&&ms(o,a)||a,c=Ai(o,d)?o[d]:void 0;_i(c)&&_i(s)?o[d]=To(c,s):_i(s)?o[d]=To({},s):nn(s)?o[d]=s.slice():(!i||!Vn(s))&&(o[d]=s)};for(let s=0,a=n.length;s<a;s++){const d=n[s];if(!d||In(d)||(Kn(d,r),typeof d!="object"||nn(d)))continue;const c=Object.getOwnPropertySymbols(d);for(let u=0;u<c.length;u++){const f=c[u];od.call(d,f)&&r(d[f],f)}}return o}const Gc=(n,t,i,{allOwnKeys:o}={})=>(Kn(t,(r,s)=>{i&&et(r)?Object.defineProperty(n,s,{__proto__:null,value:as(r,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),n),Qc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Yc=(n,t,i,o)=>{n.prototype=Object.create(t.prototype,o),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),i&&Object.assign(n.prototype,i)},Xc=(n,t,i,o)=>{let r,s,a;const d={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!o||o(a,n,t))&&!d[a]&&(t[a]=n[a],d[a]=!0);n=i!==!1&&$n(n)}while(n&&(!i||i(n,t))&&n!==Object.prototype);return t},Zc=(n,t,i)=>{n=String(n),(i===void 0||i>n.length)&&(i=n.length),i-=t.length;const o=n.indexOf(t,i);return o!==-1&&o===i},Jc=n=>{if(!n)return null;if(nn(n))return n;let t=n.length;if(!ds(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=n[t];return i},Kc=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&$n(Uint8Array)),ed=(n,t)=>{const o=(n&&n[Zn]).call(n);let r;for(;(r=o.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},td=(n,t)=>{let i;const o=[];for(;(i=n.exec(t))!==null;)o.push(i);return o},nd=bt("HTMLFormElement"),id=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,o,r){return o.toUpperCase()+r}),{propertyIsEnumerable:od}=Object.prototype,rd=bt("RegExp"),ps=(n,t)=>{const i=Object.getOwnPropertyDescriptors(n),o={};Kn(i,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(o[s]=a||r)}),Object.defineProperties(n,o)},sd=n=>{ps(n,(t,i)=>{if(et(n)&&["arguments","caller","callee"].includes(i))return!1;const o=n[i];if(et(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},ad=(n,t)=>{const i={},o=r=>{r.forEach(s=>{i[s]=!0})};return nn(n)?o(n):o(String(n).split(t)),i},ld=()=>{},cd=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function dd(n){return!!(n&&et(n.append)&&n[ls]==="FormData"&&n[Zn])}const ud=n=>{const t=new WeakSet,i=o=>{if(Mn(o)){if(t.has(o))return;if(In(o))return o;if(!("toJSON"in o)){t.add(o);const r=nn(o)?[]:{};return Kn(o,(s,a)=>{const d=i(s);!Vn(d)&&(r[a]=d)}),t.delete(o),r}}return o};return i(n)},fd=bt("AsyncFunction"),md=n=>n&&(Mn(n)||et(n))&&et(n.then)&&et(n.catch),gs=((n,t)=>n?setImmediate:t?((i,o)=>(on.addEventListener("message",({source:r,data:s})=>{r===on&&s===i&&o.length&&o.shift()()},!1),r=>{o.push(r),on.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",et(on.postMessage)),hd=typeof queueMicrotask<"u"?queueMicrotask.bind(on):typeof process<"u"&&process.nextTick||gs,ys=n=>n!=null&&et(n[Zn]),b={isArray:nn,isArrayBuffer:cs,isBuffer:In,isFormData:Lc,isArrayBufferView:Vc,isString:Ic,isNumber:ds,isBoolean:Mc,isObject:Mn,isPlainObject:_i,isEmptyObject:Pc,isReadableStream:Hc,isRequest:Uc,isResponse:qc,isHeaders:jc,isUndefined:Vn,isDate:Tc,isFile:Rc,isReactNativeBlob:Dc,isReactNative:Ac,isBlob:zc,isRegExp:rd,isFunction:et,isStream:Fc,isURLSearchParams:vc,isTypedArray:Kc,isFileList:_c,forEach:Kn,merge:To,extend:Gc,trim:Wc,stripBOM:Qc,inherits:Yc,toFlatObject:Xc,kindOf:Po,kindOfTest:bt,endsWith:Zc,toArray:Jc,forEachEntry:ed,matchAll:td,isHTMLForm:nd,hasOwnProperty:Ai,hasOwnProp:Ai,hasOwnInPrototypeChain:Jn,getSafeProp:$c,reduceDescriptors:ps,freezeMethods:sd,toObjectSet:ad,toCamelCase:id,noop:ld,toFiniteNumber:cd,findKey:ms,global:on,isContextDefined:hs,isSpecCompliantForm:dd,toJSONObject:ud,isAsyncFn:fd,isThenable:md,setImmediate:gs,asap:hd,isIterable:ys,isSafeIterable:n=>n!=null&&Jn(n,Zn)&&ys(n)},pd=b.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"]),gd=n=>{const t={};let i,o,r;return n&&n.split(`
15
- `).forEach(function(a){r=a.indexOf(":"),i=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!i||t[i]&&pd[i])&&(i==="set-cookie"?t[i]?t[i].push(o):t[i]=[o]:t[i]=t[i]?t[i]+", "+o:o)}),t};function yd(n){let t=0,i=n.length;for(;t<i;){const o=n.charCodeAt(t);if(o!==9&&o!==32)break;t+=1}for(;i>t;){const o=n.charCodeAt(i-1);if(o!==9&&o!==32)break;i-=1}return t===0&&i===n.length?n:n.slice(t,i)}const wd=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),bd=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ro(n,t){return b.isArray(n)?n.map(i=>Ro(i,t)):yd(String(n).replace(t,""))}const Sd=n=>Ro(n,wd),Cd=n=>Ro(n,bd);function ws(n){const t=Object.create(null);return b.forEach(n.toJSON(),(i,o)=>{t[o]=Cd(i)}),t}const bs=Symbol("internals");function ei(n){return n&&String(n).trim().toLowerCase()}function Fi(n){return n===!1||n==null?n:b.isArray(n)?n.map(Fi):Sd(String(n))}function kd(n){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=i.exec(n);)t[o[1]]=o[2];return t}const xd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Do(n,t,i,o,r){if(b.isFunction(o))return o.call(this,t,i);if(r&&(t=i),!!b.isString(t)){if(b.isString(o))return t.indexOf(o)!==-1;if(b.isRegExp(o))return o.test(t)}}function Ed(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,o)=>i.toUpperCase()+o)}function Bd(n,t){const i=b.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+i,{__proto__:null,value:function(r,s,a){return this[o].call(this,t,r,s,a)},configurable:!0})})}let We=class{constructor(t){t&&this.set(t)}set(t,i,o){const r=this;function s(d,c,u){const f=ei(c);if(!f)return;const m=b.findKey(r,f);(!m||r[m]===void 0||u===!0||u===void 0&&r[m]!==!1)&&(r[m||c]=Fi(d))}const a=(d,c)=>b.forEach(d,(u,f)=>s(u,f,c));if(b.isPlainObject(t)||t instanceof this.constructor)a(t,i);else if(b.isString(t)&&(t=t.trim())&&!xd(t))a(gd(t),i);else if(b.isObject(t)&&b.isSafeIterable(t)){let d=Object.create(null),c,u;for(const f of t){if(!b.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],b.hasOwnProp(d,u)?(c=d[u],d[u]=b.isArray(c)?[...c,f[1]]:[c,f[1]]):d[u]=f[1]}a(d,i)}else t!=null&&s(i,t,o);return this}get(t,i){if(t=ei(t),t){const o=b.findKey(this,t);if(o){const r=this[o];if(!i)return r;if(i===!0)return kd(r);if(b.isFunction(i))return i.call(this,r,o);if(b.isRegExp(i))return i.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=ei(t),t){const o=b.findKey(this,t);return!!(o&&this[o]!==void 0&&(!i||Do(this,this[o],o,i)))}return!1}delete(t,i){const o=this;let r=!1;function s(a){if(a=ei(a),a){const d=b.findKey(o,a);d&&(!i||Do(o,o[d],d,i))&&(delete o[d],r=!0)}}return b.isArray(t)?t.forEach(s):s(t),r}clear(t){const i=Object.keys(this);let o=i.length,r=!1;for(;o--;){const s=i[o];(!t||Do(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const i=this,o={};return b.forEach(this,(r,s)=>{const a=b.findKey(o,s);if(a){i[a]=Fi(r),delete i[s];return}const d=t?Ed(s):String(s).trim();d!==s&&delete i[s],i[d]=Fi(r),o[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const i=Object.create(null);return b.forEach(this,(o,r)=>{o!=null&&o!==!1&&(i[r]=t&&b.isArray(o)?o.join(", "):o)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,i])=>t+": "+i).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,...i){const o=new this(t);return i.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[bs]=this[bs]={accessors:{}}).accessors,r=this.prototype;function s(a){const d=ei(a);o[d]||(Bd(r,a),o[d]=!0)}return b.isArray(t)?t.forEach(s):s(t),this}};We.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),b.reduceDescriptors(We.prototype,({value:n},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(o){this[i]=o}}}),b.freezeMethods(We);const Nd="[REDACTED ****]";function $d(n){if(b.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(b.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Vd(n,t){const i=new Set(t.map(s=>String(s).toLowerCase())),o=[],r=s=>{if(s===null||typeof s!="object"||b.isBuffer(s))return s;if(o.indexOf(s)!==-1)return;s instanceof We&&(s=s.toJSON()),o.push(s);let a;if(b.isArray(s))a=[],s.forEach((d,c)=>{const u=r(d);b.isUndefined(u)||(a[c]=u)});else{if(!b.isPlainObject(s)&&$d(s))return o.pop(),s;a=Object.create(null);for(const[d,c]of Object.entries(s)){const u=i.has(d.toLowerCase())?Nd:r(c);b.isUndefined(u)||(a[d]=u)}}return o.pop(),a};return r(n)}let F=class jl extends Error{static from(t,i,o,r,s,a){const d=new jl(t.message,i||t.code,o,r,s);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),a&&Object.assign(d,a),d}constructor(t,i,o,r,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,i&&(this.code=i),o&&(this.config=o),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,i=t&&b.hasOwnProp(t,"redact")?t.redact:void 0,o=b.isArray(i)&&i.length>0?Vd(t,i):b.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:o,code:this.code,status:this.status}}};F.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",F.ERR_BAD_OPTION="ERR_BAD_OPTION",F.ECONNABORTED="ECONNABORTED",F.ETIMEDOUT="ETIMEDOUT",F.ECONNREFUSED="ECONNREFUSED",F.ERR_NETWORK="ERR_NETWORK",F.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",F.ERR_DEPRECATED="ERR_DEPRECATED",F.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",F.ERR_BAD_REQUEST="ERR_BAD_REQUEST",F.ERR_CANCELED="ERR_CANCELED",F.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",F.ERR_INVALID_URL="ERR_INVALID_URL",F.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Id=null,Ss=100;function Ao(n){return b.isPlainObject(n)||b.isArray(n)}function Cs(n){return b.endsWith(n,"[]")?n.slice(0,-2):n}function zo(n,t,i){return n?n.concat(t).map(function(r,s){return r=Cs(r),!i&&s?"["+r+"]":r}).join(i?".":""):t}function Md(n){return b.isArray(n)&&!n.some(Ao)}const Pd=b.toFlatObject(b,{},null,function(t){return/^is[A-Z]/.test(t)});function Oi(n,t,i){if(!b.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,i=b.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(V,k){return!b.isUndefined(k[V])});const o=i.metaTokens,r=i.visitor||y,s=i.dots,a=i.indexes,d=i.Blob||typeof Blob<"u"&&Blob,c=i.maxDepth===void 0?Ss:i.maxDepth,u=d&&b.isSpecCompliantForm(t),f=[];if(!b.isFunction(r))throw new TypeError("visitor must be a function");function m(x){if(x===null)return"";if(b.isDate(x))return x.toISOString();if(b.isBoolean(x))return x.toString();if(!u&&b.isBlob(x))throw new F("Blob is not supported. Use a Buffer instead.");if(b.isArrayBuffer(x)||b.isTypedArray(x)){if(u&&typeof d=="function")return new d([x]);if(typeof Buffer<"u")return Buffer.from(x);throw new F("Blob is not supported. Use a Buffer instead.",F.ERR_NOT_SUPPORT)}return x}function h(x){if(x>c)throw new F("Object is too deeply nested ("+x+" levels). Max depth: "+c,F.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(x,V){if(c===1/0)return JSON.stringify(x);const k=[];return JSON.stringify(x,function(M,A){if(!b.isObject(A))return A;for(;k.length&&k[k.length-1]!==this;)k.pop();return k.push(A),h(V+k.length-1),A})}function y(x,V,k){let T=x;if(b.isReactNative(t)&&b.isReactNativeBlob(x))return t.append(zo(k,V,s),m(x)),!1;if(x&&!k&&typeof x=="object"){if(b.endsWith(V,"{}"))V=o?V:V.slice(0,-2),x=w(x,1);else if(b.isArray(x)&&Md(x)||(b.isFileList(x)||b.endsWith(V,"[]"))&&(T=b.toArray(x)))return V=Cs(V),T.forEach(function(A,Q){!(b.isUndefined(A)||A===null)&&t.append(a===!0?zo([V],Q,s):a===null?V:V+"[]",m(A))}),!1}return Ao(x)?!0:(t.append(zo(k,V,s),m(x)),!1)}const S=Object.assign(Pd,{defaultVisitor:y,convertValue:m,isVisitable:Ao});function E(x,V,k=0){if(!b.isUndefined(x)){if(h(k),f.indexOf(x)!==-1)throw new Error("Circular reference detected in "+V.join("."));f.push(x),b.forEach(x,function(M,A){(!(b.isUndefined(M)||M===null)&&r.call(t,M,b.isString(A)?A.trim():A,V,S))===!0&&E(M,V?V.concat(A):[A],k+1)}),f.pop()}}if(!b.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(o){return t[o]})}function _o(n,t){this._pairs=[],n&&Oi(n,this,t)}const xs=_o.prototype;xs.append=function(t,i){this._pairs.push([t,i])},xs.toString=function(t){const i=t?o=>t.call(this,o,ks):ks;return this._pairs.map(function(r){return i(r[0])+"="+i(r[1])},"").join("&")};function Td(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Es(n,t,i){if(!t)return n;n=n||"";const o=b.isFunction(i)?{serialize:i}:i,r=b.getSafeProp(o,"encode")||Td,s=b.getSafeProp(o,"serialize");let a;if(s?a=s(t,o):a=b.isURLSearchParams(t)?t.toString():new _o(t,o).toString(r),a){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Bs{constructor(){this.handlers=[]}use(t,i,o){return this.handlers.push({fulfilled:t,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){b.forEach(this.handlers,function(o){o!==null&&t(o)})}}const Fo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Rd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:_o,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Oo=typeof window<"u"&&typeof document<"u",Lo=typeof navigator=="object"&&navigator||void 0,Dd=Oo&&(!Lo||["ReactNative","NativeScript","NS"].indexOf(Lo.product)<0),Ad=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",zd=Oo&&window.location.href||"http://localhost",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Oo,hasStandardBrowserEnv:Dd,hasStandardBrowserWebWorkerEnv:Ad,navigator:Lo,origin:zd},Symbol.toStringTag,{value:"Module"})),...Rd};function _d(n,t){return Oi(n,new He.classes.URLSearchParams,{visitor:function(i,o,r,s){return He.isNode&&b.isBuffer(i)?(this.append(o,i.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Ns=Ss;function $s(n){if(n>Ns)throw new F("FormData field is too deeply nested ("+n+" levels). Max depth: "+Ns,F.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Fd(n){const t=[],i=/\w+|\[(\w*)]/g;let o;for(;(o=i.exec(n))!==null;)$s(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function Od(n){const t={},i=Object.keys(n);let o;const r=i.length;let s;for(o=0;o<r;o++)s=i[o],t[s]=n[s];return t}function Vs(n){function t(i,o,r,s){$s(s);let a=i[s++];if(a==="__proto__")return!0;const d=Number.isFinite(+a),c=s>=i.length;return a=!a&&b.isArray(r)?r.length:a,c?(b.hasOwnProp(r,a)?r[a]=b.isArray(r[a])?r[a].concat(o):[r[a],o]:r[a]=o,!d):((!b.hasOwnProp(r,a)||!b.isObject(r[a]))&&(r[a]=[]),t(i,o,r[a],s)&&b.isArray(r[a])&&(r[a]=Od(r[a])),!d)}if(b.isFormData(n)&&b.isFunction(n.entries)){const i={};return b.forEachEntry(n,(o,r)=>{t(Fd(o),r,i,0)}),i}return null}const Pn=(n,t)=>n!=null&&b.hasOwnProp(n,t)?n[t]:void 0;function Ld(n,t,i){if(b.isString(n))try{return(t||JSON.parse)(n),b.trim(n)}catch(o){if(o.name!=="SyntaxError")throw o}return(i||JSON.stringify)(n)}const ti={transitional:Fo,adapter:["xhr","http","fetch"],transformRequest:[function(t,i){const o=i.getContentType()||"",r=o.indexOf("application/json")>-1,s=b.isObject(t);if(s&&b.isHTMLForm(t)&&(t=new FormData(t)),b.isFormData(t))return r?JSON.stringify(Vs(t)):t;if(b.isArrayBuffer(t)||b.isBuffer(t)||b.isStream(t)||b.isFile(t)||b.isBlob(t)||b.isReadableStream(t))return t;if(b.isArrayBufferView(t))return t.buffer;if(b.isURLSearchParams(t))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(s){const c=Pn(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return _d(t,c).toString();if((d=b.isFileList(t))||o.indexOf("multipart/form-data")>-1){const u=Pn(this,"env"),f=u&&u.FormData;return Oi(d?{"files[]":t}:t,f&&new f,c)}}return s||r?(i.setContentType("application/json",!1),Ld(t)):t}],transformResponse:[function(t){const i=Pn(this,"transitional")||ti.transitional,o=i&&i.forcedJSONParsing,r=Pn(this,"responseType"),s=r==="json";if(b.isResponse(t)||b.isReadableStream(t))return t;if(t&&b.isString(t)&&(o&&!r||s)){const d=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(t,Pn(this,"parseReviver"))}catch(c){if(d)throw c.name==="SyntaxError"?F.from(c,F.ERR_BAD_RESPONSE,this,null,Pn(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch","query"],n=>{ti.headers[n]={}});function vo(n,t){const i=this||ti,o=t||i,r=We.from(o.headers);let s=o.data;return b.forEach(n,function(d){s=d.call(i,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Is(n){return!!(n&&n.__CANCEL__)}let ni=class extends F{constructor(t,i,o){super(t??"canceled",F.ERR_CANCELED,i,o),this.name="CanceledError",this.__CANCEL__=!0}};function Ms(n,t,i){const o=i.config.validateStatus;!i.status||!o||o(i.status)?n(i):t(new F("Request failed with status code "+i.status,i.status>=400&&i.status<500?F.ERR_BAD_REQUEST:F.ERR_BAD_RESPONSE,i.config,i.request,i))}function vd(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Hd(n,t){n=n||10;const i=new Array(n),o=new Array(n);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=o[s];a||(a=u),i[r]=c,o[r]=u;let m=s,h=0;for(;m!==r;)h+=i[m++],m=m%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<t)return;const w=f&&u-f;return w?Math.round(h*1e3/w):void 0}}function Ud(n,t){let i=0,o=1e3/t,r,s;const a=(u,f=Date.now())=>{i=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),m=f-i;m>=o?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-m)))},()=>r&&a(r)]}const Li=(n,t,i=3)=>{let o=0;const r=Hd(50,250);return Ud(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,d=s.lengthComputable?s.total:void 0,c=d!=null?Math.min(a,d):a,u=Math.max(0,c-o),f=r(u);o=Math.max(o,c);const m={loaded:c,total:d,progress:d?c/d:void 0,bytes:u,rate:f||void 0,estimated:f&&d?(d-c)/f:void 0,event:s,lengthComputable:d!=null,[t?"download":"upload"]:!0};n(m)},i)},Ps=(n,t)=>{const i=n!=null;return[o=>t[0]({lengthComputable:i,total:n,loaded:o}),t[1]]},Ts=n=>(...t)=>b.asap(()=>n(...t)),qd=He.hasStandardBrowserEnv?((n,t)=>i=>(i=new URL(i,He.origin),n.protocol===i.protocol&&n.host===i.host&&(t||n.port===i.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,jd=He.hasStandardBrowserEnv?{write(n,t,i,o,r,s,a){if(typeof document>"u")return;const d=[`${n}=${encodeURIComponent(t)}`];b.isNumber(i)&&d.push(`expires=${new Date(i).toUTCString()}`),b.isString(o)&&d.push(`path=${o}`),b.isString(r)&&d.push(`domain=${r}`),s===!0&&d.push("secure"),b.isString(a)&&d.push(`SameSite=${a}`),document.cookie=d.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let i=0;i<t.length;i++){const o=t[i].replace(/^\s+/,""),r=o.indexOf("=");if(r!==-1&&o.slice(0,r)===n)try{return decodeURIComponent(o.slice(r+1))}catch{return o.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Wd(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Gd(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const Qd=/^https?:(?!\/\/)/i,Yd=/[\t\n\r]/g;function Xd(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function Zd(n){return Xd(n).replace(Yd,"")}function Rs(n,t){if(typeof n=="string"&&Qd.test(Zd(n)))throw new F('Invalid URL: missing "//" after protocol',F.ERR_INVALID_URL,t)}function Ds(n,t,i,o){Rs(t,o);let r=!Wd(t);return n&&(r||i===!1)?(Rs(n,o),Gd(n,t)):t}const As=n=>n instanceof We?{...n}:n;function rn(n,t){n=n||{},t=t||{};const i=Object.create(null);Object.defineProperty(i,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(f,m,h,w){return b.isPlainObject(f)&&b.isPlainObject(m)?b.merge.call({caseless:w},f,m):b.isPlainObject(m)?b.merge({},m):b.isArray(m)?m.slice():m}function r(f,m,h,w){if(b.isUndefined(m)){if(!b.isUndefined(f))return o(void 0,f,h,w)}else return o(f,m,h,w)}function s(f,m){if(!b.isUndefined(m))return o(void 0,m)}function a(f,m){if(b.isUndefined(m)){if(!b.isUndefined(f))return o(void 0,f)}else return o(void 0,m)}function d(f){const m=b.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!b.isUndefined(m))if(b.isPlainObject(m)){if(b.hasOwnProp(m,f))return m[f]}else return;const h=b.hasOwnProp(n,"transitional")?n.transitional:void 0;if(b.isPlainObject(h)&&b.hasOwnProp(h,f))return h[f]}function c(f,m,h){if(b.hasOwnProp(t,h))return o(f,m);if(b.hasOwnProp(n,h))return o(void 0,f)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:c,headers:(f,m,h)=>r(As(f),As(m),h,!0)};return b.forEach(Object.keys({...n,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const h=b.hasOwnProp(u,m)?u[m]:r,w=b.hasOwnProp(n,m)?n[m]:void 0,y=b.hasOwnProp(t,m)?t[m]:void 0,S=h(w,y,m);b.isUndefined(S)&&h!==c||(i[m]=S)}),b.hasOwnProp(t,"validateStatus")&&b.isUndefined(t.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(b.hasOwnProp(n,"validateStatus")?i.validateStatus=o(void 0,n.validateStatus):delete i.validateStatus),i}const Jd=["content-type","content-length"];function Kd(n,t,i){if(i!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([o,r])=>{Jd.includes(o.toLowerCase())&&n.set(o,r)})}const eu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,i)=>String.fromCharCode(parseInt(i,16)));function zs(n){const t=rn({},n),i=h=>b.hasOwnProp(t,h)?t[h]:void 0,o=i("data");let r=i("withXSRFToken");const s=i("xsrfHeaderName"),a=i("xsrfCookieName");let d=i("headers");const c=i("auth"),u=i("baseURL"),f=i("allowAbsoluteUrls"),m=i("url");if(t.headers=d=We.from(d),t.url=Es(Ds(u,m,f,t),i("params"),i("paramsSerializer")),c){const h=b.getSafeProp(c,"username")||"",w=b.getSafeProp(c,"password")||"";try{d.set("Authorization","Basic "+btoa(h+":"+(w?eu(w):"")))}catch(y){throw F.from(y,F.ERR_BAD_OPTION_VALUE,n)}}if(b.isFormData(o)&&(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv||b.isReactNative(o)?d.setContentType(void 0):b.isFunction(o.getHeaders)&&Kd(d,o.getHeaders(),i("formDataHeaderPolicy"))),He.hasStandardBrowserEnv&&(b.isFunction(r)&&(r=r(t)),r===!0||r==null&&qd(t.url))){const w=s&&a&&jd.read(a);w&&d.set(s,w)}return t}const tu=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(i,o){const r=zs(n);let s=r.data;const a=We.from(r.headers).normalize();let{responseType:d,onUploadProgress:c,onDownloadProgress:u}=r,f,m,h,w,y;function S(){w&&w(),y&&y(),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 x(){if(!E)return;const k=We.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),M={data:!d||d==="text"||d==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:k,config:n,request:E};Ms(function(Q){i(Q),S()},function(Q){o(Q),S()},M),E=null}"onloadend"in E?E.onloadend=x:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.startsWith("file:"))||setTimeout(x)},E.onabort=function(){E&&(o(new F("Request aborted",F.ECONNABORTED,n,E)),S(),E=null)},E.onerror=function(T){const M=T&&T.message?T.message:"Network Error",A=new F(M,F.ERR_NETWORK,n,E);A.event=T||null,o(A),S(),E=null},E.ontimeout=function(){let T=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const M=r.transitional||Fo;r.timeoutErrorMessage&&(T=r.timeoutErrorMessage),o(new F(T,M.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,n,E)),S(),E=null},s===void 0&&a.setContentType(null),"setRequestHeader"in E&&b.forEach(ws(a),function(T,M){E.setRequestHeader(M,T)}),b.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),d&&d!=="json"&&(E.responseType=r.responseType),u&&([h,y]=Li(u,!0),E.addEventListener("progress",h)),c&&E.upload&&([m,w]=Li(c),E.upload.addEventListener("progress",m),E.upload.addEventListener("loadend",w)),(r.cancelToken||r.signal)&&(f=k=>{E&&(o(!k||k.type?new ni(null,n,E):k),E.abort(),S(),E=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const V=vd(r.url);if(V&&!He.protocols.includes(V)){o(new F("Unsupported protocol "+V+":",F.ERR_BAD_REQUEST,n)),S();return}E.send(s||null)})},nu=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const i=new AbortController;let o=!1;const r=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;i.abort(u instanceof F?u:new ni(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,r(new F(`timeout of ${t}ms exceeded`,F.ETIMEDOUT))},t);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),n=null)};n.forEach(c=>c.addEventListener("abort",r,{once:!0}));const{signal:d}=i;return d.unsubscribe=()=>b.asap(a),d},iu=function*(n,t){let i=n.byteLength;if(i<t){yield n;return}let o=0,r;for(;o<i;)r=o+t,yield n.slice(o,r),o=r},ou=async function*(n,t){for await(const i of ru(n))yield*iu(i,t)},ru=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:i,value:o}=await t.read();if(i)break;yield o}}finally{await t.cancel()}},_s=(n,t,i,o)=>{const r=ou(n,t);let s=0,a,d=c=>{a||(a=!0,o&&o(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await r.next();if(u){d(),c.close();return}let m=f.byteLength;if(i){let h=s+=m;i(h)}c.enqueue(new Uint8Array(f))}catch(u){throw d(u),u}},cancel(c){return d(c),r.return()}},{highWaterMark:2})},vi=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,su=(n,t,i)=>t+2<i&&vi(n.charCodeAt(t+1))&&vi(n.charCodeAt(t+2));function au(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const i=n.slice(5,t),o=n.slice(t+1);if(/;base64/i.test(i)){let a=o.length;const d=o.length;for(let w=0;w<d;w++)if(o.charCodeAt(w)===37&&w+2<d){const y=o.charCodeAt(w+1),S=o.charCodeAt(w+2);vi(y)&&vi(S)&&(a-=2,w+=2)}let c=0,u=d-1;const f=w=>w>=2&&o.charCodeAt(w-2)===37&&o.charCodeAt(w-1)===51&&(o.charCodeAt(w)===68||o.charCodeAt(w)===100);u>=0&&(o.charCodeAt(u)===61?(c++,u--):f(u)&&(c++,u-=3)),c===1&&u>=0&&(o.charCodeAt(u)===61||f(u))&&c++;const h=Math.floor(a/4)*3-(c||0);return h>0?h:0}let s=0;for(let a=0,d=o.length;a<d;a++){const c=o.charCodeAt(a);if(c===37&&su(o,a,d))s+=1,a+=2;else if(c<128)s+=1;else if(c<2048)s+=2;else if(c>=55296&&c<=56319&&a+1<d){const u=o.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Ho="1.18.1",Fs=64*1024,{isFunction:Hi}=b,lu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,i)=>String.fromCharCode(parseInt(i,16))),Os=n=>{if(!b.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Ls=(n,...t)=>{try{return!!n(...t)}catch{return!1}},cu=n=>{const t=n.indexOf("://");let i=n;return t!==-1&&(i=i.slice(t+3)),i.includes("@")||i.includes(":")},du=n=>{const t=b.global!==void 0&&b.global!==null?b.global:globalThis,{ReadableStream:i,TextEncoder:o}=t;n=b.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,d=r?Hi(r):typeof fetch=="function",c=Hi(s),u=Hi(a);if(!d)return!1;const f=d&&Hi(i),m=d&&(typeof o=="function"?(x=>V=>x.encode(V))(new o):async x=>new Uint8Array(await new s(x).arrayBuffer())),h=c&&f&&Ls(()=>{let x=!1;const V=new s(He.origin,{body:new i,method:"POST",get duplex(){return x=!0,"half"}}),k=V.headers.has("Content-Type");return V.body!=null&&V.body.cancel(),x&&!k}),w=u&&f&&Ls(()=>b.isReadableStream(new a("").body)),y={stream:w&&(x=>x.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!y[x]&&(y[x]=(V,k)=>{let T=V&&V[x];if(T)return T.call(V);throw new F(`Response type '${x}' is not supported`,F.ERR_NOT_SUPPORT,k)})});const S=async x=>{if(x==null)return 0;if(b.isBlob(x))return x.size;if(b.isSpecCompliantForm(x))return(await new s(He.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(b.isArrayBufferView(x)||b.isArrayBuffer(x))return x.byteLength;if(b.isURLSearchParams(x)&&(x=x+""),b.isString(x))return(await m(x)).byteLength},E=async(x,V)=>{const k=b.toFiniteNumber(x.getContentLength());return k??S(V)};return async x=>{let{url:V,method:k,data:T,signal:M,cancelToken:A,timeout:Q,onDownloadProgress:se,onUploadProgress:_e,responseType:Ne,headers:Se,withCredentials:he="same-origin",fetchOptions:at,maxContentLength:$e,maxBodyLength:Pt}=zs(x);const Tt=b.isNumber($e)&&$e>-1,Ut=b.isNumber(Pt)&&Pt>-1,yt=le=>b.hasOwnProp(x,le)?x[le]:void 0;let Ct=r||fetch;Ne=Ne?(Ne+"").toLowerCase():"text";let it=nu([M,A&&A.toAbortSignal()],Q),Ce=null;const G=it&&it.unsubscribe&&(()=>{it.unsubscribe()});let je,Rt=null;const we=()=>new F("Request body larger than maxBodyLength limit",F.ERR_BAD_REQUEST,x,Ce);try{let le;const Ye=yt("auth");if(Ye){const ee=b.getSafeProp(Ye,"username")||"",Re=b.getSafeProp(Ye,"password")||"";le={username:ee,password:Re}}if(cu(V)){const ee=new URL(V,He.origin);if(!le&&(ee.username||ee.password)){const Re=Os(ee.username),lt=Os(ee.password);le={username:Re,password:lt}}(ee.username||ee.password)&&(ee.username="",ee.password="",V=ee.href)}if(le&&(Se.delete("authorization"),Se.set("Authorization","Basic "+btoa(lu((le.username||"")+":"+(le.password||""))))),Tt&&typeof V=="string"&&V.startsWith("data:")&&au(V)>$e)throw new F("maxContentLength size of "+$e+" exceeded",F.ERR_BAD_RESPONSE,x,Ce);if(Ut&&k!=="get"&&k!=="head"){const ee=await S(T);if(typeof ee=="number"&&isFinite(ee)&&(je=ee,ee>Pt))throw we()}const Xe=Ut&&(b.isReadableStream(T)||b.isStream(T)),Gn=(ee,Re,lt)=>_s(ee,Fs,ct=>{if(Ut&&ct>Pt)throw Rt=we();Re&&Re(ct)},lt);if(h&&k!=="get"&&k!=="head"&&(_e||Xe)){if(je=je??await E(Se,T),je!==0||Xe){let ee=new s(V,{method:"POST",body:T,duplex:"half"}),Re;if(b.isFormData(T)&&(Re=ee.headers.get("content-type"))&&Se.setContentType(Re),ee.body){const[lt,ct]=_e&&Ps(je,Li(Ts(_e)))||[];T=Gn(ee.body,lt,ct)}}}else if(Xe&&!c&&f&&k!=="get"&&k!=="head")T=Gn(T);else if(Xe&&c&&!h&&k!=="get"&&k!=="head")throw new F("Stream request bodies are not supported by the current fetch implementation",F.ERR_NOT_SUPPORT,x,Ce);b.isString(he)||(he=he?"include":"omit");const Je=c&&"credentials"in s.prototype;if(b.isFormData(T)){const ee=Se.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Se.delete("content-type")}Se.set("User-Agent","axios/"+Ho,!1);const qt={...at,signal:it,method:k.toUpperCase(),headers:ws(Se.normalize()),body:T,duplex:"half",credentials:Je?he:void 0};Ce=c&&new s(V,qt);let Te=await(c?Ct(Ce,at):Ct(V,qt));const wn=We.from(Te.headers);if(Tt){const ee=b.toFiniteNumber(wn.getContentLength());if(ee!=null&&ee>$e)throw new F("maxContentLength size of "+$e+" exceeded",F.ERR_BAD_RESPONSE,x,Ce)}const ke=w&&(Ne==="stream"||Ne==="response");if(w&&Te.body&&(se||Tt||ke&&G)){const ee={};["status","statusText","headers"].forEach(Dt=>{ee[Dt]=Te[Dt]});const Re=b.toFiniteNumber(wn.getContentLength()),[lt,ct]=se&&Ps(Re,Li(Ts(se),!0))||[];let bn=0;const kt=Dt=>{if(Tt&&(bn=Dt,bn>$e))throw new F("maxContentLength size of "+$e+" exceeded",F.ERR_BAD_RESPONSE,x,Ce);lt&&lt(Dt)};Te=new a(_s(Te.body,Fs,kt,()=>{ct&&ct(),G&&G()}),ee)}Ne=Ne||"text";let Ke=await y[b.findKey(y,Ne)||"text"](Te,x);if(Tt&&!w&&!ke){let ee;if(Ke!=null&&(typeof Ke.byteLength=="number"?ee=Ke.byteLength:typeof Ke.size=="number"?ee=Ke.size:typeof Ke=="string"&&(ee=typeof o=="function"?new o().encode(Ke).byteLength:Ke.length)),typeof ee=="number"&&ee>$e)throw new F("maxContentLength size of "+$e+" exceeded",F.ERR_BAD_RESPONSE,x,Ce)}return!ke&&G&&G(),await new Promise((ee,Re)=>{Ms(ee,Re,{data:Ke,headers:We.from(Te.headers),status:Te.status,statusText:Te.statusText,config:x,request:Ce})})}catch(le){if(G&&G(),it&&it.aborted&&it.reason instanceof F){const Ye=it.reason;throw Ye.config=x,Ce&&(Ye.request=Ce),le!==Ye&&Object.defineProperty(Ye,"cause",{__proto__:null,value:le,writable:!0,enumerable:!1,configurable:!0}),Ye}if(Rt)throw Ce&&!Rt.request&&(Rt.request=Ce),Rt;if(le instanceof F)throw Ce&&!le.request&&(le.request=Ce),le;if(le&&le.name==="TypeError"&&/Load failed|fetch/i.test(le.message)){const Ye=new F("Network Error",F.ERR_NETWORK,x,Ce,le&&le.response);throw Object.defineProperty(Ye,"cause",{__proto__:null,value:le.cause||le,writable:!0,enumerable:!1,configurable:!0}),Ye}throw F.from(le,le&&le.code,x,Ce,le&&le.response)}}},uu=new Map,vs=n=>{let t=n&&n.env||{};const{fetch:i,Request:o,Response:r}=t,s=[o,r,i];let a=s.length,d=a,c,u,f=uu;for(;d--;)c=s[d],u=f.get(c),u===void 0&&f.set(c,u=d?new Map:du(t)),f=u;return u};vs();const Uo={http:Id,xhr:tu,fetch:{get:vs}};b.forEach(Uo,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Hs=n=>`- ${n}`,fu=n=>b.isFunction(n)||n===null||n===!1;function mu(n,t){n=b.isArray(n)?n:[n];const{length:i}=n;let o,r;const s={};for(let a=0;a<i;a++){o=n[a];let d;if(r=o,!fu(o)&&(r=Uo[(d=String(o)).toLowerCase()],r===void 0))throw new F(`Unknown adapter '${d}'`);if(r&&(b.isFunction(r)||(r=r.get(t))))break;s[d||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let d=i?a.length>1?`since :
17
- `+a.map(Hs).join(`
18
- `):" "+Hs(a[0]):"as no adapter specified";throw new F("There is no suitable adapter to dispatch the request "+d,F.ERR_NOT_SUPPORT)}return r}const Us={getAdapter:mu,adapters:Uo};function qo(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ni(null,n)}function qs(n){return qo(n),n.headers=We.from(n.headers),n.data=vo.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Us.getAdapter(n.adapter||ti.adapter,n)(n).then(function(o){qo(n),n.response=o;try{o.data=vo.call(n,n.transformResponse,o)}finally{delete n.response}return o.headers=We.from(o.headers),o},function(o){if(!Is(o)&&(qo(n),o&&o.response)){n.response=o.response;try{o.response.data=vo.call(n,n.transformResponse,o.response)}finally{delete n.response}o.response.headers=We.from(o.response.headers)}return Promise.reject(o)})}const Ui={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Ui[n]=function(o){return typeof o===n||"a"+(t<1?"n ":" ")+n}});const js={};Ui.transitional=function(t,i,o){function r(s,a){return"[Axios v"+Ho+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,d)=>{if(t===!1)throw new F(r(a," has been removed"+(i?" in "+i:"")),F.ERR_DEPRECATED);return i&&!js[a]&&(js[a]=!0,console.warn(r(a," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(s,a,d):!0}},Ui.spelling=function(t){return(i,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function hu(n,t,i){if(typeof n!="object"||n===null)throw new F("options must be an object",F.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let r=o.length;for(;r-- >0;){const s=o[r],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const d=n[s],c=d===void 0||a(d,s,n);if(c!==!0)throw new F("option "+s+" must be "+c,F.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new F("Unknown option "+s,F.ERR_BAD_OPTION)}}const qi={assertOptions:hu,validators:Ui},Ge=qi.validators;let sn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Bs,response:new Bs}}async request(t,i){try{return await this._request(t,i)}catch(o){if(o instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=(()=>{if(!r.stack)return"";const a=r.stack.indexOf(`
19
- `);return a===-1?"":r.stack.slice(a+1)})();try{if(!o.stack)o.stack=s;else if(s){const a=s.indexOf(`
14
+ ***************************************************************************** */var hs;(function(n){(function(t){var o=typeof globalThis=="object"?globalThis:typeof ms=="object"?ms:typeof self=="object"?self:typeof this=="object"?this:d(),i=r(n);typeof o.Reflect<"u"&&(i=r(o.Reflect,i)),t(i,o),typeof o.Reflect>"u"&&(o.Reflect=n);function r(c,u){return function(f,m){Object.defineProperty(c,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 d(){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",d=typeof Object.create=="function",c={__proto__:[]}instanceof Array,u=!d&&!c,f={create:d?function(){return ko(Object.create(null))}:c?function(){return ko({__proto__:null})}:function(){return ko({})},has:u?function(N,$){return i.call(N,$)}:function(N,$){return $ in N},get:u?function(N,$){return i.call(N,$)?N[$]:void 0}:function(N,$){return N[$]}},m=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Yn(),w=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Zr(),y=typeof WeakMap=="function"?WeakMap:Jr(),S=r?Symbol.for("@reflect-metadata:registry"):void 0,B=Si(),E=Yr(B);function V(N,$,T,_){if(G(T)){if(!jt(N))throw new TypeError;if(!wn($))throw new TypeError;return he(N,$)}else{if(!jt(N))throw new TypeError;if(!we($))throw new TypeError;if(!we(_)&&!G(_)&&!qe(_))throw new TypeError;return qe(_)&&(_=void 0),T=Ke(T),lt(N,$,T,_)}}t("decorate",V);function k(N,$){function T(_,Z){if(!we(_))throw new TypeError;if(!G(Z)&&!ke(Z))throw new TypeError;yt(N,$,_,Z)}return T}t("metadata",k);function M(N,$,T,_){if(!we(T))throw new TypeError;return G(_)||(_=Ke(_)),yt(N,$,T,_)}t("defineMetadata",M);function I(N,$,T){if(!we($))throw new TypeError;return G(T)||(T=Ke(T)),$e(N,$,T)}t("hasMetadata",I);function A(N,$,T){if(!we($))throw new TypeError;return G(T)||(T=Ke(T)),It(N,$,T)}t("hasOwnMetadata",A);function Q(N,$,T){if(!we($))throw new TypeError;return G(T)||(T=Ke(T)),Mt(N,$,T)}t("getMetadata",Q);function se(N,$,T){if(!we($))throw new TypeError;return G(T)||(T=Ke(T)),vt(N,$,T)}t("getOwnMetadata",se);function _e(N,$){if(!we(N))throw new TypeError;return G($)||($=Ke($)),Ct(N,$)}t("getMetadataKeys",_e);function Ne(N,$){if(!we(N))throw new TypeError;return G($)||($=Ke($)),rt(N,$)}t("getOwnMetadataKeys",Ne);function Se(N,$,T){if(!we($))throw new TypeError;if(G(T)||(T=Ke(T)),!we($))throw new TypeError;G(T)||(T=Ke(T));var _=Sn($,T,!1);return G(_)?!1:_.OrdinaryDeleteMetadata(N,$,T)}t("deleteMetadata",Se);function he(N,$){for(var T=N.length-1;T>=0;--T){var _=N[T],Z=_($);if(!G(Z)&&!qe(Z)){if(!wn(Z))throw new TypeError;$=Z}}return $}function lt(N,$,T,_){for(var Z=N.length-1;Z>=0;--Z){var Ve=N[Z],Pe=Ve($,T,_);if(!G(Pe)&&!qe(Pe)){if(!we(Pe))throw new TypeError;_=Pe}}return _}function $e(N,$,T){var _=It(N,$,T);if(_)return!0;var Z=kt($);return qe(Z)?!1:$e(N,Z,T)}function It(N,$,T){var _=Sn($,T,!1);return G(_)?!1:Xe(_.OrdinaryHasOwnMetadata(N,$,T))}function Mt(N,$,T){var _=It(N,$,T);if(_)return vt(N,$,T);var Z=kt($);if(!qe(Z))return Mt(N,Z,T)}function vt(N,$,T){var _=Sn($,T,!1);if(!G(_))return _.OrdinaryGetOwnMetadata(N,$,T)}function yt(N,$,T,_){var Z=Sn(T,_,!0);Z.OrdinaryDefineOwnMetadata(N,$,T,_)}function Ct(N,$){var T=rt(N,$),_=kt(N);if(_===null)return T;var Z=Ct(_,$);if(Z.length<=0)return T;if(T.length<=0)return Z;for(var Ve=new w,Pe=[],ne=0,L=T;ne<L.length;ne++){var U=L[ne],v=Ve.has(U);v||(Ve.add(U),Pe.push(U))}for(var q=0,te=Z;q<te.length;q++){var U=te[q],v=Ve.has(U);v||(Ve.add(U),Pe.push(U))}return Pe}function rt(N,$){var T=Sn(N,$,!1);return T?T.OrdinaryOwnMetadataKeys(N,$):[]}function Ce(N){if(N===null)return 1;switch(typeof N){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return N===null?1:6;default:return 6}}function G(N){return N===void 0}function qe(N){return N===null}function Rt(N){return typeof N=="symbol"}function we(N){return typeof N=="object"?N!==null:typeof N=="function"}function le(N,$){switch(Ce(N)){case 0:return N;case 1:return N;case 2:return N;case 3:return N;case 4:return N;case 5:return N}var T="string",_=ee(N,s);if(_!==void 0){var Z=_.call(N,T);if(we(Z))throw new TypeError;return Z}return Ye(N)}function Ye(N,$){var T,_;{var Z=N.toString;if(Me(Z)){var _=Z.call(N);if(!we(_))return _}var T=N.valueOf;if(Me(T)){var _=T.call(N);if(!we(_))return _}}throw new TypeError}function Xe(N){return!!N}function Qn(N){return""+N}function Ke(N){var $=le(N);return Rt($)?$:Qn($)}function jt(N){return Array.isArray?Array.isArray(N):N instanceof Object?N instanceof Array:Object.prototype.toString.call(N)==="[object Array]"}function Me(N){return typeof N=="function"}function wn(N){return typeof N=="function"}function ke(N){switch(Ce(N)){case 3:return!0;case 4:return!0;default:return!1}}function et(N,$){return N===$||N!==N&&$!==$}function ee(N,$){var T=N[$];if(T!=null){if(!Me(T))throw new TypeError;return T}}function Re(N){var $=ee(N,a);if(!Me($))throw new TypeError;var T=$.call(N);if(!we(T))throw new TypeError;return T}function ct(N){return N.value}function dt(N){var $=N.next();return $.done?!1:$}function bn(N){var $=N.return;$&&$.call(N)}function kt(N){var $=Object.getPrototypeOf(N);if(typeof N!="function"||N===m||$!==m)return $;var T=N.prototype,_=T&&Object.getPrototypeOf(T);if(_==null||_===Object.prototype)return $;var Z=_.constructor;return typeof Z!="function"||Z===N?$:Z}function Dt(){var N;!G(S)&&typeof o.Reflect<"u"&&!(S in o.Reflect)&&typeof o.Reflect.defineMetadata=="function"&&(N=Xr(o.Reflect));var $,T,_,Z=new y,Ve={registerProvider:Pe,getProvider:L,setProvider:v};return Ve;function Pe(q){if(!Object.isExtensible(Ve))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case N===q:break;case G($):$=q;break;case $===q:break;case G(T):T=q;break;case T===q:break;default:_===void 0&&(_=new w),_.add(q);break}}function ne(q,te){if(!G($)){if($.isProviderFor(q,te))return $;if(!G(T)){if(T.isProviderFor(q,te))return $;if(!G(_))for(var pe=Re(_);;){var be=dt(pe);if(!be)return;var ut=ct(be);if(ut.isProviderFor(q,te))return bn(pe),ut}}}if(!G(N)&&N.isProviderFor(q,te))return N}function L(q,te){var pe=Z.get(q),be;return G(pe)||(be=pe.get(te)),G(be)&&(be=ne(q,te),G(be)||(G(pe)&&(pe=new h,Z.set(q,pe)),pe.set(te,be))),be}function U(q){if(G(q))throw new TypeError;return $===q||T===q||!G(_)&&_.has(q)}function v(q,te,pe){if(!U(pe))throw new Error("Metadata provider not registered.");var be=L(q,te);if(be!==pe){if(!G(be))return!1;var ut=Z.get(q);G(ut)&&(ut=new h,Z.set(q,ut)),ut.set(te,pe)}return!0}}function Si(){var N;return!G(S)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&(N=o.Reflect[S]),G(N)&&(N=Dt()),!G(S)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&Object.defineProperty(o.Reflect,S,{enumerable:!1,configurable:!1,writable:!1,value:N}),N}function Yr(N){var $=new y,T={isProviderFor:function(U,v){var q=$.get(U);return G(q)?!1:q.has(v)},OrdinaryDefineOwnMetadata:Pe,OrdinaryHasOwnMetadata:Z,OrdinaryGetOwnMetadata:Ve,OrdinaryOwnMetadataKeys:ne,OrdinaryDeleteMetadata:L};return B.registerProvider(T),T;function _(U,v,q){var te=$.get(U),pe=!1;if(G(te)){if(!q)return;te=new h,$.set(U,te),pe=!0}var be=te.get(v);if(G(be)){if(!q)return;if(be=new h,te.set(v,be),!N.setProvider(U,v,T))throw te.delete(v),pe&&$.delete(U),new Error("Wrong provider for target.")}return be}function Z(U,v,q){var te=_(v,q,!1);return G(te)?!1:Xe(te.has(U))}function Ve(U,v,q){var te=_(v,q,!1);if(!G(te))return te.get(U)}function Pe(U,v,q,te){var pe=_(q,te,!0);pe.set(U,v)}function ne(U,v){var q=[],te=_(U,v,!1);if(G(te))return q;for(var pe=te.keys(),be=Re(pe),ut=0;;){var Ci=dt(be);if(!Ci)return q.length=ut,q;var wt=ct(Ci);try{q[ut]=wt}catch(Kr){try{bn(be)}finally{throw Kr}}ut++}}function L(U,v,q){var te=_(v,q,!1);if(G(te)||!te.delete(U))return!1;if(te.size===0){var pe=$.get(v);G(pe)||(pe.delete(q),pe.size===0&&$.delete(pe))}return!0}}function Xr(N){var $=N.defineMetadata,T=N.hasOwnMetadata,_=N.getOwnMetadata,Z=N.getOwnMetadataKeys,Ve=N.deleteMetadata,Pe=new y,ne={isProviderFor:function(L,U){var v=Pe.get(L);return!G(v)&&v.has(U)?!0:Z(L,U).length?(G(v)&&(v=new w,Pe.set(L,v)),v.add(U),!0):!1},OrdinaryDefineOwnMetadata:$,OrdinaryHasOwnMetadata:T,OrdinaryGetOwnMetadata:_,OrdinaryOwnMetadataKeys:Z,OrdinaryDeleteMetadata:Ve};return ne}function Sn(N,$,T){var _=B.getProvider(N,$);if(!G(_))return _;if(T){if(B.setProvider(N,$,E))return E;throw new Error("Illegal state.")}}function Yn(){var N={},$=[],T=function(){function ne(L,U,v){this._index=0,this._keys=L,this._values=U,this._selector=v}return ne.prototype["@@iterator"]=function(){return this},ne.prototype[a]=function(){return this},ne.prototype.next=function(){var L=this._index;if(L>=0&&L<this._keys.length){var U=this._selector(this._keys[L],this._values[L]);return L+1>=this._keys.length?(this._index=-1,this._keys=$,this._values=$):this._index++,{value:U,done:!1}}return{value:void 0,done:!0}},ne.prototype.throw=function(L){throw this._index>=0&&(this._index=-1,this._keys=$,this._values=$),L},ne.prototype.return=function(L){return this._index>=0&&(this._index=-1,this._keys=$,this._values=$),{value:L,done:!0}},ne}(),_=function(){function ne(){this._keys=[],this._values=[],this._cacheKey=N,this._cacheIndex=-2}return Object.defineProperty(ne.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),ne.prototype.has=function(L){return this._find(L,!1)>=0},ne.prototype.get=function(L){var U=this._find(L,!1);return U>=0?this._values[U]:void 0},ne.prototype.set=function(L,U){var v=this._find(L,!0);return this._values[v]=U,this},ne.prototype.delete=function(L){var U=this._find(L,!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--,et(L,this._cacheKey)&&(this._cacheKey=N,this._cacheIndex=-2),!0}return!1},ne.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=N,this._cacheIndex=-2},ne.prototype.keys=function(){return new T(this._keys,this._values,Z)},ne.prototype.values=function(){return new T(this._keys,this._values,Ve)},ne.prototype.entries=function(){return new T(this._keys,this._values,Pe)},ne.prototype["@@iterator"]=function(){return this.entries()},ne.prototype[a]=function(){return this.entries()},ne.prototype._find=function(L,U){if(!et(this._cacheKey,L)){this._cacheIndex=-1;for(var v=0;v<this._keys.length;v++)if(et(this._keys[v],L)){this._cacheIndex=v;break}}return this._cacheIndex<0&&U&&(this._cacheIndex=this._keys.length,this._keys.push(L),this._values.push(void 0)),this._cacheIndex},ne}();return _;function Z(ne,L){return ne}function Ve(ne,L){return L}function Pe(ne,L){return[ne,L]}}function Zr(){var N=function(){function $(){this._map=new h}return Object.defineProperty($.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),$.prototype.has=function(T){return this._map.has(T)},$.prototype.add=function(T){return this._map.set(T,T),this},$.prototype.delete=function(T){return this._map.delete(T)},$.prototype.clear=function(){this._map.clear()},$.prototype.keys=function(){return this._map.keys()},$.prototype.values=function(){return this._map.keys()},$.prototype.entries=function(){return this._map.entries()},$.prototype["@@iterator"]=function(){return this.keys()},$.prototype[a]=function(){return this.keys()},$}();return N}function Jr(){var N=16,$=f.create(),T=_();return function(){function L(){this._key=_()}return L.prototype.has=function(U){var v=Z(U,!1);return v!==void 0?f.has(v,this._key):!1},L.prototype.get=function(U){var v=Z(U,!1);return v!==void 0?f.get(v,this._key):void 0},L.prototype.set=function(U,v){var q=Z(U,!0);return q[this._key]=v,this},L.prototype.delete=function(U){var v=Z(U,!1);return v!==void 0?delete v[this._key]:!1},L.prototype.clear=function(){this._key=_()},L}();function _(){var L;do L="@@WeakMap@@"+ne();while(f.has($,L));return $[L]=!0,L}function Z(L,U){if(!i.call(L,T)){if(!U)return;Object.defineProperty(L,T,{value:f.create()})}return L[T]}function Ve(L,U){for(var v=0;v<U;++v)L[v]=Math.random()*255|0;return L}function Pe(L){if(typeof Uint8Array=="function"){var U=new Uint8Array(L);return typeof crypto<"u"?crypto.getRandomValues(U):typeof msCrypto<"u"?msCrypto.getRandomValues(U):Ve(U,L),U}return Ve(new Array(L),L)}function ne(){var L=Pe(N);L[6]=L[6]&79|64,L[8]=L[8]&191|128;for(var U="",v=0;v<N;++v){var q=L[v];(v===4||v===6||v===8)&&(U+="-"),q<16&&(U+="0"),U+=q.toString(16).toLowerCase()}return U}}function ko(N){return N.__=void 0,delete N.__,N}})})(hs||(hs={}));const Le=[];for(let n=0;n<256;++n)Le.push((n+256).toString(16).slice(1));function Bc(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 Nc=new Uint8Array(16);function $c(){return crypto.getRandomValues(Nc)}function qt(n,t,o){return crypto.randomUUID?crypto.randomUUID():Vc(n)}function Vc(n,t,o){var r;n=n||{};const i=n.random??((r=n.rng)==null?void 0:r.call(n))??$c();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,Bc(i)}class He{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 Pc(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 Vi(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),Pc(n)}class ae{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()),Vi(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():ae.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(d=>i[d]===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=ae.Translit(i),a=ae.Translit(r);return i.includes(r)||s.includes(r)||i.includes(a)}static SearchIn(t,o){return ae.StringsEquals(t,o)}static SearchInFields(t,o){let i=!1;for(let r=0;r<o.length;r++)if(ae.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(ae.GetVariants(o).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const o=ae.Translit(t);return[t,ae.Capitalize(t),t.toLowerCase(),t.toUpperCase(),o,ae.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 Zt=class Zt{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){Zt.RemoveFromClass(t,o,i)}static RemoveFromClassById(t,o,i){if(!t)return;const r=o.findIndex(s=>s.id===t);if(!(r<0))return Zt.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 Zt.BuildClass(i),i.id=He.UUID(),i}static ExistsWithId(t,o){return t.some(i=>i.id===o)}static DeepMap(t){return o=>Array.isArray(o)?o.map(Zt.DeepMap(t)):Object(o)===o?Object.fromEntries(Object.entries(o).map(([i,r])=>[i,Zt.DeepMap(t)(r)])):t(o)}static DeepTrim(t){return this.DeepMap(ae.TrimText)(t)}};l(Zt,"GetClassConstructor",t=>(o,i)=>{const r=Reflect.getMetadata(`property:${i}`,o)||{};r[i]=t,Reflect.defineMetadata(i,r,o)});let H=Zt;class en{constructor(t){l(this,"id");l(this,"address");l(this,"description");l(this,"contactId");H.BuildClass(this,t)}static Create(){const t=new en;return t.id=He.UUID(),t}}class Pi{static Setup(t="http://localhost",o="9000",i="api"){this.staticUrl=ae.BuildSafeUrl(t,o,i),this.staticUrl=Vi(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}l(Pi,"staticUrl","");class Ze{constructor(t){l(this,"name","");l(this,"url","");l(this,"src","");l(this,"raw");l(this,"blob");l(this,"file");l(this,"type","");l(this,"id");l(this,"originalName","");l(this,"fileSystemPath","");l(this,"itemId");l(this,"itemOneId");l(this,"description","");l(this,"order",0);H.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${Pi.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:kn&&kn.tagName.toUpperCase()==="SCRIPT"&&kn.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,o){const i=new Ze;return i.id=o??He.UUID(),i.originalName=t.name,i.file=t.blob,i.fileSystemPath=He.UUID(),i}setFile(t){this.id||(this.id=He.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=He.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:kn&&kn.tagName.toUpperCase()==="SCRIPT"&&kn.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 ps{constructor(t){l(this,"id");l(this,"name","");l(this,"surname","");l(this,"patronymic","");l(this,"isMale",!0);l(this,"dateBirth",new Date);l(this,"contactId");l(this,"slug","");l(this,"postIndex","");l(this,"address","");l(this,"editNameMode",!1);H.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=ae.Capitalize(this.name),this.surname=ae.Capitalize(this.surname),this.patronymic=ae.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 tn{constructor(t){l(this,"id");l(this,"number");l(this,"description");l(this,"contactId");H.BuildClass(this,t)}static Create(){const t=new tn;return t.id=He.UUID(),t}}class Mo{constructor(t){l(this,"id");l(this,"address");l(this,"description");H.BuildClass(this,t)}}class Ro{constructor(t){l(this,"id");l(this,"login","");l(this,"email","");l(this,"password","");H.BuildClass(this,t)}static Create(){const t=new Ro;return t.id=He.UUID(),t}}class Ti{constructor(t){l(this,"id");l(this,"address");l(this,"description");H.BuildClass(this,t)}}let Tc=(Ut=class{},l(Ut,"Phone",tn),l(Ut,"FileInfo",Ze),l(Ut,"Website",Ti),l(Ut,"Email",en),l(Ut,"Human",ps),l(Ut,"PostAddress",Mo),l(Ut,"UserAccount",Ro),Ut);var xe=(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))(xe||{});class Do{constructor(t){l(this,"field","");l(this,"operator",xe.Eq);l(this,"value","");H.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,o){return new Do({operator:o,field:t})}eq(t){return this.field===t.field&&this.operator===t.operator}isUnary(){return this.operator===xe.Eq||this.operator===xe.Gt||this.operator===xe.Lt}isBetween(){return this.operator===xe.Btw}isSet(){return this.operator===xe.In}}class Ii{constructor(t){l(this,"model","");l(this,"field","");l(this,"value","");l(this,"wheres",[]);H.BuildClass(this,t)}static Create(t){const o=new Ii;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=Do.Create(t,o);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(o=>o.eq(t))}}let gs=class ec{constructor(t){l(this,"id");l(this,"model","");l(this,"wheres",[]);l(this,"joins",[]);H.BuildClass(this,t)}static Create(t){const o=new ec;return o.model=t.GetClassName(),o}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Do.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=Ii.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 At{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 ze=(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))(ze||{}),Ic=Object.defineProperty,Mc=(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&&Ic(t,o,r),r};const ys=class Bo{constructor(t){l(this,"id");l(this,"model","");l(this,"label","");l(this,"col","");l(this,"operator",xe.Eq);l(this,"date1");l(this,"date2");l(this,"value1","");l(this,"boolean",!1);l(this,"number",0);l(this,"type",ze.String);l(this,"set",[]);l(this,"isSet",!1);l(this,"joinTable","");l(this,"joinTableModel","");l(this,"joinTableFk","");l(this,"joinTablePk","");l(this,"joinTableId","");l(this,"joinTableIdCol","");H.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===ze.Join){const o=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===xe.In?o&&At.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===ze.Boolean?this.boolean===(t==null?void 0:t.boolean):this.type===ze.String?this.value1===(t==null?void 0:t.value1):this.type===ze.Join&&this.set.length?At.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===ze.Boolean?`"boolean":${this.boolean}`:"",d=this.type===ze.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",c=this.type===ze.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===ze.Number?`"number":${this.number}`:"",f=this.type===ze.Set||this.operator===xe.In?`"set":${JSON.stringify(this.set)}`:"",m=this.type===ze.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,o,i,r,s,a,d,c,u,f,m].filter(h=>h!=="").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===xe.Eq||this.operator===xe.Gt||this.operator===xe.Lt}isBetweenFilter(){return this.operator===xe.Btw}isSetFilter(){return this.operator===xe.In}static Create(t,o,i){const r=new Bo;return r.model=t.GetClassName(),r.col=o??"",r.type=i,r.type===ze.Number&&(r.value1="0"),r.type===ze.String&&(r.value1=""),r.type===ze.Boolean&&(r.value1="false",r.operator=xe.Eq),r}static CreateFilterModelWithJoin(t,o,i,r,s,a,d,c){const u=new Bo;return u.id=qt(),u.joinTable=i,u.joinTablePk=r,u.joinTableFk=s,u.col=o,u.type=a,d&&(u.joinTableId=d),c&&(u.joinTableIdCol=c),u}static CreateFilterModelWithJoinV2(t,o,i,r,s,a,d){const c=new Bo;return c.model=t,c.joinTableModel=i,c.joinTablePk=r,c.joinTableFk=s,c.col=o,c.type=ze.Join,a&&(c.joinTableId=a),d&&(c.joinTableIdCol=d),c}static OnlyIfSecondModelExists(t,o){const i=new Bo;return i.id=qt(),i.model=ae.ToCamelCase(t.GetClassName()),i.joinTableModel=ae.ToCamelCase(o.GetClassName()),i.type=ze.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=xe.Eq;return}this.setDate2(o),this.operator=xe.Btw}};Mc([H.GetClassConstructor(String)],ys.prototype,"set");let Mi=ys;class Rc{constructor(){l(this,"operation",xe.Lt);l(this,"column","");l(this,"value");l(this,"initial",!0);l(this,"tableName","");l(this,"version","");l(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(d=>d!=="").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 zo{constructor(t){l(this,"page",0);l(this,"rowsPerPage",25);l(this,"rowsNumber",0);l(this,"cursor",new Rc);l(this,"cursorMode",!1);l(this,"append",!1);l(this,"allLoaded",!1);l(this,"version","");H.BuildClass(this,t)}setLoadMore(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=xe.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=xe.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,H.BuildClass(this)}}var mt=(n=>(n.Asc="asc",n.Desc="desc",n))(mt||{});class Ao{constructor(t){l(this,"model","");l(this,"col","");l(this,"order");l(this,"label","");l(this,"default",!1);l(this,"selected",!1);H.BuildClass(this,t)}static Create(t,o,i=mt.Asc,r,s){const a=new Ao;return a.model=t.GetClassName(),a.col=o??"",a.order=i??mt.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===mt.Asc}isDesc(){return this.order===mt.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=mt.Asc}desc(){this.order=mt.Desc}}class _o{constructor(){l(this,"model","");l(this,"cols",[]);l(this,"models",[])}static Create(t,o){const i=new _o;return i.model=t.GetClassName(),i.cols=o,i}}var Dc=Object.defineProperty,Zn=(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&&Dc(t,o,r),r};const Nn=(it=class{constructor(t){l(this,"id");l(this,"f",[]);l(this,"f2",[]);l(this,"s",[]);l(this,"p",new zo);l(this,"t",new _o);H.BuildClass(this,t)}static Get(){return this.instance||(this.instance=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 At.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));H.RemoveFromClassByIndex(o,this.f)}reset(){this.f=[],this.s=[],this.p=new zo}resetF(){this.f=[]}},l(it,"instance"),it);Zn([H.GetClassConstructor(Mi)],Nn.prototype,"f"),Zn([H.GetClassConstructor(gs)],Nn.prototype,"f2"),Zn([H.GetClassConstructor(Ao)],Nn.prototype,"s"),Zn([H.GetClassConstructor(zo)],Nn.prototype,"p"),Zn([H.GetClassConstructor(_o)],Nn.prototype,"t");let _t=Nn,zc=(Gn=class{},l(Gn,"SortModel",Ao),l(Gn,"FilterModel",Mi),l(Gn,"FilterModelV2",gs),l(Gn,"FTSP",_t),Gn);function ws(n,t){return function(){return n.apply(t,arguments)}}const{toString:Ac}=Object.prototype,{getPrototypeOf:$n}=Object,{iterator:Jn,toStringTag:bs}=Symbol,Fo=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),Kn=(n,t)=>{let o=n;const i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),Fo(o,t))return!0;o=$n(o)}return!1},_c=(n,t)=>n!=null&&Kn(n,t)?n[t]:void 0,Ri=(n=>t=>{const o=Ac.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),bt=n=>(n=n.toLowerCase(),t=>Ri(t)===n),Oo=n=>t=>typeof t===n,{isArray:nn}=Array,Vn=Oo("undefined");function Pn(n){return n!==null&&!Vn(n)&&n.constructor!==null&&!Vn(n.constructor)&&tt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Ss=bt("ArrayBuffer");function Fc(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Ss(n.buffer),t}const Oc=Oo("string"),tt=Oo("function"),Cs=Oo("number"),Tn=n=>n!==null&&typeof n=="object",Lc=n=>n===!0||n===!1,Lo=n=>{if(!Tn(n))return!1;const t=$n(n);return(t===null||t===Object.prototype||$n(t)===null)&&!Kn(n,bs)&&!Kn(n,Jn)},Hc=n=>{if(!Tn(n)||Pn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Uc=bt("Date"),vc=bt("File"),jc=n=>!!(n&&typeof n.uri<"u"),qc=n=>n&&typeof n.getParts<"u",Wc=bt("Blob"),Gc=bt("FileList"),Qc=n=>Tn(n)&&tt(n.pipe);function Yc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ks=Yc(),xs=typeof ks.FormData<"u"?ks.FormData:void 0,Xc=n=>{if(!n)return!1;if(xs&&n instanceof xs)return!0;const t=$n(n);if(!t||t===Object.prototype||!tt(n.append))return!1;const o=Ri(n);return o==="formdata"||o==="object"&&tt(n.toString)&&n.toString()==="[object FormData]"},Zc=bt("URLSearchParams"),[Jc,Kc,ed,td]=["ReadableStream","Request","Response","Headers"].map(bt),nd=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function eo(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),nn(n))for(i=0,r=n.length;i<r;i++)t.call(null,n[i],i,n);else{if(Pn(n))return;const s=o?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let d;for(i=0;i<a;i++)d=s[i],t.call(null,n[d],d,n)}}function Es(n,t){if(Pn(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 on=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bs=n=>!Vn(n)&&n!==on;function Di(...n){const{caseless:t,skipUndefined:o}=Bs(this)&&this||{},i={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const d=t&&typeof a=="string"&&Es(i,a)||a,c=Fo(i,d)?i[d]:void 0;Lo(c)&&Lo(s)?i[d]=Di(c,s):Lo(s)?i[d]=Di({},s):nn(s)?i[d]=s.slice():(!o||!Vn(s))&&(i[d]=s)};for(let s=0,a=n.length;s<a;s++){const d=n[s];if(!d||Pn(d)||(eo(d,r),typeof d!="object"||nn(d)))continue;const c=Object.getOwnPropertySymbols(d);for(let u=0;u<c.length;u++){const f=c[u];hd.call(d,f)&&r(d[f],f)}}return i}const od=(n,t,o,{allOwnKeys:i}={})=>(eo(t,(r,s)=>{o&&tt(r)?Object.defineProperty(n,s,{__proto__:null,value:ws(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),id=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),rd=(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)},sd=(n,t,o,i)=>{let r,s,a;const d={};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))&&!d[a]&&(t[a]=n[a],d[a]=!0);n=o!==!1&&$n(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},ad=(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},ld=n=>{if(!n)return null;if(nn(n))return n;let t=n.length;if(!Cs(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},cd=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&$n(Uint8Array)),dd=(n,t)=>{const i=(n&&n[Jn]).call(n);let r;for(;(r=i.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},ud=(n,t)=>{let o;const i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},fd=bt("HTMLFormElement"),md=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,r){return i.toUpperCase()+r}),{propertyIsEnumerable:hd}=Object.prototype,pd=bt("RegExp"),Ns=(n,t)=>{const o=Object.getOwnPropertyDescriptors(n),i={};eo(o,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(i[s]=a||r)}),Object.defineProperties(n,i)},gd=n=>{Ns(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+"'")})}})},yd=(n,t)=>{const o={},i=r=>{r.forEach(s=>{o[s]=!0})};return nn(n)?i(n):i(String(n).split(t)),o},wd=()=>{},bd=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Sd(n){return!!(n&&tt(n.append)&&n[bs]==="FormData"&&n[Jn])}const Cd=n=>{const t=new WeakSet,o=i=>{if(Tn(i)){if(t.has(i))return;if(Pn(i))return i;if(!("toJSON"in i)){t.add(i);const r=nn(i)?[]:{};return eo(i,(s,a)=>{const d=o(s);!Vn(d)&&(r[a]=d)}),t.delete(i),r}}return i};return o(n)},kd=bt("AsyncFunction"),xd=n=>n&&(Tn(n)||tt(n))&&tt(n.then)&&tt(n.catch),$s=((n,t)=>n?setImmediate:t?((o,i)=>(on.addEventListener("message",({source:r,data:s})=>{r===on&&s===o&&i.length&&i.shift()()},!1),r=>{i.push(r),on.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",tt(on.postMessage)),Ed=typeof queueMicrotask<"u"?queueMicrotask.bind(on):typeof process<"u"&&process.nextTick||$s,Vs=n=>n!=null&&tt(n[Jn]),b={isArray:nn,isArrayBuffer:Ss,isBuffer:Pn,isFormData:Xc,isArrayBufferView:Fc,isString:Oc,isNumber:Cs,isBoolean:Lc,isObject:Tn,isPlainObject:Lo,isEmptyObject:Hc,isReadableStream:Jc,isRequest:Kc,isResponse:ed,isHeaders:td,isUndefined:Vn,isDate:Uc,isFile:vc,isReactNativeBlob:jc,isReactNative:qc,isBlob:Wc,isRegExp:pd,isFunction:tt,isStream:Qc,isURLSearchParams:Zc,isTypedArray:cd,isFileList:Gc,forEach:eo,merge:Di,extend:od,trim:nd,stripBOM:id,inherits:rd,toFlatObject:sd,kindOf:Ri,kindOfTest:bt,endsWith:ad,toArray:ld,forEachEntry:dd,matchAll:ud,isHTMLForm:fd,hasOwnProperty:Fo,hasOwnProp:Fo,hasOwnInPrototypeChain:Kn,getSafeProp:_c,reduceDescriptors:Ns,freezeMethods:gd,toObjectSet:yd,toCamelCase:md,noop:wd,toFiniteNumber:bd,findKey:Es,global:on,isContextDefined:Bs,isSpecCompliantForm:Sd,toJSONObject:Cd,isAsyncFn:kd,isThenable:xd,setImmediate:$s,asap:Ed,isIterable:Vs,isSafeIterable:n=>n!=null&&Kn(n,Jn)&&Vs(n)},Bd=b.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"]),Nd=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]&&Bd[o])&&(o==="set-cookie"?t[o]?t[o].push(i):t[o]=[i]:t[o]=t[o]?t[o]+", "+i:i)}),t};function $d(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 Vd=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Pd=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function zi(n,t){return b.isArray(n)?n.map(o=>zi(o,t)):$d(String(n).replace(t,""))}const Td=n=>zi(n,Vd),Id=n=>zi(n,Pd);function Ps(n){const t=Object.create(null);return b.forEach(n.toJSON(),(o,i)=>{t[i]=Id(o)}),t}const Ts=Symbol("internals");function to(n){return n&&String(n).trim().toLowerCase()}function Ho(n){return n===!1||n==null?n:b.isArray(n)?n.map(Ho):Td(String(n))}function Md(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 Rd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Ai(n,t,o,i,r){if(b.isFunction(i))return i.call(this,t,o);if(r&&(t=o),!!b.isString(t)){if(b.isString(i))return t.indexOf(i)!==-1;if(b.isRegExp(i))return i.test(t)}}function Dd(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,i)=>o.toUpperCase()+i)}function zd(n,t){const o=b.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 We=class{constructor(t){t&&this.set(t)}set(t,o,i){const r=this;function s(d,c,u){const f=to(c);if(!f)return;const m=b.findKey(r,f);(!m||r[m]===void 0||u===!0||u===void 0&&r[m]!==!1)&&(r[m||c]=Ho(d))}const a=(d,c)=>b.forEach(d,(u,f)=>s(u,f,c));if(b.isPlainObject(t)||t instanceof this.constructor)a(t,o);else if(b.isString(t)&&(t=t.trim())&&!Rd(t))a(Nd(t),o);else if(b.isObject(t)&&b.isSafeIterable(t)){let d=Object.create(null),c,u;for(const f of t){if(!b.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],b.hasOwnProp(d,u)?(c=d[u],d[u]=b.isArray(c)?[...c,f[1]]:[c,f[1]]):d[u]=f[1]}a(d,o)}else t!=null&&s(o,t,i);return this}get(t,o){if(t=to(t),t){const i=b.findKey(this,t);if(i){const r=this[i];if(!o)return r;if(o===!0)return Md(r);if(b.isFunction(o))return o.call(this,r,i);if(b.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=to(t),t){const i=b.findKey(this,t);return!!(i&&this[i]!==void 0&&(!o||Ai(this,this[i],i,o)))}return!1}delete(t,o){const i=this;let r=!1;function s(a){if(a=to(a),a){const d=b.findKey(i,a);d&&(!o||Ai(i,i[d],d,o))&&(delete i[d],r=!0)}}return b.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||Ai(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const o=this,i={};return b.forEach(this,(r,s)=>{const a=b.findKey(i,s);if(a){o[a]=Ho(r),delete o[s];return}const d=t?Dd(s):String(s).trim();d!==s&&delete o[s],o[d]=Ho(r),i[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return b.forEach(this,(i,r)=>{i!=null&&i!==!1&&(o[r]=t&&b.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[Ts]=this[Ts]={accessors:{}}).accessors,r=this.prototype;function s(a){const d=to(a);i[d]||(zd(r,a),i[d]=!0)}return b.isArray(t)?t.forEach(s):s(t),this}};We.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),b.reduceDescriptors(We.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}}),b.freezeMethods(We);const Ad="[REDACTED ****]";function _d(n){if(b.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(b.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Fd(n,t){const o=new Set(t.map(s=>String(s).toLowerCase())),i=[],r=s=>{if(s===null||typeof s!="object"||b.isBuffer(s))return s;if(i.indexOf(s)!==-1)return;s instanceof We&&(s=s.toJSON()),i.push(s);let a;if(b.isArray(s))a=[],s.forEach((d,c)=>{const u=r(d);b.isUndefined(u)||(a[c]=u)});else{if(!b.isPlainObject(s)&&_d(s))return i.pop(),s;a=Object.create(null);for(const[d,c]of Object.entries(s)){const u=o.has(d.toLowerCase())?Ad:r(c);b.isUndefined(u)||(a[d]=u)}}return i.pop(),a};return r(n)}let O=class tc extends Error{static from(t,o,i,r,s,a){const d=new tc(t.message,o||t.code,i,r,s);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),a&&Object.assign(d,a),d}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&&b.hasOwnProp(t,"redact")?t.redact:void 0,i=b.isArray(o)&&o.length>0?Fd(t,o):b.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}}};O.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",O.ERR_BAD_OPTION="ERR_BAD_OPTION",O.ECONNABORTED="ECONNABORTED",O.ETIMEDOUT="ETIMEDOUT",O.ECONNREFUSED="ECONNREFUSED",O.ERR_NETWORK="ERR_NETWORK",O.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",O.ERR_DEPRECATED="ERR_DEPRECATED",O.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",O.ERR_BAD_REQUEST="ERR_BAD_REQUEST",O.ERR_CANCELED="ERR_CANCELED",O.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",O.ERR_INVALID_URL="ERR_INVALID_URL",O.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Od=null,Is=100;function _i(n){return b.isPlainObject(n)||b.isArray(n)}function Ms(n){return b.endsWith(n,"[]")?n.slice(0,-2):n}function Fi(n,t,o){return n?n.concat(t).map(function(r,s){return r=Ms(r),!o&&s?"["+r+"]":r}).join(o?".":""):t}function Ld(n){return b.isArray(n)&&!n.some(_i)}const Hd=b.toFlatObject(b,{},null,function(t){return/^is[A-Z]/.test(t)});function Uo(n,t,o){if(!b.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,o=b.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(V,k){return!b.isUndefined(k[V])});const i=o.metaTokens,r=o.visitor||y,s=o.dots,a=o.indexes,d=o.Blob||typeof Blob<"u"&&Blob,c=o.maxDepth===void 0?Is:o.maxDepth,u=d&&b.isSpecCompliantForm(t),f=[];if(!b.isFunction(r))throw new TypeError("visitor must be a function");function m(E){if(E===null)return"";if(b.isDate(E))return E.toISOString();if(b.isBoolean(E))return E.toString();if(!u&&b.isBlob(E))throw new O("Blob is not supported. Use a Buffer instead.");if(b.isArrayBuffer(E)||b.isTypedArray(E)){if(u&&typeof d=="function")return new d([E]);if(typeof Buffer<"u")return Buffer.from(E);throw new O("Blob is not supported. Use a Buffer instead.",O.ERR_NOT_SUPPORT)}return E}function h(E){if(E>c)throw new O("Object is too deeply nested ("+E+" levels). Max depth: "+c,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(E,V){if(c===1/0)return JSON.stringify(E);const k=[];return JSON.stringify(E,function(I,A){if(!b.isObject(A))return A;for(;k.length&&k[k.length-1]!==this;)k.pop();return k.push(A),h(V+k.length-1),A})}function y(E,V,k){let M=E;if(b.isReactNative(t)&&b.isReactNativeBlob(E))return t.append(Fi(k,V,s),m(E)),!1;if(E&&!k&&typeof E=="object"){if(b.endsWith(V,"{}"))V=i?V:V.slice(0,-2),E=w(E,1);else if(b.isArray(E)&&Ld(E)||(b.isFileList(E)||b.endsWith(V,"[]"))&&(M=b.toArray(E)))return V=Ms(V),M.forEach(function(A,Q){!(b.isUndefined(A)||A===null)&&t.append(a===!0?Fi([V],Q,s):a===null?V:V+"[]",m(A))}),!1}return _i(E)?!0:(t.append(Fi(k,V,s),m(E)),!1)}const S=Object.assign(Hd,{defaultVisitor:y,convertValue:m,isVisitable:_i});function B(E,V,k=0){if(!b.isUndefined(E)){if(h(k),f.indexOf(E)!==-1)throw new Error("Circular reference detected in "+V.join("."));f.push(E),b.forEach(E,function(I,A){(!(b.isUndefined(I)||I===null)&&r.call(t,I,b.isString(A)?A.trim():A,V,S))===!0&&B(I,V?V.concat(A):[A],k+1)}),f.pop()}}if(!b.isObject(n))throw new TypeError("data must be an object");return B(n),t}function Rs(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function Oi(n,t){this._pairs=[],n&&Uo(n,this,t)}const Ds=Oi.prototype;Ds.append=function(t,o){this._pairs.push([t,o])},Ds.toString=function(t){const o=t?i=>t.call(this,i,Rs):Rs;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};function Ud(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function zs(n,t,o){if(!t)return n;n=n||"";const i=b.isFunction(o)?{serialize:o}:o,r=b.getSafeProp(i,"encode")||Ud,s=b.getSafeProp(i,"serialize");let a;if(s?a=s(t,i):a=b.isURLSearchParams(t)?t.toString():new Oi(t,i).toString(r),a){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class As{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){b.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Li={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},vd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Oi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Hi=typeof window<"u"&&typeof document<"u",Ui=typeof navigator=="object"&&navigator||void 0,jd=Hi&&(!Ui||["ReactNative","NativeScript","NS"].indexOf(Ui.product)<0),qd=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wd=Hi&&window.location.href||"http://localhost",Ue={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hi,hasStandardBrowserEnv:jd,hasStandardBrowserWebWorkerEnv:qd,navigator:Ui,origin:Wd},Symbol.toStringTag,{value:"Module"})),...vd};function Gd(n,t){return Uo(n,new Ue.classes.URLSearchParams,{visitor:function(o,i,r,s){return Ue.isNode&&b.isBuffer(o)?(this.append(i,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const _s=Is;function Fs(n){if(n>_s)throw new O("FormData field is too deeply nested ("+n+" levels). Max depth: "+_s,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Qd(n){const t=[],o=/\w+|\[(\w*)]/g;let i;for(;(i=o.exec(n))!==null;)Fs(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function Yd(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 Os(n){function t(o,i,r,s){Fs(s);let a=o[s++];if(a==="__proto__")return!0;const d=Number.isFinite(+a),c=s>=o.length;return a=!a&&b.isArray(r)?r.length:a,c?(b.hasOwnProp(r,a)?r[a]=b.isArray(r[a])?r[a].concat(i):[r[a],i]:r[a]=i,!d):((!b.hasOwnProp(r,a)||!b.isObject(r[a]))&&(r[a]=[]),t(o,i,r[a],s)&&b.isArray(r[a])&&(r[a]=Yd(r[a])),!d)}if(b.isFormData(n)&&b.isFunction(n.entries)){const o={};return b.forEachEntry(n,(i,r)=>{t(Qd(i),r,o,0)}),o}return null}const In=(n,t)=>n!=null&&b.hasOwnProp(n,t)?n[t]:void 0;function Xd(n,t,o){if(b.isString(n))try{return(t||JSON.parse)(n),b.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}const no={transitional:Li,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const i=o.getContentType()||"",r=i.indexOf("application/json")>-1,s=b.isObject(t);if(s&&b.isHTMLForm(t)&&(t=new FormData(t)),b.isFormData(t))return r?JSON.stringify(Os(t)):t;if(b.isArrayBuffer(t)||b.isBuffer(t)||b.isStream(t)||b.isFile(t)||b.isBlob(t)||b.isReadableStream(t))return t;if(b.isArrayBufferView(t))return t.buffer;if(b.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(s){const c=In(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return Gd(t,c).toString();if((d=b.isFileList(t))||i.indexOf("multipart/form-data")>-1){const u=In(this,"env"),f=u&&u.FormData;return Uo(d?{"files[]":t}:t,f&&new f,c)}}return s||r?(o.setContentType("application/json",!1),Xd(t)):t}],transformResponse:[function(t){const o=In(this,"transitional")||no.transitional,i=o&&o.forcedJSONParsing,r=In(this,"responseType"),s=r==="json";if(b.isResponse(t)||b.isReadableStream(t))return t;if(t&&b.isString(t)&&(i&&!r||s)){const d=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t,In(this,"parseReviver"))}catch(c){if(d)throw c.name==="SyntaxError"?O.from(c,O.ERR_BAD_RESPONSE,this,null,In(this,"response")):c}}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}}};b.forEach(["delete","get","head","post","put","patch","query"],n=>{no.headers[n]={}});function vi(n,t){const o=this||no,i=t||o,r=We.from(i.headers);let s=i.data;return b.forEach(n,function(d){s=d.call(o,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Ls(n){return!!(n&&n.__CANCEL__)}let oo=class extends O{constructor(t,o,i){super(t??"canceled",O.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}};function Hs(n,t,o){const i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):t(new O("Request failed with status code "+o.status,o.status>=400&&o.status<500?O.ERR_BAD_REQUEST:O.ERR_BAD_RESPONSE,o.config,o.request,o))}function Zd(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Jd(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(c){const u=Date.now(),f=i[s];a||(a=u),o[r]=c,i[r]=u;let m=s,h=0;for(;m!==r;)h+=o[m++],m=m%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<t)return;const w=f&&u-f;return w?Math.round(h*1e3/w):void 0}}function Kd(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 vo=(n,t,o=3)=>{let i=0;const r=Jd(50,250);return Kd(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,d=s.lengthComputable?s.total:void 0,c=d!=null?Math.min(a,d):a,u=Math.max(0,c-i),f=r(u);i=Math.max(i,c);const m={loaded:c,total:d,progress:d?c/d:void 0,bytes:u,rate:f||void 0,estimated:f&&d?(d-c)/f:void 0,event:s,lengthComputable:d!=null,[t?"download":"upload"]:!0};n(m)},o)},Us=(n,t)=>{const o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},vs=n=>(...t)=>b.asap(()=>n(...t)),eu=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,tu=Ue.hasStandardBrowserEnv?{write(n,t,o,i,r,s,a){if(typeof document>"u")return;const d=[`${n}=${encodeURIComponent(t)}`];b.isNumber(o)&&d.push(`expires=${new Date(o).toUTCString()}`),b.isString(i)&&d.push(`path=${i}`),b.isString(r)&&d.push(`domain=${r}`),s===!0&&d.push("secure"),b.isString(a)&&d.push(`SameSite=${a}`),document.cookie=d.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 nu(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function ou(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const iu=/^https?:(?!\/\/)/i,ru=/[\t\n\r]/g;function su(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function au(n){return su(n).replace(ru,"")}function js(n,t){if(typeof n=="string"&&iu.test(au(n)))throw new O('Invalid URL: missing "//" after protocol',O.ERR_INVALID_URL,t)}function qs(n,t,o,i){js(t,i);let r=!nu(t);return n&&(r||o===!1)?(js(n,i),ou(n,t)):t}const Ws=n=>n instanceof We?{...n}:n;function rn(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,h,w){return b.isPlainObject(f)&&b.isPlainObject(m)?b.merge.call({caseless:w},f,m):b.isPlainObject(m)?b.merge({},m):b.isArray(m)?m.slice():m}function r(f,m,h,w){if(b.isUndefined(m)){if(!b.isUndefined(f))return i(void 0,f,h,w)}else return i(f,m,h,w)}function s(f,m){if(!b.isUndefined(m))return i(void 0,m)}function a(f,m){if(b.isUndefined(m)){if(!b.isUndefined(f))return i(void 0,f)}else return i(void 0,m)}function d(f){const m=b.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!b.isUndefined(m))if(b.isPlainObject(m)){if(b.hasOwnProp(m,f))return m[f]}else return;const h=b.hasOwnProp(n,"transitional")?n.transitional:void 0;if(b.isPlainObject(h)&&b.hasOwnProp(h,f))return h[f]}function c(f,m,h){if(b.hasOwnProp(t,h))return i(f,m);if(b.hasOwnProp(n,h))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:c,headers:(f,m,h)=>r(Ws(f),Ws(m),h,!0)};return b.forEach(Object.keys({...n,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const h=b.hasOwnProp(u,m)?u[m]:r,w=b.hasOwnProp(n,m)?n[m]:void 0,y=b.hasOwnProp(t,m)?t[m]:void 0,S=h(w,y,m);b.isUndefined(S)&&h!==c||(o[m]=S)}),b.hasOwnProp(t,"validateStatus")&&b.isUndefined(t.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(b.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}const lu=["content-type","content-length"];function cu(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,r])=>{lu.includes(i.toLowerCase())&&n.set(i,r)})}const du=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function Gs(n){const t=rn({},n),o=h=>b.hasOwnProp(t,h)?t[h]:void 0,i=o("data");let r=o("withXSRFToken");const s=o("xsrfHeaderName"),a=o("xsrfCookieName");let d=o("headers");const c=o("auth"),u=o("baseURL"),f=o("allowAbsoluteUrls"),m=o("url");if(t.headers=d=We.from(d),t.url=zs(qs(u,m,f,t),o("params"),o("paramsSerializer")),c){const h=b.getSafeProp(c,"username")||"",w=b.getSafeProp(c,"password")||"";try{d.set("Authorization","Basic "+btoa(h+":"+(w?du(w):"")))}catch(y){throw O.from(y,O.ERR_BAD_OPTION_VALUE,n)}}if(b.isFormData(i)&&(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv||b.isReactNative(i)?d.setContentType(void 0):b.isFunction(i.getHeaders)&&cu(d,i.getHeaders(),o("formDataHeaderPolicy"))),Ue.hasStandardBrowserEnv&&(b.isFunction(r)&&(r=r(t)),r===!0||r==null&&eu(t.url))){const w=s&&a&&tu.read(a);w&&d.set(s,w)}return t}const uu=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(o,i){const r=Gs(n);let s=r.data;const a=We.from(r.headers).normalize();let{responseType:d,onUploadProgress:c,onDownloadProgress:u}=r,f,m,h,w,y;function S(){w&&w(),y&&y(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let B=new XMLHttpRequest;B.open(r.method.toUpperCase(),r.url,!0),B.timeout=r.timeout;function E(){if(!B)return;const k=We.from("getAllResponseHeaders"in B&&B.getAllResponseHeaders()),I={data:!d||d==="text"||d==="json"?B.responseText:B.response,status:B.status,statusText:B.statusText,headers:k,config:n,request:B};Hs(function(Q){o(Q),S()},function(Q){i(Q),S()},I),B=null}"onloadend"in B?B.onloadend=E:B.onreadystatechange=function(){!B||B.readyState!==4||B.status===0&&!(B.responseURL&&B.responseURL.startsWith("file:"))||setTimeout(E)},B.onabort=function(){B&&(i(new O("Request aborted",O.ECONNABORTED,n,B)),S(),B=null)},B.onerror=function(M){const I=M&&M.message?M.message:"Network Error",A=new O(I,O.ERR_NETWORK,n,B);A.event=M||null,i(A),S(),B=null},B.ontimeout=function(){let M=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||Li;r.timeoutErrorMessage&&(M=r.timeoutErrorMessage),i(new O(M,I.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,n,B)),S(),B=null},s===void 0&&a.setContentType(null),"setRequestHeader"in B&&b.forEach(Ps(a),function(M,I){B.setRequestHeader(I,M)}),b.isUndefined(r.withCredentials)||(B.withCredentials=!!r.withCredentials),d&&d!=="json"&&(B.responseType=r.responseType),u&&([h,y]=vo(u,!0),B.addEventListener("progress",h)),c&&B.upload&&([m,w]=vo(c),B.upload.addEventListener("progress",m),B.upload.addEventListener("loadend",w)),(r.cancelToken||r.signal)&&(f=k=>{B&&(i(!k||k.type?new oo(null,n,B):k),B.abort(),S(),B=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const V=Zd(r.url);if(V&&!Ue.protocols.includes(V)){i(new O("Unsupported protocol "+V+":",O.ERR_BAD_REQUEST,n)),S();return}B.send(s||null)})},fu=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const o=new AbortController;let i=!1;const r=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;o.abort(u instanceof O?u:new oo(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,r(new O(`timeout of ${t}ms exceeded`,O.ETIMEDOUT))},t);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),n=null)};n.forEach(c=>c.addEventListener("abort",r,{once:!0}));const{signal:d}=o;return d.unsubscribe=()=>b.asap(a),d},mu=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},hu=async function*(n,t){for await(const o of pu(n))yield*mu(o,t)},pu=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()}},Qs=(n,t,o,i)=>{const r=hu(n,t);let s=0,a,d=c=>{a||(a=!0,i&&i(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await r.next();if(u){d(),c.close();return}let m=f.byteLength;if(o){let h=s+=m;o(h)}c.enqueue(new Uint8Array(f))}catch(u){throw d(u),u}},cancel(c){return d(c),r.return()}},{highWaterMark:2})},jo=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,gu=(n,t,o)=>t+2<o&&jo(n.charCodeAt(t+1))&&jo(n.charCodeAt(t+2));function yu(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 d=i.length;for(let w=0;w<d;w++)if(i.charCodeAt(w)===37&&w+2<d){const y=i.charCodeAt(w+1),S=i.charCodeAt(w+2);jo(y)&&jo(S)&&(a-=2,w+=2)}let c=0,u=d-1;const f=w=>w>=2&&i.charCodeAt(w-2)===37&&i.charCodeAt(w-1)===51&&(i.charCodeAt(w)===68||i.charCodeAt(w)===100);u>=0&&(i.charCodeAt(u)===61?(c++,u--):f(u)&&(c++,u-=3)),c===1&&u>=0&&(i.charCodeAt(u)===61||f(u))&&c++;const h=Math.floor(a/4)*3-(c||0);return h>0?h:0}let s=0;for(let a=0,d=i.length;a<d;a++){const c=i.charCodeAt(a);if(c===37&&gu(i,a,d))s+=1,a+=2;else if(c<128)s+=1;else if(c<2048)s+=2;else if(c>=55296&&c<=56319&&a+1<d){const u=i.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const ji="1.18.1",Ys=64*1024,{isFunction:qo}=b,wu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),Xs=n=>{if(!b.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Zs=(n,...t)=>{try{return!!n(...t)}catch{return!1}},bu=n=>{const t=n.indexOf("://");let o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},Su=n=>{const t=b.global!==void 0&&b.global!==null?b.global:globalThis,{ReadableStream:o,TextEncoder:i}=t;n=b.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,d=r?qo(r):typeof fetch=="function",c=qo(s),u=qo(a);if(!d)return!1;const f=d&&qo(o),m=d&&(typeof i=="function"?(E=>V=>E.encode(V))(new i):async E=>new Uint8Array(await new s(E).arrayBuffer())),h=c&&f&&Zs(()=>{let E=!1;const V=new s(Ue.origin,{body:new o,method:"POST",get duplex(){return E=!0,"half"}}),k=V.headers.has("Content-Type");return V.body!=null&&V.body.cancel(),E&&!k}),w=u&&f&&Zs(()=>b.isReadableStream(new a("").body)),y={stream:w&&(E=>E.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!y[E]&&(y[E]=(V,k)=>{let M=V&&V[E];if(M)return M.call(V);throw new O(`Response type '${E}' is not supported`,O.ERR_NOT_SUPPORT,k)})});const S=async E=>{if(E==null)return 0;if(b.isBlob(E))return E.size;if(b.isSpecCompliantForm(E))return(await new s(Ue.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(b.isArrayBufferView(E)||b.isArrayBuffer(E))return E.byteLength;if(b.isURLSearchParams(E)&&(E=E+""),b.isString(E))return(await m(E)).byteLength},B=async(E,V)=>{const k=b.toFiniteNumber(E.getContentLength());return k??S(V)};return async E=>{let{url:V,method:k,data:M,signal:I,cancelToken:A,timeout:Q,onDownloadProgress:se,onUploadProgress:_e,responseType:Ne,headers:Se,withCredentials:he="same-origin",fetchOptions:lt,maxContentLength:$e,maxBodyLength:It}=Gs(E);const Mt=b.isNumber($e)&&$e>-1,vt=b.isNumber(It)&&It>-1,yt=le=>b.hasOwnProp(E,le)?E[le]:void 0;let Ct=r||fetch;Ne=Ne?(Ne+"").toLowerCase():"text";let rt=fu([I,A&&A.toAbortSignal()],Q),Ce=null;const G=rt&&rt.unsubscribe&&(()=>{rt.unsubscribe()});let qe,Rt=null;const we=()=>new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,E,Ce);try{let le;const Ye=yt("auth");if(Ye){const ee=b.getSafeProp(Ye,"username")||"",Re=b.getSafeProp(Ye,"password")||"";le={username:ee,password:Re}}if(bu(V)){const ee=new URL(V,Ue.origin);if(!le&&(ee.username||ee.password)){const Re=Xs(ee.username),ct=Xs(ee.password);le={username:Re,password:ct}}(ee.username||ee.password)&&(ee.username="",ee.password="",V=ee.href)}if(le&&(Se.delete("authorization"),Se.set("Authorization","Basic "+btoa(wu((le.username||"")+":"+(le.password||""))))),Mt&&typeof V=="string"&&V.startsWith("data:")&&yu(V)>$e)throw new O("maxContentLength size of "+$e+" exceeded",O.ERR_BAD_RESPONSE,E,Ce);if(vt&&k!=="get"&&k!=="head"){const ee=await S(M);if(typeof ee=="number"&&isFinite(ee)&&(qe=ee,ee>It))throw we()}const Xe=vt&&(b.isReadableStream(M)||b.isStream(M)),Qn=(ee,Re,ct)=>Qs(ee,Ys,dt=>{if(vt&&dt>It)throw Rt=we();Re&&Re(dt)},ct);if(h&&k!=="get"&&k!=="head"&&(_e||Xe)){if(qe=qe??await B(Se,M),qe!==0||Xe){let ee=new s(V,{method:"POST",body:M,duplex:"half"}),Re;if(b.isFormData(M)&&(Re=ee.headers.get("content-type"))&&Se.setContentType(Re),ee.body){const[ct,dt]=_e&&Us(qe,vo(vs(_e)))||[];M=Qn(ee.body,ct,dt)}}}else if(Xe&&!c&&f&&k!=="get"&&k!=="head")M=Qn(M);else if(Xe&&c&&!h&&k!=="get"&&k!=="head")throw new O("Stream request bodies are not supported by the current fetch implementation",O.ERR_NOT_SUPPORT,E,Ce);b.isString(he)||(he=he?"include":"omit");const Ke=c&&"credentials"in s.prototype;if(b.isFormData(M)){const ee=Se.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Se.delete("content-type")}Se.set("User-Agent","axios/"+ji,!1);const jt={...lt,signal:rt,method:k.toUpperCase(),headers:Ps(Se.normalize()),body:M,duplex:"half",credentials:Ke?he:void 0};Ce=c&&new s(V,jt);let Me=await(c?Ct(Ce,lt):Ct(V,jt));const wn=We.from(Me.headers);if(Mt){const ee=b.toFiniteNumber(wn.getContentLength());if(ee!=null&&ee>$e)throw new O("maxContentLength size of "+$e+" exceeded",O.ERR_BAD_RESPONSE,E,Ce)}const ke=w&&(Ne==="stream"||Ne==="response");if(w&&Me.body&&(se||Mt||ke&&G)){const ee={};["status","statusText","headers"].forEach(Dt=>{ee[Dt]=Me[Dt]});const Re=b.toFiniteNumber(wn.getContentLength()),[ct,dt]=se&&Us(Re,vo(vs(se),!0))||[];let bn=0;const kt=Dt=>{if(Mt&&(bn=Dt,bn>$e))throw new O("maxContentLength size of "+$e+" exceeded",O.ERR_BAD_RESPONSE,E,Ce);ct&&ct(Dt)};Me=new a(Qs(Me.body,Ys,kt,()=>{dt&&dt(),G&&G()}),ee)}Ne=Ne||"text";let et=await y[b.findKey(y,Ne)||"text"](Me,E);if(Mt&&!w&&!ke){let ee;if(et!=null&&(typeof et.byteLength=="number"?ee=et.byteLength:typeof et.size=="number"?ee=et.size:typeof et=="string"&&(ee=typeof i=="function"?new i().encode(et).byteLength:et.length)),typeof ee=="number"&&ee>$e)throw new O("maxContentLength size of "+$e+" exceeded",O.ERR_BAD_RESPONSE,E,Ce)}return!ke&&G&&G(),await new Promise((ee,Re)=>{Hs(ee,Re,{data:et,headers:We.from(Me.headers),status:Me.status,statusText:Me.statusText,config:E,request:Ce})})}catch(le){if(G&&G(),rt&&rt.aborted&&rt.reason instanceof O){const Ye=rt.reason;throw Ye.config=E,Ce&&(Ye.request=Ce),le!==Ye&&Object.defineProperty(Ye,"cause",{__proto__:null,value:le,writable:!0,enumerable:!1,configurable:!0}),Ye}if(Rt)throw Ce&&!Rt.request&&(Rt.request=Ce),Rt;if(le instanceof O)throw Ce&&!le.request&&(le.request=Ce),le;if(le&&le.name==="TypeError"&&/Load failed|fetch/i.test(le.message)){const Ye=new O("Network Error",O.ERR_NETWORK,E,Ce,le&&le.response);throw Object.defineProperty(Ye,"cause",{__proto__:null,value:le.cause||le,writable:!0,enumerable:!1,configurable:!0}),Ye}throw O.from(le,le&&le.code,E,Ce,le&&le.response)}}},Cu=new Map,Js=n=>{let t=n&&n.env||{};const{fetch:o,Request:i,Response:r}=t,s=[i,r,o];let a=s.length,d=a,c,u,f=Cu;for(;d--;)c=s[d],u=f.get(c),u===void 0&&f.set(c,u=d?new Map:Su(t)),f=u;return u};Js();const qi={http:Od,xhr:uu,fetch:{get:Js}};b.forEach(qi,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Ks=n=>`- ${n}`,ku=n=>b.isFunction(n)||n===null||n===!1;function xu(n,t){n=b.isArray(n)?n:[n];const{length:o}=n;let i,r;const s={};for(let a=0;a<o;a++){i=n[a];let d;if(r=i,!ku(i)&&(r=qi[(d=String(i)).toLowerCase()],r===void 0))throw new O(`Unknown adapter '${d}'`);if(r&&(b.isFunction(r)||(r=r.get(t))))break;s[d||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let d=o?a.length>1?`since :
17
+ `+a.map(Ks).join(`
18
+ `):" "+Ks(a[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+d,O.ERR_NOT_SUPPORT)}return r}const ea={getAdapter:xu,adapters:qi};function Wi(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new oo(null,n)}function ta(n){return Wi(n),n.headers=We.from(n.headers),n.data=vi.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),ea.getAdapter(n.adapter||no.adapter,n)(n).then(function(i){Wi(n),n.response=i;try{i.data=vi.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=We.from(i.headers),i},function(i){if(!Ls(i)&&(Wi(n),i&&i.response)){n.response=i.response;try{i.response.data=vi.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=We.from(i.response.headers)}return Promise.reject(i)})}const Wo={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Wo[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const na={};Wo.transitional=function(t,o,i){function r(s,a){return"[Axios v"+ji+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return(s,a,d)=>{if(t===!1)throw new O(r(a," has been removed"+(o?" in "+o:"")),O.ERR_DEPRECATED);return o&&!na[a]&&(na[a]=!0,console.warn(r(a," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(s,a,d):!0}},Wo.spelling=function(t){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function Eu(n,t,o){if(typeof n!="object"||n===null)throw new O("options must be an object",O.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 d=n[s],c=d===void 0||a(d,s,n);if(c!==!0)throw new O("option "+s+" must be "+c,O.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new O("Unknown option "+s,O.ERR_BAD_OPTION)}}const Go={assertOptions:Eu,validators:Wo},Ge=Go.validators;let sn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new As,response:new As}}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
+ `);return a===-1?"":r.stack.slice(a+1)})();try{if(!i.stack)i.stack=s;else if(s){const a=s.indexOf(`
20
20
  `),d=a===-1?-1:s.indexOf(`
21
- `,a+1),c=d===-1?"":s.slice(d+1);String(o.stack).endsWith(c)||(o.stack+=`
22
- `+s)}}catch{}}throw o}}_request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=rn(this.defaults,i);const{transitional:o,paramsSerializer:r,headers:s}=i;o!==void 0&&qi.assertOptions(o,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean),legacyInterceptorReqResOrdering:Ge.transitional(Ge.boolean),advertiseZstdAcceptEncoding:Ge.transitional(Ge.boolean),validateStatusUndefinedResolves:Ge.transitional(Ge.boolean)},!1),r!=null&&(b.isFunction(r)?i.paramsSerializer={serialize:r}:qi.assertOptions(r,{encode:Ge.function,serialize:Ge.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),qi.assertOptions(i,{baseUrl:Ge.spelling("baseURL"),withXsrfToken:Ge.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let a=s&&b.merge(s.common,s[i.method]);s&&b.forEach(["delete","get","head","post","put","patch","query","common"],y=>{delete s[y]}),i.headers=We.concat(a,s);const d=[];let c=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(i)===!1)return;c=c&&S.synchronous;const E=i.transitional||Fo;E&&E.legacyInterceptorReqResOrdering?d.unshift(S.fulfilled,S.rejected):d.push(S.fulfilled,S.rejected)});const u=[];this.interceptors.response.forEach(function(S){u.push(S.fulfilled,S.rejected)});let f,m=0,h;if(!c){const y=[qs.bind(this),void 0];for(y.unshift(...d),y.push(...u),h=y.length,f=Promise.resolve(i);m<h;)f=f.then(y[m++],y[m++]);return f}h=d.length;let w=i;for(;m<h;){const y=d[m++],S=d[m++];try{w=y(w)}catch(E){S.call(this,E);break}}try{f=qs.call(this,w)}catch(y){return Promise.reject(y)}for(m=0,h=u.length;m<h;)f=f.then(u[m++],u[m++]);return f}getUri(t){t=rn(this.defaults,t);const i=Ds(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Es(i,t.params,t.paramsSerializer)}};b.forEach(["delete","get","head","options"],function(t){sn.prototype[t]=function(i,o){return this.request(rn(o||{},{method:t,url:i,data:o&&b.hasOwnProp(o,"data")?o.data:void 0}))}}),b.forEach(["post","put","patch","query"],function(t){function i(o){return function(s,a,d){return this.request(rn(d||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}sn.prototype[t]=i(),t!=="query"&&(sn.prototype[t+"Form"]=i(!0))});let pu=class Wl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(s){i=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(d=>{o.subscribe(d),s=d}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},t(function(s,a,d){o.reason||(o.reason=new ni(s,a,d),i(o.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 i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const t=new AbortController,i=o=>{t.abort(o)};return this.subscribe(i),t.signal.unsubscribe=()=>this.unsubscribe(i),t.signal}static source(){let t;return{token:new Wl(function(r){t=r}),cancel:t}}};function gu(n){return function(i){return n.apply(null,i)}}function yu(n){return b.isObject(n)&&n.isAxiosError===!0}const jo={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(jo).forEach(([n,t])=>{jo[t]=n});function Ws(n){const t=new sn(n),i=as(sn.prototype.request,t);return b.extend(i,sn.prototype,t,{allOwnKeys:!0}),b.extend(i,t,null,{allOwnKeys:!0}),i.create=function(r){return Ws(rn(n,r))},i}const Be=Ws(ti);Be.Axios=sn,Be.CanceledError=ni,Be.CancelToken=pu,Be.isCancel=Is,Be.VERSION=Ho,Be.toFormData=Oi,Be.AxiosError=F,Be.Cancel=Be.CanceledError,Be.all=function(t){return Promise.all(t)},Be.spread=gu,Be.isAxiosError=yu,Be.mergeConfig=rn,Be.AxiosHeaders=We,Be.formToJSON=n=>Vs(b.isHTMLForm(n)?new FormData(n):n),Be.getAdapter=Us.getAdapter,Be.HttpStatusCode=jo,Be.default=Be;const{Axios:Ab,AxiosError:zb,CanceledError:_b,isCancel:Fb,CancelToken:Ob,VERSION:Lb,all:vb,Cancel:Hb,isAxiosError:Ub,spread:qb,toFormData:jb,AxiosHeaders:Wb,HttpStatusCode:Gb,formToJSON:Qb,getAdapter:Yb,mergeConfig:Xb,create:Zb}=Be;var ii=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(ii||{});const oi=(()=>{function n(){const c=r();return!(!c||c==="undefined")}function t(c){c.accessToken&&localStorage.setItem("access_token",c.accessToken),c.refreshToken&&localStorage.setItem("refresh_token",c.refreshToken)}function i(){const c=localStorage.getItem("user");return c?JSON.parse(c).id:""}function o(){const c=localStorage.getItem("user");if(c)return JSON.parse(c)}function r(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function d(c){if(!n())return;const u=oi.getUser();u&&(u.human=c,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:t,getAccessToken:r,getRefreshToken:s,getUserId:i,clearTokens:a,getUser:o,updateHuman:d}})();class Wo{constructor(t){l(this,"code",400);l(this,"err","");v.BuildClass(this,t)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(t,i){const o=t.config;if(t.response){if(t.response.status===401&&!o._retry)return o._retry=!0,i.defaults.headers.common.token=oi.getAccessToken(),t.config.headers.token=oi.getAccessToken(),t.config.baseURL=void 0,i.request(o);if(t.response.status>=500){if(t.response.data==="неверный логин или пароль"){Bn.Error("Неверный логин или пароль");return}Bn.Error("Ошибка на сервере, попробуйте позже")}if(t.response.status>=400&&t.response.status<500){const r=new Wo(t.response.data).getErr();r&&Bn.Error(r)}return Promise.reject(t)}}}const Tn=Be.create();Tn.interceptors.response.use(n=>n,async n=>await Wo.Handle(n,Tn));class ri{static async Get(t,i,o){return await Tn({method:ii.GET,url:t,headers:i,responseType:o})}static async Post(t,i,o,r){return i["Content-Type"]="multipart/form-data",await Tn({method:ii.POST,url:t,headers:i,responseType:o,data:r})}static async Put(t,i,o){return i["Content-Type"]="multipart/form-data",await Tn({method:ii.PUT,url:t,headers:i,data:o})}static async Delete(t,i){return await Tn({method:ii.DELETE,url:t,headers:i})}}class ji{constructor(t){l(this,"name","");v.BuildClass(this,t)}static Set(){}static Get(t,i){const o=sessionStorage.getItem(t);if(o){const r=JSON.parse(o),s=new Date,a=new Date(r.time),d=s.getTime()-a.getTime();return Math.round(d/6e4)>(i||10)?null:r.data}else return null}static async TryGet(t,i,o){let r;return r=ji.Get(t,o),r||(r=await i()),r}}var Go=(n=>(n.ContentType="Content-Type",n.Token="token",n))(Go||{}),Gs=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Gs||{});const ye=class ye{static Setup(t="http://localhost",i,o="api"){this.baseUrl=ae.BuildSafeUrl(t,i,o),this.host=t,this.apiVersion=o}static newWebSocket(t){const i=this.host.replace("http","ws")+"/ws/"+t;return new WebSocket(i)}static download(t,i){const o=ye.getDownloadFileName(t,i.headers);if(!(i.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(i.data),s=document.createElement("a");s.href=r,s.setAttribute("download",o),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(t,i){if(t)return t;const o=i["content-disposition"];if(!o)return"file";const r=o.indexOf('"')+1,s=o.lastIndexOf('"'),a=o.substring(r,s);return a||"file"}static getHeaders(t){const i=Et.Get(ut.AccessToken);return t||(t=ye.headers),i&&(t[Go.Token]=i),t??ye.headers}static returnResponse(t,i){if(i)return t!=null&&t.isBlob?ye.download(t.downloadFileName,i):i.data}static async Get(t){return ye.returnResponse(t,await ri.Get(ye.buildUrl((t==null?void 0:t.query)??""),ye.getHeaders(t==null?void 0:t.headers),ye.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return ye.returnResponse(t,await ri.Post(ye.buildUrl(t==null?void 0:t.query),ye.getHeaders(t==null?void 0:t.headers),ye.getResponseType(t.isBlob),ye.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return ye.returnResponse(t,await ri.Put(ye.buildUrl(t==null?void 0:t.query),ye.getHeaders(t==null?void 0:t.headers),ye.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return ye.returnResponse(t,await ri.Delete(ye.buildUrl(t==null?void 0:t.query),ye.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:i}=t;return new EventSource(ye.buildUrl(i))}static buildUrl(t=""){try{return No(this.baseUrl,t)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(t){return t?"blob":"json"}static createFormDataPayload(t,i){const o=new FormData;if(o.append("form",JSON.stringify(t)),i)for(const r of i)r.file&&o.append(r.id??"files",r.file,r.originalName);return o}};l(ye,"baseUrl",""),l(ye,"apiVersion","api"),l(ye,"host",""),l(ye,"headers",{[Go.ContentType]:Gs.ApplicationJson});let Ee=ye;const z=(n,t)=>{const i=n.__vccOpts||n;for(const[o,r]of t)i[o]=r;return i},wu={},bu={style:{"text-align":"center"}};function Su(n,t){return e.openBlock(),e.createElementBlock("div",bu,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const Qs=z(wu,[["render",Su]]),Cu=[{path:"/:pathMatch(.*)*",name:"NotFound",component:Qs}],gt=class gt{static Setup(t,i=""){this.router=t,this.title=i,this.ChangeDocumentTitle(),this.AddRoutes(Cu)}static Get(){return this.router}static AddRoutes(t){t.forEach(i=>{this.Get().addRoute(i)})}static async To(t){await this.Get().push(t)}static async ToHome(){}static async Replace(t){await this.Get().replace(t)}static Id(){return gt.GetStringParam("id")}static Slug(){return gt.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return gt.GetStringQueryParam("qid")}static Route(){var t;return(t=this.Get())==null?void 0:t.currentRoute.value}static RouterPushBlank(t){const i=this.Get().resolve({path:t});window.open(i==null?void 0:i.href,"_blank")}static GetPath(){var i;const t=(i=gt.Route())==null?void 0:i.path.split("/");return!t||t.length<=0?"":t[t.length-1]}static async ToAdmin(t){if(!t){await this.Get().push("/admin");return}let i=t;i[0]==="/"&&(i=t.substring(1)),await gt.To(`/admin/${i}`)}static GetStringQueryParam(t){return String(this.Route().query[t])}static GetNumberQueryParam(t){return Number(this.Route().query[t]??0)}static GetStringParam(t){var i;return(i=this.Route())==null?void 0:i.params[t]}static SetQueryParam(t,i){const o=new URL(window.location);o.searchParams.set(t,String(i)),history.replaceState(null,"",o)}static Resolve(t){return this.Get().resolve(t)}};l(gt,"router"),l(gt,"title",""),l(gt,"ChangeDocumentTitle",(t="")=>{let i=gt.Route().meta.title??t;i&&(i=" | "+i),document.title=gt.title+i});let Bt=gt;class ue{constructor(t,i){l(this,"items",e.reactive([]));l(this,"item");l(this,"options",e.reactive([]));l(this,"count",e.ref(0));l(this,"classConstructor");l(this,"url","");l(this,"searchStr",e.ref(""));this.classConstructor=t,this.item=e.reactive(new this.classConstructor),this.url=i}Set(t){Object.assign(this.item,new this.classConstructor(t))}getUrl(t){return t?`${this.url}/${t}`:this.url}async GetOptions(t="name",i="id"){const o=`${this.getUrl()}/options/${t}/${i}`;try{const r=await Ee.Get({query:o});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(t){try{let i;const o=Ee.Get;t&&t.withCache?i=await ji.TryGet(this.getUrl(),o):i=await o({query:this.getUrl()}),Array.isArray(i)?this.SetAll(i):this.SetAllWithCount(i)}catch(i){console.warn("GetAll failed:",i)}}async Get(t){try{t||(t=Bt.Id()),this.Set(await Ee.Get({query:this.getUrl(t)}))}catch(i){console.warn("Get failed:",i)}}async GetBySlug(t){try{t||(t=Bt.Slug()),this.Set(await P.H.HttpClient.Get({query:this.getUrl("by-slug/"+t)}))}catch(i){console.warn("GetBySlug failed:",i)}}async FTSP(t){var i;try{const r=((t==null?void 0:t.ftsp)??_t.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await Ee.Post(s);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(r.p.append){this.AppendToAll((i=a.data)==null?void 0:i.items);return}this.SetAllWithCount(a.data)}}catch(o){console.warn("FTSP failed:",o)}}async Create(t){try{const i=t??this.item,o={payload:i,query:this.getUrl()};return i.getFileInfos&&(o.fileInfos=i.getFileInfos()),await Ee.Post(o)}catch(i){console.warn("Create failed:",i)}}async CreateAndSet(t){const i=await this.Create(t);this.Set(i)}async CreateMany(t){if(!t)return;const i=[];t.forEach(o=>{i.push(new Promise(()=>this.Create(o)))}),Promise.all(i)}async Update(t){try{const i=t??this.item,o={query:this.getUrl(`${i.id}`),payload:i};return i.getFileInfos&&(o.fileInfos=i.getFileInfos(),o.fileInfos.forEach(r=>r.url="")),await Ee.Put(o)}catch(i){console.warn("Update failed:",i)}}async UpdateAndSet(t){const i=await this.Update(t);this.Set(i)}async UpdateAndReset(t){await this.Update(t??this.item),this.Set()}async Remove(t){if(t)try{await Ee.Delete({query:this.getUrl(`${t}`)}),this.RemoveItem(t)}catch(i){console.warn("Remove failed:",i)}}async UpdateMany(t){if(t||(t=this.items),!t)return;const i=[];t.forEach(o=>{i.push(new Promise(()=>this.Update(o)))}),Promise.all(i)}SetAll(t){this.items.splice(0,this.items.length),t&&this.items.push(...t.map(i=>new this.classConstructor(i)))}SetAllWithCount(t){this.SetAll(t.items),this.count.value=t.count}RemoveItem(t){const i=this.items.findIndex(o=>o.id===t);i<0||this.items.splice(i,1)}AppendToAll(t){if(t){if(Array.isArray(t)){const i=t.map(o=>new this.classConstructor(o));this.items.push(...i);return}this.items.push(new this.classConstructor(t))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){v.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(t){if(t){if(Array.isArray(t)){const i=t.map(o=>new this.classConstructor(o));this.items.unshift(...i);return}this.items.unshift(new this.classConstructor(t))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(t=>P.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 ku(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const xu=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class Eu{static GetRandColor(t){return zt.GetRandEL(t??xu)}}function Ys(n,t){const i=[],o=t||ft.Asc,r=o===ft.Asc?ft.Desc:ft.Asc;return Object.values(n).forEach(s=>{i.push(s(o)),i.push(s(r))}),i.length>0&&!i.some(s=>s.default)&&(i[0].default=!0),t&&i.forEach(s=>{s.default&&(s.default=s.order===t)}),i}let Bu=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",Yn.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",Vi[Yn.FiveMinutes])}startDrag(t,i){this.draggedStartTime=t,this.draggedEndTime=i,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Vi[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return zt.GenerateNumsRange(this.startHour,this.endHour)}};const Qo=n=>n===8||n===46,Nu=n=>n>46&&n<58,$u=n=>n>34&&n<41,Vu=n=>n+".",Iu=(n,t,i)=>{Qo(t)||$u(t)||(!Nu(t)||i>9)&&n.preventDefault()};function Mu(n,t){if(t>8){let i=n.substring(0,2).replace(".","1");Number(i)>31&&(i="31");let o=n.substring(3,5).replace(".","1");Number(o)>12&&(o="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=i+"."+o+"."+r}return n}function Pu(n){const t=n.keyCode;let i=n.srcElement.value;const o=i.length;Iu(n,t,o),!Qo(t)&&(o===2||o===5)&&(i=Vu(i));const r=n.srcElement.value+String.fromCharCode(n.which);if(Qo(t)){n.srcElement.value=i;return}i.length===0&&Number(r)>3&&(i="3",n.preventDefault()),i.length===1&&Number(r)>31&&(i="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(i=i.substring(0,3)+"12",n.preventDefault()),i=Mu(i,o),n.srcElement.value=i}const Tu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Ru="ru-RU";class Wt{constructor(){l(this,"locale","ru-RU")}static Format(t,i){if(!t)return"";const o={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return i&&(o.year=i.year||i.year===void 0?i.year:o.year,o.month=i.month||i.month===void 0?i.month:o.month,o.day=i.day||i.day===void 0?i.day:o.day,o.hour=i.hour??o.hour,o.minute=i.minute??o.minute),Intl.DateTimeFormat(Ru,o).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 i=t.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetPeriod(t,i,o){return`${this.Format(t,o)}-${this.Format(i,o)}`}static GetShortDayName(t){return t?Tu[t.getDay()]:""}static GetCurrentWeekPeriod(t){const i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()+1),r=new Date(i.getFullYear(),i.getMonth(),o.getDate()+7);return this.GetPeriod(o,r,t||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(t,i){const o=new Date,r=new Date,s=Wt.SplitHourTime(t),a=Wt.SplitHourTime(i);return o.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-o.getTime())/1e3/60}static HourTimeinMunutes(t){const i=Wt.SplitHourTime(t);return i[0]*60+i[1]}static SplitHourTime(t){const i=t.split(":");return[Number(i[0]),Number(i[1])]}static AddMinutesToHM(t,i){const o=new Date,r=Wt.SplitHourTime(t);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),d=s.getMinutes();return`${a}:${d}`}static GetMonthsDiff(t,i){return i.getMonth()-t.getMonth()+12*(i.getFullYear()-t.getFullYear())}static StringToDate(t){const i=t.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetDateOrToday(t){return t?t.date:new Date}static InPeriod(t,i,o){return new Date(t)>=new Date(i)&&new Date(t)<=new Date(o)}static GetDatesFromPeriod(t,i){const o=[new Date(t)];let r=t;for(;r<=i;)r=Wt.AddDays(r,1),o.push(r);return o}static AddDays(t,i){const o=new Date(t);return o.setDate(o.getDate()+i),o}static Eq(t,i){return t.getTime()===i.getTime()}}class Du{constructor(){l(this,"dragged",!1);l(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 i=t.split(".");return i[i.length-1]}}const Au=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function t(s,a){const d=localStorage.getItem(`${s}_favourite`);return d?d.split(",").includes(a):!1}function i(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d){n(s,[a]);return}const c=d.split(",");c.push(a),n(s,c)}function o(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d)return;const c=d.split(",").filter(u=>u!==a);n(s,c)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:i,removeFromFavourite:o,setFavourite:n,isFavourite:t,clearFavourite:r}})();class zu{constructor(){l(this,"list",[]);l(this,"defaultSortModel");l(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 an=new zu;function _u(){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 Fu=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{P.F.FTSP.Get().reset(),an.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:i}=_u(),o=s=>tc.onBeforeRouteLeave((a,d,c)=>{i((s||r)(),c)}),r=s=>async()=>{t.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:o,submit:r}})();function Zs(n,t){const i=[];if(n)for(let o=0;o<Math.ceil(n.length/t);o++)i[o]=n.slice(o*t,o*t+t);return i}class Yo{constructor(){l(this,"items",[]);l(this,"idx",0);l(this,"key","")}preSelect(){const t=Bt.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select(0);return}const i=this.items.findIndex(o=>o.slug===t);i>-1&&this.Select(i)}static Create(t,i){const o=new Yo;return o.key=t,o.items=i,o.items.length&&o.preSelect(),o}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 yo=class yo{static Format(t){let i=t;if(!i)t=i;else{(i[0]==="7"||i[0]==="8")&&i.length!==1&&(i=i.slice(1));const o=i.replace(/\+7|[^\d]/g,""),r=o.length;switch(!0){case r===0:t="";break;case(r===1&&i.length===1&&o==="7"):case(r===1&&i.length===1&&o==="8"):t="+7 (";break;case r<4:t=`+7 (${o}`;break;case r<7:t=`+7 (${o.slice(0,3)}) ${o.slice(3)}`;break;case r<9:t=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}`;break;default:t=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}-${o.slice(8,10)}`;break}}return t}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};l(yo,"validatePhone",(t,i,o)=>{yo.getPhoneRegExp().test(i)||!i?o():o(new Error("Пожалуйста, введите корректный номер телефона"))});let Xo=yo;class Ou{static Count(t){const i=t.filter(s=>s.rating!==0);let o=0;i.forEach(s=>o=o+s.rating);const r=o/i.length;return isNaN(r)?0:Number((o/i.length).toFixed(2))}}class Lu{static async Auth(t){t&&t()}static Dev(){}}class vu{constructor(){l(this,"startHour",9);l(this,"startHM",`${this.startHour}:00`);l(this,"endHour",19);l(this,"endHM",`${this.endHour}:00`);l(this,"timelinePxHeight",50);l(this,"timelineStep",Yn.FiveMinutes);l(this,"timelines",Vi[Yn.FiveMinutes])}periodIsCorrect(t,i){return ie.GtOrEq(t,this.startHM)&&ie.GtOrEq(this.endHM,i)}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Vi[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return zt.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(t,i,o,r){return r.filter(s=>s.id!==o).every(s=>!ie.PeriodsIntersects(t,i,s.startTime,s.endTime))}sortByStartTime(t){t.sort((i,o)=>ie.HMtoM(i.startTime)-ie.HMtoM(o.startTime))}}const Hu=-68;function Uu(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const i=document.querySelector(n),o=t??Hu;let r=0;i&&(r=i.getBoundingClientRect().top+o+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class qu{static Sort(t){t.forEach((i,o)=>i.order=o)}}class Wi{static Wait(t,i){return new Promise(o=>setTimeout(()=>o(i),t))}static WaitS(t,i){return Wi.Wait(ie.S(t),i)}static WaitM(t,i){return Wi.Wait(ie.M(t),i)}}function ju(n,t){let i=!0;return n.value.validate(o=>(o||(i=!1),i)),i}const Wu=n=>new Promise(t=>{if(document.querySelector(n))return t(document.querySelector(n));const i=new MutationObserver(()=>{document.querySelector(n)&&(i.disconnect(),t(document.querySelector(n)))});i.observe(document.body,{childList:!0,subtree:!0})});let Gu=class Gr{constructor(t){l(this,"id");l(this,"message","");l(this,"userName");l(this,"createdOn",new Date);l(this,"chatId");l(this,"type","message");v.BuildClass(this,t)}static Create(t,i,o,r){const s=new Gr;return s.id=jt(),s.chatId=t,s.message=o,s.userName=r,s}static CreatePingMessage(){const t=new Gr;return t.type="ping",t.id=jt(),t}isMessage(){return this.type==="message"||this.type===""}};const Qu="";class Yu{constructor(t="",i="",o="set"){l(this,"client");l(this,"endpoint","");l(this,"query","");l(this,"period",2e4);v.BuildClass(this,{endpoint:t,query:i,mutation:o}),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(Gu.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,Qu.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 Xu=(re=class{},l(re,"Arrays",zt),l(re,"Axios",ri),l(re,"BaseStore",ue),l(re,"Cache",ji),l(re,"Classes",v),l(re,"CarouselSwipe",ku),l(re,"Color",Eu),l(re,"CreateSortModels",Ys),l(re,"Cursor",Bu),l(re,"DateMask",Pu),l(re,"Dates",Wt),l(re,"Dragger",Du),l(re,"Extension",Xs),l(re,"Favourite",Au),l(re,"Hooks",Fu),l(re,"HttpClient",Ee),l(re,"Id",ve),l(re,"MakeCarousel",Zs),l(re,"Period",Eo),l(re,"PhoneService",Xo),l(re,"Rating",Ou),l(re,"Router",Bt),l(re,"RouterGuard",Lu),l(re,"Scheduler",vu),l(re,"Scroll",Uu),l(re,"Sorter",qu),l(re,"Static",$o),l(re,"Strings",ae),l(re,"Time",ie),l(re,"Timer",Wi),l(re,"Token",oi),l(re,"Menus",Yo),l(re,"validate",ju),l(re,"WaitElement",Wu),l(re,"WebSocketClient",Yu),re);class Zu{constructor(){l(this,"limit",25);l(this,"count",0);l(this,"curPage",1);l(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 Zu;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||{}),Zo=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Zo||{});const Ju=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:Ks,Animations:Nt,CalendarScale:ea,LocalStoreKeys:ut,SocialTypes:ta,ValueRelation:Zo},Symbol.toStringTag,{value:"Module"}));let Ku=class{async Login(t=Oe.Form.GetValues()){const i=await Ee.Post({query:"auth/login",payload:t});if(!i)throw"Ошибка авторизации";Oe.Status.SetState(i)}async LoginAs(t){await Ee.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=Oe.Form.GetValues()){const i=await Ee.Post({query:"auth/register",payload:t});if(!i)throw i}async RestorePassword(t=Oe.Form.GetValues()){await Ee.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=Oe.Form.GetValues()){t.id=Bt.GetStringParam("userId"),await Ee.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await Ee.Post({query:"auth/refresh-token",payload:{refreshToken:oi.getRefreshToken()}})}async CheckUuid(t){await Ee.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await Ee.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await Ee.Get({query:`auth/email-is-confirm/${t}`})}};const ef=new Ku;var tf=Object.defineProperty,Gi=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&tf(t,i,r),r};const si=class Gl{constructor(t){l(this,"id");l(this,"description","");l(this,"time","");l(this,"latitude","");l(this,"longitude","");l(this,"emails",[]);l(this,"postAddresses",[new Ii]);l(this,"phones",[]);l(this,"websites",[]);v.BuildClass(this,t)}addEmail(){const t=en.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=tn.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new Gl;return t.id=ve.UUID(),t}removeEmail(t){v.RemoveFromClassById(t,this.emails)}removePhone(t){v.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new Ii)}addWebsite(){this.websites.push(new Vo)}pushFirst(){this.emails.length||this.emails.push(new en),this.phones.length||this.phones.push(new tn)}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}};Gi([v.GetClassConstructor(en)],si.prototype,"emails"),Gi([v.GetClassConstructor(Ii)],si.prototype,"postAddresses"),Gi([v.GetClassConstructor(tn)],si.prototype,"phones"),Gi([v.GetClassConstructor(Vo)],si.prototype,"websites");let na=si,nf=class extends ue{constructor(){super(na,"contacts")}};const of=new nf;let rf=class extends ue{constructor(){super(en,"emails")}};const sf=new rf;class Jo{constructor(t){l(this,"id");l(this,"ftsp");l(this,"name","");v.BuildClass(this,t)}static Create(t){const i=new Jo;return i.id=ve.UUID(),i.ftsp=JSON.stringify(t),i}}let af=class extends ue{constructor(){super(Jo,"ftsp-presets")}};const lf=new af;let cf=class extends ue{constructor(){super(os,"humans")}};const df=new cf;let uf=class extends ue{constructor(){super(tn,"phones")}};const ff=new uf;class mf{constructor(t){l(this,"id");l(this,"nameRus","");v.BuildClass(this,t)}}var hf=Object.defineProperty,pf=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&hf(t,i,r),r};class ia{constructor(t){l(this,"id");l(this,"nameRus","");l(this,"fields",[]);v.BuildClass(this,t)}}pf([v.GetClassConstructor(mf)],ia.prototype,"fields");let gf=class extends ue{constructor(){super(ia,"schemas")}};const yf=new gf;class oa{constructor(t){l(this,"id","");l(this,"value","");l(this,"label","");l(this,"key","");l(this,"description","");l(this,"route","");l(this,"searchElementMetas",[]);v.BuildClass(this,t)}}class wf{constructor(t){l(this,"id");l(this,"name","");l(this,"label","");v.BuildClass(this,t)}}var bf=Object.defineProperty,ra=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&bf(t,i,r),r};class Rn{constructor(t){l(this,"id");l(this,"key","");l(this,"label","");l(this,"order",0);l(this,"route","");l(this,"table","");l(this,"active",!0);l(this,"searchColumn","");l(this,"descriptionColumn","");l(this,"labelColumn","");l(this,"valueColumn","");l(this,"options",[]);l(this,"searchGroupMetaColumns",[]);v.BuildClass(this,t)}}ra([v.GetClassConstructor(oa)],Rn.prototype,"options"),ra([v.GetClassConstructor(wf)],Rn.prototype,"searchGroupMetaColumns");class Ko{constructor(t){l(this,"query","");l(this,"key","");l(this,"params","");l(this,"suggester",!1);l(this,"mustBeTranslated",!0);l(this,"options",[]);l(this,"searchGroupId","");l(this,"searchGroups",[]);l(this,"searchGroup",new Rn);l(this,"searchObjects",[]);l(this,"pagination",new Ti);l(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(i=>new Rn(i))),t.searchGroup&&(this.searchGroup=new Rn(t.searchGroup)),t.options&&(this.options=t.options.map(i=>new oa(i))),this.count=t.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(t){const i=this.searchGroups.find(o=>o.id===t);i?this.searchGroup=i:this.searchGroup=new Rn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Bt.Route().query.groupId)}setQuery(){const t=Bt.Route().query.query;t&&(this.query=t)}}let Sf=class{constructor(){l(this,"isSearchDrawerOpen",e.ref(!1));l(this,"searchModel",e.reactive(new Ko));l(this,"searchGroups",e.reactive([]));l(this,"count",0)}async Search(t){const i=await Ee.Get({query:`search?key=${t.key}&query=${t.query}`});i&&i.searchGroup&&i.searchGroup.options.forEach(o=>{t.searchObjects.push({id:o.id,value:o.value,label:o.label,description:o.description})})}async mainSearch(t){this.SetSearchModel(await Ee.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(o=>{o.options=[]});const i=await Ee.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(i),i}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new Ko}SetSearchModel(t){t&&(this.searchModel=new Ko(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const er=new Sf;let Cf=class extends ue{constructor(){super(Mi,"users-accounts")}};const kf=new Cf;var Qe=(n=>(n.String="string",n.Text="text",n.Number="number",n.Date="date",n.DateTime="dateTime",n.Radio="radio",n.Set="set",n.Boolean="boolean",n.Files="files",n.File="file",n.MatrixRadio="matrixRadio",n.MatrixSet="matrixSet",n))(Qe||{});class sa{constructor(t){l(this,"id");l(this,"name",Qe.String);l(this,"valueRelation",Zo.simple);v.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===Qe.Radio)return"RadioProp";if(this.name===Qe.Set)return"SetProp";if(this.name===Qe.Number)return"NumberProp";if(this.name===Qe.String)return"StringProp"}}let xf=class extends ue{constructor(){super(sa,"value-types")}};const Ef=new xf;let aa=(st=class{},l(st,"Auth",ef),l(st,"Contacts",of),l(st,"Emails",sf),l(st,"FileInfos",new ue(Ze,"file-infos")),l(st,"FTSPPresets",lf),l(st,"Humans",df),l(st,"Phones",ff),l(st,"Schemas",yf),l(st,"UserAccounts",kf),l(st,"ValueTypes",Ef),l(st,"Search",er),st);var Gt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(Gt||{});let Bf=(Jt=class{},l(Jt,"Orders",ft),l(Jt,"Sizes",Gt),l(Jt,"Statuses",ge),l(Jt,"DataTypes",Ae),l(Jt,"ValueTypes",Qe),l(Jt,"Operators",xe),Jt);class Nf{constructor(){l(this,"title","");l(this,"buttons",[]);l(this,"editTitle",e.ref(!1));l(this,"showEdit",e.ref(!1))}Set(t="",i){typeof t=="function"?this.title=t():typeof t=="string"?this.title=t:this.title=t.value,this.buttons=i}}const $f=new Nf;class Vf{constructor(){l(this,"menu",[]);l(this,"path","");l(this,"isOpen",!0);l(this,"filterString","")}Set(t){this.menu=t}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(t=>{var i;return ae.SearchIn(t.name,this.filterString)||((i=t.children)==null?void 0:i.some(o=>ae.SearchIn(o.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 i;return this.filterString?(i=t.children)==null?void 0:i.filter(o=>ae.SearchIn(o.name,this.filterString)):t.children}}const If=new Vf;class Mf{constructor(){l(this,"Menu",e.reactive(If));l(this,"Head",e.reactive($f))}}const Pf=new Mf,la="Да",ca="Нет";class Tf extends En{constructor(){super(...arguments);l(this,"confirmButtonText",la);l(this,"cancelButtonText",ca);l(this,"persistent",!0);l(this,"resolve");l(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(i){const o=typeof i=="string"?{text:i}:i;return this.confirmButtonText=o.confirmButtonText??la,this.cancelButtonText=o.cancelButtonText??ca,this.persistent=o.persistent??!0,super.showMessage(o,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof N.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=N.Dialog.create({title:this.title||void 0,message:this.text,html:En.ContainsHtml(this.text),persistent:this.persistent,ok:{label:this.confirmButtonText,flat:!0,color:"primary"},cancel:{label:this.cancelButtonText,flat:!0,color:"warning"}});a.onOk(()=>this.Settle(()=>r({type:"submit"}))),a.onCancel(()=>this.Settle(()=>s({type:"cancel"}))),a.onDismiss(()=>this.Settle())})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.Settle(()=>{var i;return(i=this.resolve)==null?void 0:i.call(this,!0)})}Cancel(){this.Settle(()=>{var i;return(i=this.reject)==null?void 0:i.call(this)})}Settle(i){i==null||i(),this.resolve=void 0,this.reject=void 0}}const Rf=new Tf;class Df{constructor(){l(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Af extends Df{Show(){super.show()}Hide(){super.hide()}}const zf=new Af;class Qt{}l(Qt,"Admin",Pf),l(Qt,"Dialog",Rf),l(Qt,"Loading",zf),l(Qt,"Notify",Bn),l(Qt,"Btn",Kt),l(Qt,"Input",Xr);class P{}l(P,"Auth",e.reactive(Oe)),l(P,"UI",e.reactive(Qt)),l(P,"Paginator",e.reactive(Js)),l(P,"S",aa),l(P,"H",Xu),l(P,"C",Sc),l(P,"T",Bf),l(P,"I",Ju),l(P,"F",Bc);class da{constructor(t){l(this,"id");l(this,"name","");l(this,"address","");l(this,"number");l(this,"building");l(this,"buildingId");P.H.Classes.BuildClass(this,t),this.setName()}setName(){this.building&&(this.name=this.building.address+", вход "+this.number,this.address=this.name)}getBuildingNumber(){var t;return String((t=this.building)==null?void 0:t.number)}getEntranceNumber(){return String(this.number)}}class ua{constructor(t){l(this,"id");l(this,"number");l(this,"buildingId");P.H.Classes.BuildClass(this,t)}}var _f=Object.defineProperty,fa=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&_f(t,i,r),r};class Qi{constructor(t){l(this,"id");l(this,"number","");l(this,"address","");l(this,"name","");l(this,"status","");l(this,"description","");l(this,"floors",[]);l(this,"entrances",[]);P.H.Classes.BuildClass(this,t)}}fa([P.H.Classes.GetClassConstructor(ua)],Qi.prototype,"floors"),fa([P.H.Classes.GetClassConstructor(da)],Qi.prototype,"entrances");const Ff=Object.freeze(Object.defineProperty({__proto__:null,Building:Qi,Entrance:da,Floor:ua},Symbol.toStringTag,{value:"Module"}));let Of=class extends ue{constructor(){super(Qi,"buildings")}};const Lf=new Of,vf=Object.freeze(Object.defineProperty({__proto__:null,C:Ff,S:Object.freeze(Object.defineProperty({__proto__:null,BuildingsStore:Lf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Dn=(n=>(n.Ping="ping",n.Enter="enter",n.Exit="exit",n.Message="message",n.Write="write",n.Empty="",n))(Dn||{});class ln{constructor(t){l(this,"id");l(this,"userId");l(this,"chatId");l(this,"message","");l(this,"fileInfo",new P.C.FileInfo);l(this,"createdAt",new Date);l(this,"type",Dn.Message);v.BuildClass(this,t)}static Create(t,i,o){const r=new ln;return r.id=P.H.Id.UUID(),r.chatId=i,r.userId=o,r.message=t,r}static CreatePingMessage(){const t=new ln;return t.type=Dn.Ping,t.id=P.H.Id.UUID(),t}isMessage(){return this.type===Dn.Message||this.type===Dn.Empty}}var Hf=Object.defineProperty,Uf=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Hf(t,i,r),r};const ma=class Ql{constructor(t){l(this,"id");l(this,"name","");l(this,"createdAt",new Date);l(this,"newMesage","");l(this,"userId","");l(this,"chatMessages",[]);P.H.Classes.BuildClass(this,t)}static Create(){const t=new Ql;return t.id=P.H.Id.UUID(),t}addMessage(){if(this.newMesage==="")return;const t=ln.Create(this.newMesage,this.id,this.userId);return this.chatMessages.push(t),this.newMesage="",t}};Uf([P.H.Classes.GetClassConstructor(ln)],ma.prototype,"chatMessages");let ha=ma;const qf=Object.freeze(Object.defineProperty({__proto__:null,Chat:ha,ChatMessage:ln},Symbol.toStringTag,{value:"Module"}));let jf=class extends ue{constructor(){super(ln,"chat-messages")}};const Wf=new jf;let Gf=class extends ue{constructor(){super(ha,"chats")}};const Qf=new Gf,Yf=Object.freeze(Object.defineProperty({__proto__:null,C:qf,S:Object.freeze(Object.defineProperty({__proto__:null,ChatMessages:Wf,Chats:Qf},Symbol.toStringTag,{value:"Module"})),T:(_r=class{},l(_r,"ChatMessage",Dn),_r)},Symbol.toStringTag,{value:"Module"})),ai=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(),i=e.computed(()=>{const o={};for(const r of Object.keys(t))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(o[r]=t[r]);return o});return(o,r)=>(e.openBlock(),e.createBlock(e.unref(N.QBadge),e.mergeProps(e.unref(i),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,rounded:n.rounded,floating:n.floating,"multi-line":n.multiLine,transparent:n.transparent}),{default:e.withCtx(()=>[e.renderSlot(o.$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:ge.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const t=n,i=e.useAttrs(),o=e.computed(()=>{const x={};for(const V of Object.keys(i))["disable","color","size","flat","outline","unelevated","type"].includes(V)||(x[V]=i[V]);return x}),r=["submit","button","reset"],s=e.computed(()=>r.includes(t.type)),a=e.computed(()=>s.value?t.type:void 0),d=e.computed(()=>s.value?ge.Primary:t.type),c=e.computed(()=>{const x={};return t.margin&&(x.margin=t.margin),t.padding&&(x.padding=t.padding),t.width&&(x.maxWidth=t.width,x.minWidth=t.width),t.height&&(x.minHeight=t.height,x.maxHeight=t.height),t.fontSize&&(x.fontSize=t.fontSize),x}),u={[ge.Primary]:"primary",[ge.Success]:"positive",[ge.Warning]:"warning",[ge.Error]:"negative",[ge.Info]:"info"},f=e.computed(()=>i.color!==void 0?i.color:u[d.value]??"primary"),m={[Gt.XS]:"xs",[Gt.S]:"sm",[Gt.M]:"md",[Gt.L]:"lg",[Gt.XL]:"xl"},h=e.computed(()=>i.size!==void 0?i.size:["xs","sm","md","lg","xl"].includes(t.size)?t.size:m[t.size]??"md"),w=e.computed(()=>i.flat!==void 0?i.flat:["text","pag","text_ano"].includes(t.skin)),y=e.computed(()=>i.outline!==void 0?i.outline:t.skin==="invert"),S=e.computed(()=>i.unelevated!==void 0?i.unelevated:t.skin==="base"),E=e.computed(()=>i.disable??t.disabled);return(x,V)=>(e.openBlock(),e.createBlock(e.unref(N.QBtn),e.mergeProps(e.unref(o),{style:e.unref(c),color:e.unref(f),size:e.unref(h),flat:e.unref(w),outline:e.unref(y),unelevated:e.unref(S),disable:e.unref(E),type:e.unref(a),"no-wrap":""}),{default:e.withCtx(()=>[e.renderSlot(x.$slots,"default"),e.createTextVNode(" "+e.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),Xf=["innerHTML"],Zf={key:1},tr=z(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,i={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(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["string",n.customClass]),style:i,onClick:r[0]||(r[0]=s=>o.$emit("click"))},[e.createVNode(e.unref(N.QItemLabel),null,{default:e.withCtx(()=>[n.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.string},null,8,Xf)):(e.openBlock(),e.createElementBlock("span",Zf,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),mt=z(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,i=e.useAttrs(),o=e.computed(()=>{const c={};for(const u of Object.keys(i))u!=="delay"&&(c[u]=i[u]);return c}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=e.computed(()=>{const c=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"top":"bottom"} ${c}`}),a=e.computed(()=>{const c=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"bottom":"top"} ${c}`}),d=e.computed(()=>({background:r[t.typeStyle],whiteSpace:"pre",height:t.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(c,u)=>n.tooltipText?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},e.unref(o),{class:"tooltip-wrapper"}),[e.renderSlot(c.$slots,"default",{},void 0,!0),e.createVNode(e.unref(N.QTooltip),{delay:n.timeout,anchor:e.unref(s),self:e.unref(a),class:"tooltip-box",style:e.normalizeStyle(e.unref(d))},{default:e.withCtx(()=>[e.createVNode(tr,{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(N.QTooltip),e.mergeProps({key:1},e.unref(o),{delay:n.timeout,class:"tooltip-box"}),{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),$t={title:"Контактная информация",phonesTitle:"Телефоны",emailsTitle:"Электронная почта",addPhone:"Добавить телефон",addEmail:"Добавить email",noPhones:"Нет телефонных номеров",noEmails:"Нет email адресов",copied:"Скопировано в буфер обмена",copiedNumber:"Номер скопирован в буфер обмена",copiedEmail:"Email скопирован в буфер обмена",saved:"Сохранено",deleted:"Удалено",enterPhone:"Введите номер телефона",enterEmail:"Введите email адрес"},ot=z(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:i}){const o=i,r=e.useModel(n,"modelValue"),s=e.useAttrs(),a=e.computed(()=>typeof s.id=="string"?s.id:void 0),d=e.computed(()=>{const y={};for(const S of Object.keys(s))S!=="id"&&S!=="disable"&&(y[S]=s[S]);return y}),c=n,u=e.computed(()=>s.disable??c.disabled),f=e.ref(null);function m(){var y;(y=f.value)==null||y.focus()}t({focus:m});const h=()=>{o("input",r.value)},w=e.computed(()=>{const y={};return c.margin&&(y.margin=c.margin),c.padding&&(y.padding=c.padding),c.width&&(y.width=c.width),c.borderColor&&(y["--p-border-color"]=c.borderColor),y});return(y,S)=>(e.openBlock(),e.createBlock(e.unref(N.QInput),e.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=E=>r.value=E)},e.unref(d),{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(w),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":h,onBlur:S[1]||(S[1]=E=>y.$emit("blur",r.value)),onFocus:S[2]||(S[2]=E=>y.$emit("focus",r.value)),onClear:S[3]||(S[3]=E=>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-c4acf8be"]]),cn=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"),i=e.useAttrs(),o=e.computed(()=>{const r={};for(const s of Object.keys(i))["persistent","maximized","transition-show","transition-hide"].includes(s)||(r[s]=i[s]);return r});return(r,s)=>(e.openBlock(),e.createBlock(e.unref(N.QDialog),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=a=>t.value=a)},e.unref(o),{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"]))}}),Jf={class:"q-mb-md"},Kf={class:"text-subtitle1 text-weight-medium text-grey-9"},em={class:"text-caption text-grey-6 q-mt-xs"},li=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=e.useModel(n,"modelValue");return(i,o)=>{const r=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:t.value,"onUpdate:modelValue":o[1]||(o[1]=s=>t.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCard),{style:{width:"340px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),{class:"column items-center q-pt-xl q-pb-sm text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",Jf,[e.createVNode(e.unref(N.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",Kf,e.toDisplayString(n.title),1),e.createElementVNode("div",em,e.toDisplayString(n.subtitle),1)]),_:1}),e.createVNode(e.unref(N.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),[[r]]),e.createVNode(oe,{unelevated:"",label:"Удалить",color:"negative",loading:n.loading,"no-caps":"",onClick:o[0]||(o[0]=s=>i.$emit("confirm"))},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}}}),tm={class:"q-mr-md"},nm={class:"text-subtitle1 text-weight-medium text-grey-9"},ci=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=e.useModel(n,"modelValue");return(i,o)=>{const r=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:t.value,"onUpdate:modelValue":o[1]||(o[1]=s=>t.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCard),{style:{width:"380px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createElementVNode("div",tm,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",nm,e.toDisplayString(n.title),1),e.createVNode(e.unref(N.QSpace)),e.withDirectives(e.createVNode(oe,{flat:"",round:"",dense:"",icon:"close",size:"sm",color:"grey-6"},null,512),[[r]])]),_:1}),e.createVNode(e.unref(N.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3}),e.createVNode(e.unref(N.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),[[r]]),e.createVNode(oe,{unelevated:"",label:"Сохранить",color:"primary",loading:n.saving,"no-caps":"",onClick:o[0]||(o[0]=s=>i.$emit("save"))},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["modelValue"])}}}),im={class:"q-mt-sm"},om={class:"row items-center justify-between q-mb-xs q-px-xs"},rm={class:"row items-center q-gutter-xs"},sm={class:"text-uppercase text-caption text-weight-medium text-grey-7"},am={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},lm={style:{"min-width":"0"}},cm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},dm={key:0,class:"text-caption text-grey-6 ellipsis"},um={class:"row items-center no-wrap q-gutter-xs"},fm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},mm={class:"text-body2 text-grey-7"},dn=z(e.defineComponent({__name:"PContactFormViewEmails",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,i=e.computed(()=>({...$t,...t.labels})),o=e.computed(()=>t.adapter.emails(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),d=e.ref(""),c=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),h=e.ref(!1),w=e.ref(-1),y=async T=>{T&&(await navigator.clipboard.writeText(T),P.UI.Notify.Success(i.value.copiedEmail))},S=T=>{var M,A;s.value=T,a.value=o.value[T],d.value=t.adapter.emailValue(o.value[T]),c.value=((A=(M=t.adapter).emailDescription)==null?void 0:A.call(M,o.value[T]))??"",r.value=!0},E=async()=>{if(!a.value||!d.value){P.UI.Notify.Warning(i.value.enterEmail);return}u.value=!0;try{Object.assign(a.value,{...a.value,email:d.value,description:c.value}),await t.adapter.updateEmail(a.value),r.value=!1,P.UI.Notify.Success(i.value.saved)}catch{P.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},x=async()=>{f.value=!0;try{await t.adapter.addEmail(t.contact),S(o.value.length-1)}catch{P.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},V=T=>{w.value=T,h.value=!0},k=async()=>{var T,M;m.value=!0;try{const A=o.value[w.value];await t.adapter.removeEmail((M=(T=t.adapter).emailId)==null?void 0:M.call(T,A)),o.value.splice(w.value,1),h.value=!1,P.UI.Notify.Success(i.value.deleted)}catch{P.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(T,M)=>(e.openBlock(),e.createElementBlock("div",im,[e.createElementVNode("div",om,[e.createElementVNode("div",rm,[e.createVNode(e.unref(N.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",sm,e.toDisplayString(e.unref(i).emailsTitle),1),e.unref(o).length>0?(e.openBlock(),e.createBlock(ai,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o).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:x},null,8,["loading"])]),e.unref(o).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(o),(A,Q)=>{var se,_e,Ne,Se,he,at;return e.openBlock(),e.createElementBlock("div",{key:((_e=(se=n.adapter).emailId)==null?void 0:_e.call(se,A))??Q,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",T.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",am,[e.createVNode(e.unref(N.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",lm,[e.createElementVNode("div",cm,e.toDisplayString(n.adapter.emailValue(A)),1),(Se=(Ne=n.adapter).emailDescription)!=null&&Se.call(Ne,A)?(e.openBlock(),e.createElementBlock("div",dm,e.toDisplayString((at=(he=n.adapter).emailDescription)==null?void 0:at.call(he,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",um,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:$e=>y(n.adapter.emailValue(A))},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[4]||(M[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(oe,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:$e=>S(Q)},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[5]||(M[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),Q>=n.presetted?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:$e=>V(Q)},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[6]||(M[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",fm,[e.createVNode(e.unref(N.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",mm,e.toDisplayString(e.unref(i).noEmails),1),M[7]||(M[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:x},null,8,["loading"])])),e.createVNode(ci,{modelValue:e.unref(r),"onUpdate:modelValue":M[2]||(M[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(ot,{key:0,modelValue:e.unref(d),"onUpdate:modelValue":M[0]||(M[0]=A=>e.isRef(d)?d.value=A:null),dense:"",autofocus:"",label:"Email адрес",type:"email",class:"q-mb-md",rules:[A=>!!A||e.unref(i).enterEmail,A=>!A||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(A)||"Некорректный email"],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"email",color:"primary"})]),_:1},8,["modelValue","rules"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(ot,{key:1,modelValue:e.unref(c),"onUpdate:modelValue":M[1]||(M[1]=A=>e.isRef(c)?c.value=A:null),dense:"",label:"Описание (например: Рабочая, Личная)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(li,{modelValue:e.unref(h),"onUpdate:modelValue":M[3]||(M[3]=A=>e.isRef(h)?h.value=A:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:k},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),hm={class:"q-mt-sm"},pm={class:"row items-center justify-between q-mb-xs q-px-xs"},gm={class:"row items-center q-gutter-xs"},ym={class:"text-uppercase text-caption text-weight-medium text-grey-7"},wm={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},bm={style:{"min-width":"0"}},Sm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},Cm={key:0,class:"text-caption text-grey-6 ellipsis"},km={class:"row items-center no-wrap q-gutter-xs"},xm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},Em={class:"text-body2 text-grey-7"},un=z(e.defineComponent({__name:"PContactFormViewPhones",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,i=e.computed(()=>({...$t,...t.labels})),o=e.computed(()=>t.adapter.phones(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),d=e.ref(""),c=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),h=e.ref(!1),w=e.ref(-1),y=async T=>{T&&(await navigator.clipboard.writeText(T),P.UI.Notify.Success(i.value.copiedNumber))},S=T=>{var M,A;s.value=T,a.value=o.value[T],d.value=t.adapter.phoneNumber(o.value[T]),c.value=((A=(M=t.adapter).phoneDescription)==null?void 0:A.call(M,o.value[T]))??"",r.value=!0},E=async()=>{if(!a.value||!d.value){P.UI.Notify.Warning(i.value.enterPhone);return}u.value=!0;try{Object.assign(a.value,{...a.value,number:d.value,description:c.value}),await t.adapter.updatePhone(a.value),r.value=!1,P.UI.Notify.Success(i.value.saved)}catch{P.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},x=async()=>{f.value=!0;try{await t.adapter.addPhone(t.contact),S(o.value.length-1)}catch{P.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},V=T=>{w.value=T,h.value=!0},k=async()=>{var T,M;m.value=!0;try{const A=o.value[w.value];await t.adapter.removePhone((M=(T=t.adapter).phoneId)==null?void 0:M.call(T,A)),o.value.splice(w.value,1),h.value=!1,P.UI.Notify.Success(i.value.deleted)}catch{P.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(T,M)=>(e.openBlock(),e.createElementBlock("div",hm,[e.createElementVNode("div",pm,[e.createElementVNode("div",gm,[e.createVNode(e.unref(N.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",ym,e.toDisplayString(e.unref(i).phonesTitle),1),e.unref(o).length>0?(e.openBlock(),e.createBlock(ai,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o).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:x},null,8,["loading"])]),e.unref(o).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(o),(A,Q)=>{var se,_e,Ne,Se,he,at;return e.openBlock(),e.createElementBlock("div",{key:((_e=(se=n.adapter).phoneId)==null?void 0:_e.call(se,A))??Q,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",T.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",wm,[e.createVNode(e.unref(N.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",bm,[e.createElementVNode("div",Sm,e.toDisplayString(n.adapter.phoneNumber(A)),1),(Se=(Ne=n.adapter).phoneDescription)!=null&&Se.call(Ne,A)?(e.openBlock(),e.createElementBlock("div",Cm,e.toDisplayString((at=(he=n.adapter).phoneDescription)==null?void 0:at.call(he,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",km,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:$e=>y(n.adapter.phoneNumber(A))},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[4]||(M[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(oe,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:$e=>S(Q)},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[5]||(M[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),Q>=n.presetted?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:$e=>V(Q)},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[6]||(M[6]=[e.createTextVNode("Удалить номер",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",xm,[e.createVNode(e.unref(N.QIcon),{name:"phone",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",Em,e.toDisplayString(e.unref(i).noPhones),1),M[7]||(M[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:x},null,8,["loading"])])),e.createVNode(ci,{modelValue:e.unref(r),"onUpdate:modelValue":M[2]||(M[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(ot,{key:0,modelValue:e.unref(d),"onUpdate:modelValue":M[0]||(M[0]=A=>e.isRef(d)?d.value=A:null),mask:n.adapter.phoneMask(e.unref(a)),dense:"",autofocus:"",label:"Номер телефона",class:"q-mb-md",rules:[A=>!!A||e.unref(i).enterPhone],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.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(ot,{key:1,modelValue:e.unref(c),"onUpdate:modelValue":M[1]||(M[1]=A=>e.isRef(c)?c.value=A:null),dense:"",label:"Описание (например: Рабочий, Личный)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(li,{modelValue:e.unref(h),"onUpdate:modelValue":M[3]||(M[3]=A=>e.isRef(h)?h.value=A:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:k},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),Bm={class:"row items-center q-gutter-sm"},Nm={class:"text-weight-medium text-grey-9"},$m=e.defineComponent({__name:"PContactForm",props:{contact:{},adapter:{},title:{default:$t.title},phonesPresetted:{default:3},emailsPresetted:{default:2},margin:{default:"0"},labels:{}},setup(n){const t=n,i=e.computed(()=>({...$t,...t.labels})),o=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),d=()=>{a.value=!a.value},c=async()=>{const u=s.value;u&&(await navigator.clipboard.writeText(u),P.UI.Notify.Success(i.value.copied))};return(u,f)=>(e.openBlock(),e.createBlock(e.unref(N.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:d},[e.createElementVNode("div",Bm,[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(N.QIcon),{name:"contact_phone",size:"18px",color:"primary"}),e.createElementVNode("span",Nm,e.toDisplayString(n.title),1),e.unref(o).length+e.unref(r).length>0?(e.openBlock(),e.createBlock(ai,{key:0,outline:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o).length+e.unref(r).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(N.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:c},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("Скопировать все контакты",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(N.QSlideTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createVNode(e.unref(N.QSeparator)),e.createVNode(e.unref(N.QCardSection),{class:"q-pt-xs q-pb-md q-px-md"},{default:e.withCtx(()=>[e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(i)},null,8,["contact","adapter","presetted","labels"]),e.createVNode(e.unref(N.QSeparator),{class:"q-my-sm"}),e.createVNode(dn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(i)},null,8,["contact","adapter","presetted","labels"])]),_:1})],512),[[e.vShow,!e.unref(a)]])]),_:1})]),_:1},8,["style"]))}}),nr=z($m,[["__scopeId","data-v-327b9235"]]),Vm={class:"contact-edit-wrapper"},ir=z(e.defineComponent({__name:"PContactFormEdit",props:{contact:{},adapter:{},phonesPresetted:{default:3},emailsPresetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",Vm,[e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"]),o[0]||(o[0]=e.createElementVNode("div",{class:"edit-sections-divider"},null,-1)),e.createVNode(dn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-8548f1de"]]),Im={class:"edit-emails-wrapper"},or=z(e.defineComponent({__name:"PContactFormEditEmails",props:{contact:{},adapter:{},presetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",Im,[e.createVNode(dn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-2f0b3c6b"]]),Mm={class:"edit-phones-wrapper"},rr=z(e.defineComponent({__name:"PContactFormEditPhones",props:{contact:{},adapter:{},presetted:{default:3},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",Mm,[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-59e80623"]]),Pm={class:"contact-view-wrapper"},sr=z(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",Pm,[e.createVNode(un,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"]),o[0]||(o[0]=e.createElementVNode("div",{class:"view-sections-divider"},null,-1)),e.createVNode(dn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"])]))}}),[["__scopeId","data-v-f1271bd5"]]);function pa(n){n.component("PContactForm",nr),n.component("PContactFormDeleteDialog",li),n.component("PContactFormEdit",ir),n.component("PContactFormEditDialog",ci),n.component("PContactFormEditEmails",or),n.component("PContactFormEditPhones",rr),n.component("PContactFormView",sr),n.component("PContactFormViewEmails",dn),n.component("PContactFormViewPhones",un)}const Tm=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:nr,PContactFormDeleteDialog:li,PContactFormEdit:ir,PContactFormEditDialog:ci,PContactFormEditEmails:or,PContactFormEditPhones:rr,PContactFormView:sr,PContactFormViewEmails:dn,PContactFormViewPhones:un,default:pa,defaultContactsLabels:$t},Symbol.toStringTag,{value:"Module"}));class ga{constructor(t){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Ze);P.H.Classes.BuildClass(this,t)}}class di{constructor(t){l(this,"id");l(this,"passportId");l(this,"fileInfoId");l(this,"fileInfo",new P.C.FileInfo);l(this,"order",0);v.BuildClass(this,t)}static Create(t){const i=new di;return i.id=P.H.Id.UUID(),i.passportId=t,i}}var Rm=Object.defineProperty,Dm=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Rm(t,i,r),r};class ar{constructor(t){l(this,"id");l(this,"num","");l(this,"seria","");l(this,"division","");l(this,"divisionCode","");l(this,"citzenship","");l(this,"date",new Date);l(this,"address","");l(this,"passportScans",[]);v.BuildClass(this,t)}}Dm([v.GetClassConstructor(di)],ar.prototype,"passportScans");class ya{constructor(t){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Ze);P.H.Classes.BuildClass(this,t)}}const Am=Object.freeze(Object.defineProperty({__proto__:null,Inn:ga,Passport:ar,PassportScan:di,Snils:ya},Symbol.toStringTag,{value:"Module"}));let zm=class extends ue{constructor(){super(ga,"inns")}};const _m=new zm;let Fm=class extends ue{constructor(){super(di,"passport-scans")}};const Om=new Fm;let Lm=class extends ue{constructor(){super(ar,"passports")}};const vm=new Lm;let Hm=class extends ue{constructor(){super(ya,"snilss")}};const Um=new Hm,qm=Object.freeze(Object.defineProperty({__proto__:null,C:Am,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:_m,PassportScans:Om,Passports:vm,Snilss:Um},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class lr{constructor(t){l(this,"id");l(this,"name","");P.H.Classes.BuildClass(this,t)}static Create(t){const i=new lr;return i.id=P.H.Id.UUID(),i.name=t,i}}const jm=Object.freeze(Object.defineProperty({__proto__:null,Extract:lr},Symbol.toStringTag,{value:"Module"})),Wm=[{path:"/admin/extracts",name:"ExtractsList",component:()=>Promise.resolve().then(()=>yb)}];class ui{constructor(t){l(this,"id");l(this,"name","");l(this,"label","");P.H.Classes.BuildClass(this,t)}static Create(t,i){const o=new ui;return o.id=P.H.Id.UUID(),o.name=t,o.label=i,o}}let Gm=class extends ue{constructor(){super(ui,"extracts")}};const Qm=new Gm,Ym=Object.freeze(Object.defineProperty({__proto__:null,C:jm,R:Wm,S:Object.freeze(Object.defineProperty({__proto__:null,ExtractsStore:Qm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class fn{constructor(t){l(this,"id");l(this,"name","");l(this,"score",0);l(this,"order",0);l(this,"showMoreQuestions",!1);l(this,"showOther",!1);l(this,"fieldId");l(this,"isMatrixY",!1);P.H.Classes.BuildClass(this,t)}static Create(t){const i=new fn;return i.id=P.H.Id.UUID(),i.fieldId=t,i}}class wa{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fieldId");P.H.Classes.BuildClass(this,t)}}class cr{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);P.H.Classes.BuildClass(this,t)}}class An{constructor(t){l(this,"id");l(this,"name","");l(this,"fieldId");P.H.Classes.BuildClass(this,t)}static Create(t){const i=new An;return i.id=P.H.Id.UUID(),i.fieldId=t,i}}var Xm=Object.defineProperty,fi=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Xm(t,i,r),r};const mn=class So{constructor(t){l(this,"id");l(this,"name","");l(this,"code","");l(this,"valueTypeId");l(this,"order",0);l(this,"ageCompare",!1);l(this,"answerVariants",[]);l(this,"answerVariantsForDelete",[]);l(this,"fieldExamples",[]);l(this,"fieldVariants",[]);l(this,"valueType",new sa);l(this,"fieldMeasures",[]);l(this,"showSet",!1);l(this,"showRadio",!1);l(this,"isEdit",!1);l(this,"children",[]);l(this,"parentId");l(this,"formSectionId");l(this,"selected",!1);P.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 i=new So;return i.id=P.H.Id.UUID(),i.formSectionId=t,i}getRegisterPropertyRadioOriginalValue(t){const i=this.answerVariants.find(o=>o.id===t);return i?i.name:""}addRadioItem(t){const i=new fn(t);i.order=this.answerVariants.length,this.answerVariants.push(i)}removeRadioItem(t){const i=this.answerVariants[t].id;i&&this.answerVariantsForDelete.push(i),this.answerVariants.splice(t,1)}changeRelation(t){const i=t.find(o=>o.id===this.valueTypeId);if(i){if(i.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(i.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=i}}editRegisterProperty(t){this.isEdit=t??!this.isEdit}sortExamples(){this.fieldExamples.forEach((t,i)=>t.order=i)}addRegisterPropertyMeasure(t){this.fieldMeasures.push(new cr(t))}addRegisterPropertyVariant(){this.fieldVariants.push(new An)}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=fn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=So.Create();return t.parentId=this.id,t.name="Вопрос",t.order=this.children.length,this.children.push(t),t}addFieldVariant(){const t=An.Create(this.id);return this.fieldVariants.push(t),t}copy(){const t=new So(this);return t.id=P.H.Id.UUID(),t.answerVariants.forEach(i=>{i.id=P.H.Id.UUID(),i.fieldId=t.id}),t.children=t.children.map(i=>{const o=i.copy();return o.parentId=t.id,o}),t}};fi([P.H.Classes.GetClassConstructor(fn)],mn.prototype,"answerVariants"),fi([P.H.Classes.GetClassConstructor(wa)],mn.prototype,"fieldExamples"),fi([P.H.Classes.GetClassConstructor(An)],mn.prototype,"fieldVariants"),fi([P.H.Classes.GetClassConstructor(cr)],mn.prototype,"fieldMeasures"),fi([P.H.Classes.GetClassConstructor(mn)],mn.prototype,"children");let Yi=mn;class dr{constructor(t){l(this,"id");l(this,"answerId");l(this,"comment","");l(this,"fileInfoId");l(this,"fileInfo",new Ze);P.H.Classes.BuildClass(this,t)}}class hn{constructor(t){l(this,"id");l(this,"answerVariantId");l(this,"answerVariantIdY");l(this,"fieldFillId");P.H.Classes.BuildClass(this,t)}static Create(t,i){const o=new hn;return o.id=jt(),o.fieldFillId=t,o.answerVariantId=i,o}static GetClassName(){return"selectedAnswerVariant"}}var Zm=Object.defineProperty,ba=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Zm(t,i,r),r};const ur=class Qr{constructor(t){l(this,"id");l(this,"valueString");l(this,"valueOther");l(this,"valueNumber");l(this,"valueDate");l(this,"fileInfo",new Ze);l(this,"fileInfoId");l(this,"order",0);l(this,"selectedAnswerVariants",[]);l(this,"patientId");l(this,"fieldId");l(this,"formFillId");l(this,"answerVariantId");l(this,"filled",!1);l(this,"researchResultId");l(this,"answerFiles",[]);l(this,"answerFilesForDelete",[]);P.H.Classes.BuildClass(this,t)}setFilled(t){this.filled=t}static Create(t,i){const o=new Qr;return o.id=jt(),o.fieldId=t.id,o.formFillId=i,o.order=t.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}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,i){return t.map(o=>Qr.Create(o,i))}addFile(){const t=new dr;return t.id=jt(),t.answerId=this.id,this.answerFiles.push(t),t}getFileInfos(){const t=[];return this.answerFiles.forEach(i=>t.push(i.fileInfo)),t}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(t,i){const o=hn.Create(this.id,t);return o.answerVariantIdY=i,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(t,i){return this.selectedAnswerVariants.find(o=>o.answerVariantId===t&&o.answerVariantIdY===i)}addSelectedAnswerVariant(t){const i=hn.Create(this.id,t);return this.selectedAnswerVariants.push(i),this.filled=!0,i}static GetClassName(){return"answer"}showOther(t){const i=t.find(o=>o.showOther);return i?this.answerVariantId===i.id||this.selectedAnswerVariants.some(o=>o.answerVariantId===i.id):!1}};ba([P.H.Classes.GetClassConstructor(hn)],ur.prototype,"selectedAnswerVariants"),ba([P.H.Classes.GetClassConstructor(dr)],ur.prototype,"answerFiles");let zn=ur;class Jm{constructor(t){l(this,"id");l(this,"fieldId");P.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var Km=Object.defineProperty,eh=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Km(t,i,r),r};const Sa=class Yl{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fields",[]);l(this,"formId");P.H.Classes.BuildClass(this,t)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(t){return`${this.getN()}.${t+1}`}getSubFieldN(t,i){return`${this.getFieldN(t)}.${i+1}`}static Create(t){const i=new Yl;return i.id=P.H.Id.UUID(),i.formId=t,i}addField(){const t=Yi.Create(this.id);return this.fields.push(t),this.sortFields(),t}sortFields(){this.fields.forEach((t,i)=>t.order=i)}getAnswerVariants(){const t=[];return this.fields.forEach(i=>t.push(...i.answerVariants)),t}};eh([P.H.Classes.GetClassConstructor(Yi)],Sa.prototype,"fields");let Xi=Sa;var th=Object.defineProperty,nh=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&th(t,i,r),r};const Ca=class Xl{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"isLaboratory",!1);l(this,"formSections",[]);l(this,"isEdit",!1);l(this,"withDates",!1);l(this,"withScores",!1);l(this,"selectedForExport",!1);l(this,"filterString","");l(this,"showOnlyNotFilled",!1);l(this,"showOnlyFilled",!1);P.H.Classes.BuildClass(this,t)}static GetClassName(){return"Form"}static Create(){const t=new Xl;return t.id=P.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=Xi.Create(this.id);return this.formSections.push(t),P.H.Sorter.Sort(this.formSections),t}getFields(){const t=this.formSections.map(o=>o.fields).flat(),i=t.map(o=>o.children).flat();return t.concat(i).filter(o=>o.children.length===0)}};nh([P.H.Classes.GetClassConstructor(Xi)],Ca.prototype,"formSections");let ka=Ca;var ih=Object.defineProperty,oh=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&ih(t,i,r),r};const xa=class Zl{constructor(t){l(this,"id");l(this,"date",new Date);l(this,"editMode",!1);l(this,"userFormId");l(this,"fillingPercentage",0);l(this,"fieldFills",[]);l(this,"num","");l(this,"formId");P.H.Classes.BuildClass(this,t)}static Create(t){const i=new Zl;return i.id=P.H.Id.UUID(),i.formId=t.id,i.fieldFills.push(...zn.CreateMany(t.getFields(),i.id)),i}addFieldFill(t){this.fieldFills.push(t)}getFieldFill(t){var i;return(i=this.fieldFills)==null?void 0:i.find(o=>o.fieldId===t)}pushRegisterProperty(t){const i=new zn;i.researchResultId=t,this.fieldFills.push(i)}getRegisterPropertyToPatient(t){return this.fieldFills.filter(i=>i.researchResultId===t)}getOrCreateFieldFill(t){let i=this.getFieldFill(t.id);return i||(i=zn.Create(t),this.addFieldFill(i)),i}getFileInfos(){const t=[];return this.fieldFills.forEach(i=>t.push(...i.getFileInfos())),t}calculateFilling(){const t=this.fieldFills.filter(o=>o.filled).length,i=this.fieldFills.length;this.fillingPercentage=Math.round(t/i*100)}getFieldFillByFieldId(t){return this.fieldFills.find(i=>i.fieldId===t)}getFieldVariantFieldFill(t){return this.fieldFills.find(i=>i.answerVariantId===t)}getFieldsFieldFillsMap(t){const i={};return t.forEach(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;i[o.code]=s}}),i}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};oh([P.H.Classes.GetClassConstructor(zn)],xa.prototype,"fieldFills");let Ea=xa;const rh=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:fn,Field:Yi,FieldExample:wa,FieldFill:zn,FieldFillFile:dr,FieldFilter:Jm,FieldMeasure:cr,FieldVariant:An,Form:ka,FormFill:Ea,FormSection:Xi,SelectedAnswerVariant:hn},Symbol.toStringTag,{value:"Module"}));let sh=class extends ue{constructor(){super(fn,"answer-variants")}};const ah=new sh;let lh=class extends ue{constructor(){super(zn,"field-fills")}};const ch=new lh;let dh=class extends ue{constructor(){super(Yi,"fields")}};const uh=new dh;let fh=class extends ue{constructor(){super(Ea,"form-fills")}};const mh=new fh;let hh=class extends ue{constructor(){super(Xi,"form-sections")}};const ph=new hh;let gh=class extends ue{constructor(){super(ka,"forms")}};const yh=new gh;let wh=class extends ue{constructor(){super(hn,"selected-answer-variants")}};const bh=new wh,Sh=Object.freeze(Object.defineProperty({__proto__:null,C:rh,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:ah,FieldFills:ch,Fields:uh,FormFills:mh,FormSections:ph,Forms:yh,SelectedAnswerVariants:bh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Zi{constructor(t){l(this,"id");l(this,"name","");l(this,"link","");l(this,"selected",!1);l(this,"hide",!1);l(this,"editMode",!1);l(this,"color","");l(this,"background","");l(this,"order",0);l(this,"menuId");l(this,"iconId");l(this,"icon",new Ze);l(this,"iconName","");l(this,"svgCode","");v.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=ve.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var Ch=Object.defineProperty,kh=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Ch(t,i,r),r};class fr{constructor(t){l(this,"id");l(this,"name","");l(this,"link","");l(this,"top",!0);l(this,"side",!0);l(this,"show",!1);l(this,"hide",!1);l(this,"active",!1);l(this,"order",0);l(this,"selected",!1);l(this,"editMode",!1);l(this,"subMenus",[]);l(this,"subMenusForDelete",[]);l(this,"iconId");l(this,"icon",new Ze);v.BuildClass(this,t)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const t=[];return t.push(this.icon),this.subMenus.forEach(i=>{t.push(i.icon)}),t}addFile(t){this.icon.id||(this.icon.id=ve.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new Zi)}removeSubMenu(t){const i=this.subMenus[t].id;i&&this.subMenusForDelete.push(i),this.subMenus.splice(t,1)}setColorsForSubMenus(){const t=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let i=0;this.subMenus.forEach(o=>{o.color=t[i],i=t.length-1?i=0:i++})}containPath(t){return this.link===t||!!this.subMenus.find(i=>i.link===t)}static GetClassName(){return"menu"}}kh([v.GetClassConstructor(Zi)],fr.prototype,"subMenus");const xh=Object.freeze(Object.defineProperty({__proto__:null,Menu:fr,SubMenu:Zi},Symbol.toStringTag,{value:"Module"}));let Eh=class extends P.H.BaseStore{constructor(){super(fr,"menus")}};const Bh=new Eh;let Nh=class extends P.H.BaseStore{constructor(){super(Zi,"sub-menus")}};const $h=new Nh,Vh=Object.freeze(Object.defineProperty({__proto__:null,C:xh,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:Bh,SubMenus:$h},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ji{constructor(t){l(this,"id","");l(this,"name","");l(this,"component","");l(this,"order");l(this,"active",!1);l(this,"key",0);v.BuildClass(this,t)}static Create(t,i,o,r,s){const a=new Ji;return a.id=t,a.name=i,a.component=o,a.order=r,a.active=!!s,a}}var Ba=(n=>(n.User="USER",n.Admin="ADMIN",n))(Ba||{});class Ih{constructor(t){l(this,"id");l(this,"name",Ba.User);l(this,"label","");l(this,"startPage","");v.BuildClass(this,t)}}class mr{constructor(t){l(this,"id");l(this,"document",new Ze);l(this,"documentId");l(this,"pageId");v.BuildClass(this,t)}}var Mh=Object.defineProperty,Ph=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Mh(t,i,r),r};class Ki{constructor(t){l(this,"id");l(this,"pageId");l(this,"fileInfoId");l(this,"fileInfo");l(this,"description");v.BuildClass(this,t)}}Ph([v.GetClassConstructor(Ze)],Ki.prototype,"fileInfo");class eo{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"downloadToFile",!1);l(this,"pageSectionId");l(this,"scan",new Ze);l(this,"scanId");v.BuildClass(this,t)}getFileInfos(){return[this.scan]}getFileName(){return this.name?this.name:this.scan.originalName}}var Th=Object.defineProperty,Rh=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Th(t,i,r),r};class _n{constructor(t){l(this,"id");l(this,"name","");l(this,"singleScan",!1);l(this,"scan");l(this,"scanId");l(this,"order",0);l(this,"description","");l(this,"scans",[]);l(this,"scansForDelete",[]);l(this,"pageSectionDocuments",[]);l(this,"pageSideMenuId");l(this,"pageId");l(this,"text","");l(this,"documents",[]);v.BuildClass(this,t),this.documents=this.pageSectionDocuments,this.text=this.description.replace("<p>undefined</p>","")}addDocument(){const t=new eo;t.order=this.pageSectionDocuments.length-1,this.pageSectionDocuments.push(t)}getFileInfos(){const t=[];return this.pageSectionDocuments.forEach(i=>{t.push(...i.getFileInfos())}),t}infoExists(t){const i=ae.SearchIn(this.name,t),o=ae.SearchIn(this.description,t),r=this.getDocuments(t);return i||o||r.length>0}getDocuments(t){return this.pageSectionDocuments.filter(i=>ae.SearchIn(i.name,t))}getDescription(t){return t?ae.WrapSubStr(this.description,t):this.description}filter(t){if(!t){this.text=this.description,this.documents=this.pageSectionDocuments;return}this.text=ae.SearchIn(this.description,t)?ae.WrapSubStr(this.description,t):"",this.documents=this.pageSectionDocuments.filter(i=>ae.SearchIn(i.name,t))}}Rh([v.GetClassConstructor(eo)],_n.prototype,"pageSectionDocuments");var Dh=Object.defineProperty,Ah=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Dh(t,i,r),r};class Yt{constructor(t){l(this,"id");l(this,"name","Новое меню");l(this,"order",0);l(this,"description","");l(this,"routeAnchor","");l(this,"slug","");l(this,"pageSections",[]);l(this,"showContent",!1);l(this,"pageId");l(this,"selected",!1);l(this,"sections",[]);l(this,"text","");v.BuildClass(this,t),this.sections=this.pageSections,this.text=this.description.replace("<p>undefined</p>","")}getFileInfos(){const t=[];return this.pageSections.forEach(i=>{t.push(...i.getFileInfos())}),t}addPageSection(){const t=new _n;t.order=this.pageSections.length+1,t.name=`Новой раздел ${t.order}`,t.id=ve.UUID(),this.pageSections.push(t)}infoExists(t){const i=ae.SearchIn(this.name,t),o=ae.SearchIn(this.description,t),r=this.getPageSections(t).length>0;return i||o||r}getPageSections(t){return t.length?this.pageSections.filter(i=>i.infoExists(t)):this.pageSections}filter(t){t.length?(this.sections=this.pageSections.filter(i=>i.infoExists(t)),this.text=ae.SearchIn(this.description,t)?ae.WrapSubStr(this.description,t):""):(this.sections=this.pageSections,this.text=this.description),this.sections.forEach(i=>i.filter(t))}}Ah([v.GetClassConstructor(_n)],Yt.prototype,"pageSections");var zh=Object.defineProperty,to=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&zh(t,i,r),r};class Fn{constructor(t){l(this,"id");l(this,"title","");l(this,"content","");l(this,"slug","");l(this,"pagesGroup","Без группы");l(this,"link","");l(this,"withComments",!1);l(this,"showContacts",!1);l(this,"collaps",!1);l(this,"showContent",!1);l(this,"pageImages",[]);l(this,"pageImagesForDelete",[]);l(this,"pageImagesNames",[]);l(this,"pageSideMenus",[]);l(this,"menus",[]);l(this,"pageSideMenusForDelete",[]);l(this,"pageSections",[]);l(this,"pageSectionsForDelete",[]);l(this,"pageDocuments",[]);l(this,"contact",new na);l(this,"contactId");l(this,"role",new Ih);l(this,"roleId");l(this,"filterStr","");l(this,"activeMenuId","");v.BuildClass(this,t),this.menus=this.pageSideMenus}getActiveMenu(){const t=this.pageSideMenus.find(i=>i.id===this.activeMenuId);return t||this.pageSideMenus[0]}setActiveMenuId(t){this.activeMenuId=t}getLink(){return this.slug!==""?`/pages/${this.slug}`:"404"}getFileInfos(){const t=[];return this.pageSideMenus.forEach(i=>{t.push(...i.getFileInfos())}),this.pageImages.forEach(i=>{i.fileInfo&&t.push(i.fileInfo)}),t}addSideMenu(){const t=new Yt;return t.order=this.pageSideMenus.length+1,t.name=`Новое меню ${t.order}`,t.id=ve.UUID(),this.pageSideMenus.push(t),t.id}selectSideMenu(t,i){if(!t&&this.pageSideMenus.length>0){this.pageSideMenus[0].selected=!0;return}this.pageSideMenus.forEach(o=>{i?o.selected=o.id===t:o.selected=o.slug===t})}getSelectedSideMenu(){const t=this.pageSideMenus.find(i=>i.selected);return t||new Yt}addCustomSectionsToSideMenu(t){t.forEach(i=>{const o=new Yt;o.id=i.id,o.name=i.name,typeof i.order<"u"?this.pageSideMenus.splice(i.order,0,o):this.pageSideMenus.push(o)})}getPageSideMenus(){if(this.showContacts&&!this.pageSideMenus.find(t=>t.id==="contacts")){const t=new Yt;t.id="contacts",t.name="Контакты",this.pageSideMenus.push(t)}return this.filterStr===""?this.pageSideMenus:this.pageSideMenus.filter(t=>t.infoExists(this.filterStr))}filter(){this.filterStr===""?this.menus=this.pageSideMenus:this.menus=this.pageSideMenus.filter(t=>t.infoExists(this.filterStr)),this.menus.forEach(t=>t.filter(this.filterStr))}static GetClassName(){return"page"}}to([v.GetClassConstructor(Ki)],Fn.prototype,"pageImages"),to([v.GetClassConstructor(Yt)],Fn.prototype,"pageSideMenus"),to([v.GetClassConstructor(_n)],Fn.prototype,"pageSections"),to([v.GetClassConstructor(mr)],Fn.prototype,"pageDocuments");const _h=Object.freeze(Object.defineProperty({__proto__:null,CustomSection:Ji,Page:Fn,PageDocument:mr,PageImage:Ki,PageSection:_n,PageSectionDocument:eo,PageSideMenu:Yt},Symbol.toStringTag,{value:"Module"}));let Fh=class extends P.H.BaseStore{constructor(){super(Ji,"custom-sections")}};const Oh=new Fh;let Lh=class extends P.H.BaseStore{constructor(){super(mr,"page-documents")}};const vh=new Lh;let Hh=class extends P.H.BaseStore{constructor(){super(Ki,"page-images")}};const Uh=new Hh;let qh=class extends P.H.BaseStore{constructor(){super(eo,"page-section-documents")}};const jh=new qh;let Wh=class extends P.H.BaseStore{constructor(){super(_n,"page-sections")}};const Gh=new Wh;let Qh=class extends P.H.BaseStore{constructor(){super(Yt,"page-side-menus")}};const Yh=new Qh;let Xh=class extends P.H.BaseStore{constructor(){super(Fn,"pages")}};const Zh=new Xh,Jh=Object.freeze(Object.defineProperty({__proto__:null,C:_h,S:Object.freeze(Object.defineProperty({__proto__:null,CustomSections:Oh,PageDocuments:vh,PageImages:Uh,PageSectionDocuments:jh,PageSections:Gh,PageSideMenus:Yh,Pages:Zh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ft{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"sessionId");l(this,"payload",{});P.H.Classes.BuildClass(this,t)}static Create(t){const i=new Ft;return i.id=P.H.Id.UUID(),i.scheduleId=t,i.startTime="9:00",i.endTime="9:30",i}}var Kh=Object.defineProperty,ep=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Kh(t,i,r),r};const Na=class Jl{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"slots",[]);P.H.Classes.BuildClass(this,t)}static Create(t){const i=new Jl;return i.id=P.H.Id.UUID(),i.scheduleId=t,i.startTime="9:00",i.endTime="9:30",i}};ep([P.H.Classes.GetClassConstructor(Ft)],Na.prototype,"slots");let On=Na;var tp=Object.defineProperty,$a=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&tp(t,i,r),r};const hr=class Kl{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"scheduleDayId");l(this,"placeId");l(this,"sessions",[]);l(this,"slots",[]);P.H.Classes.BuildClass(this,t)}static Create(t,i){const o=new Kl;return o.id=P.H.Id.UUID(),o.placeId=t,o.scheduleDayId=i,o}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}};$a([P.H.Classes.GetClassConstructor(On)],hr.prototype,"sessions"),$a([P.H.Classes.GetClassConstructor(Ft)],hr.prototype,"slots");let mi=hr;var np=Object.defineProperty,ip=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&np(t,i,r),r};const Va=class ec{constructor(t){l(this,"id");l(this,"date",new Date(0));l(this,"description","");l(this,"ownerId");l(this,"ownerType","");l(this,"schedules",[]);P.H.Classes.BuildClass(this,t)}static Create(t,i,o=new Date){const r=new ec;return r.id=P.H.Id.UUID(),r.ownerId=t,r.ownerType=i||"",r.date=o,r}};ip([P.H.Classes.GetClassConstructor(mi)],Va.prototype,"schedules");let no=Va;class Ln{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"color","");P.H.Classes.BuildClass(this,t)}static Create(){const t=new Ln;return t.id=P.H.Id.UUID(),t}}const op=Object.freeze(Object.defineProperty({__proto__:null,Schedule:mi,ScheduleDay:no,SchedulePlace:Ln,ScheduleSession:On,ScheduleSlot:Ft},Symbol.toStringTag,{value:"Module"})),fe=n=>n?P.H.Time.HMtoM(n):NaN,rt=n=>P.H.Time.ConcatHM(Math.floor(n/60),n%60),vn=n=>{if(!n)return"";const t=P.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},hi=(n,t)=>P.H.Time.DiffM(n,t),pn=(n,t)=>P.H.Time.AddMtoHM(n,t),pr=(n,t)=>{const i=fe(n.startTime),o=fe(t.startTime);return isFinite(i)?isFinite(o)?i-o:-1:1},pi=(n,t)=>{const i=fe(n.startTime),o=fe(n.endTime),r=fe(t.startTime),s=fe(t.endTime);return!isFinite(i)||!isFinite(o)||!isFinite(r)||!isFinite(s)?!1:i<s&&r<o},gi=(n,t)=>Math.round(n/t)*t,Ia=(n,t=8*60,i=20*60)=>{let o=t,r=i;for(const{item:d}of n){const c=fe(d.startTime),u=fe(d.endTime);isFinite(c)&&(o=Math.min(o,c)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(o/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},Ma=(n,t)=>{const i=fe(n.item.startTime),o=fe(n.item.endTime);if(!isFinite(i)||!isFinite(o))return{top:"0%",height:"48px"};const r=(i-t.start)/t.total*100,s=Math.max((o-i)/t.total*100,2.5);return{top:r+"%",height:s+"%"}},Pa=(n,t)=>{const i=fe(n.startTime),o=fe(n.endTime);if(!isFinite(i)||!isFinite(o)||o<=i)return{top:"0%",height:"auto"};const r=o-i,s=fe(t.startTime),a=fe(t.endTime),d=isFinite(s)?Math.max((s-i)/r*100,0):0;let c=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return c=Math.min(Math.max(c,3),100-d),{top:d+"%",height:c+"%"}},Ta=(n,t,i)=>n.some(o=>o.item.id===t.item.id||t.kind==="session"&&o.kind==="slot"&&o.item.sessionId===t.item.id?!1:i(t.item,o.item)),Ra=(n,t,i)=>n.some(o=>o.id!==t.id&&i(t,o)),Da=(n,t,i,o)=>{if(!(!isFinite(t)||!isFinite(i)||i<=t))return(n||[]).find(r=>{const s=o(r.startTime),a=o(r.endTime);return isFinite(s)&&isFinite(a)&&t>=s&&i<=a})},Aa=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",gr={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:"пересечение"},za={createDay(n){return no.Create(void 0,void 0,n)},createSchedule(n,t){return mi.Create(n,t)},createSession(n){const t=(n==null?void 0:n.sessions)||[],i=t[t.length-1],o=(i==null?void 0:i.endTime)||"9:00",r=On.Create(n==null?void 0:n.id);return r.startTime=o,r.endTime=P.H.Time.AddMtoHM(o,30),r},createSlot(n){return Ft.Create(n==null?void 0:n.id)},createPlace(n){const t=Ln.Create();return t.name=n||"",t}},rp={class:"schedule-admin"},sp={key:0,class:"no-days text-center text-grey q-py-xl"},ap={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},lp={key:1,class:"row items-center q-gutter-xs zoom-control"},cp={key:0,class:"grid-view"},dp={key:0,class:"text-grey text-center q-py-lg"},up={class:"grid-header"},fp={class:"row items-center justify-center q-gutter-xs"},mp={class:"ellipsis"},hp={class:"time-gutter"},pp=["data-schedule-id","onDblclick"],gp=["title","onPointerdown","onClick"],yp={class:"block-content"},wp={class:"block-time"},bp={class:"block-name ellipsis"},Sp={key:0,class:"block-speakers ellipsis"},Cp={key:0,class:"session-perfoms"},kp=["title","onPointerdown","onClick"],xp={class:"nested-time"},Ep={class:"nested-name ellipsis"},Bp={key:0,class:"nested-speakers ellipsis"},Np=["title","onPointerdown"],$p={class:"block-actions"},Vp=["title","onPointerdown"],Ip=["title"],Mp={class:"session-spine-name"},Pp={class:"block-time"},Tp={key:0,class:"session-badge"},Rp={key:1,class:"conflict-badge"},Dp={class:"block-name ellipsis"},Ap={class:"text-caption text-grey-6 q-pa-xs"},zp={key:1,class:"list-view"},_p={class:"row items-center q-gutter-sm"},Fp={class:"text-subtitle2"},Op={key:0,class:"sub-block"},Lp={class:"sub-title"},vp={class:"list-row session-row"},Hp={key:0,class:"nested-list"},Up={class:"col-4 ellipsis"},qp={class:"time-text"},jp={class:"sub-block"},Wp={class:"sub-title"},Gp={class:"list-row slot-row"},Qp={key:0,class:"text-grey text-center q-py-sm"},Yp={class:"text-caption text-grey-6 q-mb-sm"},Xp={class:"text-h6"},Zp={class:"row items-center q-gutter-sm q-mb-md"},Jp={key:0,class:"text-grey text-center q-py-md"},Kp={class:"col ellipsis"},eg={class:"text-h6"},tg={class:"row q-col-gutter-sm q-mb-sm"},ng={class:"col-6"},ig={class:"col-6"},gn=15,_a=6,Fa=z(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}},setup(n){var Hl,Ul;const t=n,i=e.computed(()=>({...gr,...t.labels})),o=e.computed(()=>({...za,...t.factories})),r=p=>t.slotListOf?t.slotListOf(p):(p==null?void 0:p.slots)||[],s=p=>t.nestedSlotListOf?t.nestedSlotListOf(p):(p==null?void 0:p.slots)||[],a=p=>(p==null?void 0:p.name)||i.value.hall,d=p=>t.sessionName?t.sessionName(p):(p==null?void 0:p.name)||`${i.value.session} ${(p==null?void 0:p.startTime)||""}–${(p==null?void 0:p.endTime)||""}`.trim(),c=p=>t.slotName?t.slotName(p):(p==null?void 0:p.name)||i.value.slot,u=p=>t.slotSubtitle?t.slotSubtitle(p):"",f=e.ref("grid"),m=e.ref((Ul=(Hl=t.days)==null?void 0:Hl[0])==null?void 0:Ul.id),h=e.ref(!1),w=e.ref(""),y=e.ref(!1),S=e.ref(null),E=e.ref(null),x=e.ref(void 0),V=e.ref(null),k=e.ref(null),T=e.ref(!1),M=e.ref(0),A=e.ref(null),Q=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],se=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch(se,p=>localStorage.setItem("schedule-grid-zoom",String(p)));const _e=e.computed(()=>Math.max(ke.value.total/60*se.value,360)),Ne=e.computed(()=>_e.value+"px"),Se=e.computed(()=>[...t.days||[]].sort((p,g)=>new Date(p.date).getTime()-new Date(g.date).getTime())),he=e.computed(()=>Se.value.find(p=>p.id===m.value));e.watch(()=>Se.value.map(p=>p.id).join(","),()=>{var p;(!m.value||!Se.value.some(g=>g.id===m.value))&&(m.value=(p=Se.value[0])==null?void 0:p.id)});const at=p=>{if(t.dayTitle)return t.dayTitle(p);const g=new Date(p.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},$e=p=>{const g=new Date(p);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},Pt=async(p,g)=>{g&&(p.date=new Date(g),await t.persist.updateDay(p),await t.persist.refresh())},Tt=async p=>{var C;if(!p)return;for(const R of yt(p))await le(R);await t.persist.removeDay(p);const g=(t.days||[]).indexOf(p);g>=0&&t.days.splice(g,1),await t.persist.refresh(),m.value=(C=Se.value[0])==null?void 0:C.id},Ut=async()=>{var q,J;const p=Se.value,g=p[p.length-1],C=g?new Date(new Date(g.date).getTime()+864e5):new Date;let R;try{R=o.value.createDay(C)}catch{t.persist.notify("warning",i.value.saveEventFirst);return}try{await((J=(q=t.persist).createDay)==null?void 0:J.call(q,R));for(const me of t.places||[])await G(me,R);await t.persist.refresh()}catch{t.persist.notify("negative",i.value.createFailed);return}m.value=R.id,t.persist.notify("positive",`${i.value.dayAdded}: ${at(R)}`)},yt=p=>((p==null?void 0:p.schedules)||[]).slice().sort((g,C)=>{const R=Ct(g),q=Ct(C);return R.localeCompare(q,"ru")}),Ct=p=>{if(t.hallName)return t.hallName(p);const g=p.place||(t.places||[]).find(C=>C.id===p.placeId);return(g==null?void 0:g.name)||i.value.hall},it=()=>{h.value=!0},Ce=e.computed(()=>{const p=he.value,g=new Set(((p==null?void 0:p.schedules)||[]).map(C=>C.placeId));return(t.places||[]).filter(C=>!g.has(C.id))}),G=async(p,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(p,g,o.value.createSchedule);return}const C=o.value.createSchedule(p.id,g.id);await t.persist.createSchedule(C)},je=async p=>{h.value=!1;const g=he.value;if(!g){t.persist.notify("warning",i.value.selectDayFirst);return}if(yt(g).some(C=>C.placeId===p.id)){t.persist.notify("warning",i.value.alreadyAdded);return}try{await G(p,g)}catch(C){console.warn("addPlaceToDay failed:",C),t.persist.notify("negative",i.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),m.value=g.id},Rt=async()=>{var C,R,q;const p=(C=w.value)==null?void 0:C.trim();if(!p){t.persist.notify("warning",i.value.enterName);return}const g=o.value.createPlace(p);try{if(!await((q=(R=t.persist).createPlace)==null?void 0:q.call(R,g))){t.persist.notify("negative",i.value.hallCreateFailed);return}}catch(J){console.warn("createPlace failed:",J),t.persist.notify("negative",i.value.hallCreateFailed);return}w.value="",await je(g),t.persist.notify("positive",i.value.hallCreated.replace("{name}",p))},we=async p=>{await le(p);const g=Ye(p);g&&(g.schedules=(g.schedules||[]).filter(C=>C.id!==p.id)),await t.persist.refresh()},le=async p=>{for(const g of p.sessions||[]){for(const C of s(g))await t.persist.removeSlot(C);await t.persist.removeSession(g)}for(const g of r(p))await t.persist.removeSlot(g);await t.persist.removeSchedule(p)},Ye=p=>(t.days||[]).find(g=>(g.schedules||[]).some(C=>C.id===p.id)),Xe=p=>[...s(p)].sort(pr),Gn=p=>(p.sessions||[]).some(g=>s(g).length>0),Je=new WeakMap,qt=p=>{const g=Je.get(p),C=r(p);if(g&&g.src===C)return g.list;const R=new Set((p.sessions||[]).map(J=>J.id)),q=C.filter(J=>!J.sessionId||!R.has(J.sessionId));return Je.set(p,{src:C,list:q}),q},Te=p=>[...(p.sessions||[]).map(g=>({kind:"session",item:g})),...qt(p).map(g=>({kind:"slot",item:g}))],wn=p=>(p.sessions||[]).map(g=>({kind:"session",item:g})),ke=e.computed(()=>{var g,C;const p=(((g=he.value)==null?void 0:g.schedules)||[]).flatMap(R=>Te(R));for(const R of((C=he.value)==null?void 0:C.schedules)||[])for(const q of R.sessions||[])p.push(...Xe(q).map(J=>({kind:"slot",item:J})));return Ia(p)}),Ke=e.computed(()=>{const p=[];for(let g=ke.value.start;g<=ke.value.end;g+=60)p.push({min:g,label:rt(g)});return p}),ee=e.computed(()=>{const p=[];for(let g=ke.value.start+30;g<ke.value.end;g+=60)p.push({min:g,label:rt(g)});return p}),Re=p=>Ma(p,ke.value),lt=e.computed(()=>{if(!V.value||!E.value)return{};const p=ke.value,g=(V.value.minutes-p.start)/p.total*100,C=Math.max(E.value.duration/p.total*100,2.5);return{top:g+"%",height:C+"%"}}),ct=e.computed(()=>!V.value||!E.value?"":rt(V.value.minutes+E.value.duration)),bn=e.computed(()=>{if(!V.value)return{};const p=ke.value,g=(V.value.minutes-p.start)/p.total*100,C=Math.max(gn/p.total*100,1.5);return{top:g+"%",height:C+"%"}}),kt=e.computed(()=>{var q,J,me,Me,De;if(!V.value||!E.value||!E.value.id)return 0;const p=Si(V.value.scheduleId);if(!p)return 0;const g={startTime:V.value.time,endTime:ct.value},C=(q=V.value.session)==null?void 0:q.id;let R=0;for(const D of Te(p))D.item.id!==((J=E.value)==null?void 0:J.id)&&(((me=E.value)==null?void 0:me.kind)==="slot"&&D.kind==="session"&&D.item.id===C||pi(g,D.item)&&R++);if(((Me=E.value)==null?void 0:Me.kind)==="slot"&&V.value.session)for(const D of Xe(V.value.session))D.id!==((De=E.value)==null?void 0:De.id)&&pi(g,D)&&R++;return R}),Dt=e.computed(()=>kt.value>0),wo=(p,g)=>Ta(Te(p),g,pi),Fr=(p,g)=>Ra(Xe(p),g,pi),Or=(p,g)=>Pa(p,g),Sn=p=>{const g=ke.value,C=fe(p.item.startTime),R=fe(p.item.endTime);return!isFinite(C)||!isFinite(R)?48:(R-C)/g.total*_e.value},Qn=p=>Aa(Sn(p)),Lr=p=>{const g=t.slotName?t.slotName(p.item):p.item.name||(p.kind==="session"?i.value.session:i.value.slot);if(p.kind==="slot"&&Qn(p)!=="h-full"){const C=u(p.item);if(C)return`${g} — ${C}`}return g},vr=(p,g)=>{const C=c(p);if(g!=="h-full"){const R=u(p);if(R)return`${C} — ${R}`}return C},bi=p=>{const g=`${p.item.startTime||"?"}–${p.item.endTime||"?"}`;if(p.kind==="slot"){const C=u(p.item);return[c(p.item),g,C?`${i.value.participants}: ${C}`:""].filter(Boolean).join(`
21
+ `,a+1),c=d===-1?"":s.slice(d+1);String(i.stack).endsWith(c)||(i.stack+=`
22
+ `+s)}}catch{}}throw i}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=rn(this.defaults,o);const{transitional:i,paramsSerializer:r,headers:s}=o;i!==void 0&&Go.assertOptions(i,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean),legacyInterceptorReqResOrdering:Ge.transitional(Ge.boolean),advertiseZstdAcceptEncoding:Ge.transitional(Ge.boolean),validateStatusUndefinedResolves:Ge.transitional(Ge.boolean)},!1),r!=null&&(b.isFunction(r)?o.paramsSerializer={serialize:r}:Go.assertOptions(r,{encode:Ge.function,serialize:Ge.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Go.assertOptions(o,{baseUrl:Ge.spelling("baseURL"),withXsrfToken:Ge.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&b.merge(s.common,s[o.method]);s&&b.forEach(["delete","get","head","post","put","patch","query","common"],y=>{delete s[y]}),o.headers=We.concat(a,s);const d=[];let c=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(o)===!1)return;c=c&&S.synchronous;const B=o.transitional||Li;B&&B.legacyInterceptorReqResOrdering?d.unshift(S.fulfilled,S.rejected):d.push(S.fulfilled,S.rejected)});const u=[];this.interceptors.response.forEach(function(S){u.push(S.fulfilled,S.rejected)});let f,m=0,h;if(!c){const y=[ta.bind(this),void 0];for(y.unshift(...d),y.push(...u),h=y.length,f=Promise.resolve(o);m<h;)f=f.then(y[m++],y[m++]);return f}h=d.length;let w=o;for(;m<h;){const y=d[m++],S=d[m++];try{w=y(w)}catch(B){S.call(this,B);break}}try{f=ta.call(this,w)}catch(y){return Promise.reject(y)}for(m=0,h=u.length;m<h;)f=f.then(u[m++],u[m++]);return f}getUri(t){t=rn(this.defaults,t);const o=qs(t.baseURL,t.url,t.allowAbsoluteUrls,t);return zs(o,t.params,t.paramsSerializer)}};b.forEach(["delete","get","head","options"],function(t){sn.prototype[t]=function(o,i){return this.request(rn(i||{},{method:t,url:o,data:i&&b.hasOwnProp(i,"data")?i.data:void 0}))}}),b.forEach(["post","put","patch","query"],function(t){function o(i){return function(s,a,d){return this.request(rn(d||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}sn.prototype[t]=o(),t!=="query"&&(sn.prototype[t+"Form"]=o(!0))});let Bu=class nc{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(d=>{i.subscribe(d),s=d}).then(r);return a.cancel=function(){i.unsubscribe(s)},a},t(function(s,a,d){i.reason||(i.reason=new oo(s,a,d),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 nc(function(r){t=r}),cancel:t}}};function Nu(n){return function(o){return n.apply(null,o)}}function $u(n){return b.isObject(n)&&n.isAxiosError===!0}const Gi={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(Gi).forEach(([n,t])=>{Gi[t]=n});function oa(n){const t=new sn(n),o=ws(sn.prototype.request,t);return b.extend(o,sn.prototype,t,{allOwnKeys:!0}),b.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return oa(rn(n,r))},o}const Be=oa(no);Be.Axios=sn,Be.CanceledError=oo,Be.CancelToken=Bu,Be.isCancel=Ls,Be.VERSION=ji,Be.toFormData=Uo,Be.AxiosError=O,Be.Cancel=Be.CanceledError,Be.all=function(t){return Promise.all(t)},Be.spread=Nu,Be.isAxiosError=$u,Be.mergeConfig=rn,Be.AxiosHeaders=We,Be.formToJSON=n=>Os(b.isHTMLForm(n)?new FormData(n):n),Be.getAdapter=ea.getAdapter,Be.HttpStatusCode=Gi,Be.default=Be;const{Axios:Zb,AxiosError:Jb,CanceledError:Kb,isCancel:eS,CancelToken:tS,VERSION:nS,all:oS,Cancel:iS,isAxiosError:rS,spread:sS,toFormData:aS,AxiosHeaders:lS,HttpStatusCode:cS,formToJSON:dS,getAdapter:uS,mergeConfig:fS,create:mS}=Be;var io=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(io||{});const ro=(()=>{function n(){const c=r();return!(!c||c==="undefined")}function t(c){c.accessToken&&localStorage.setItem("access_token",c.accessToken),c.refreshToken&&localStorage.setItem("refresh_token",c.refreshToken)}function o(){const c=localStorage.getItem("user");return c?JSON.parse(c).id:""}function i(){const c=localStorage.getItem("user");if(c)return JSON.parse(c)}function r(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function d(c){if(!n())return;const u=ro.getUser();u&&(u.human=c,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:t,getAccessToken:r,getRefreshToken:s,getUserId:o,clearTokens:a,getUser:i,updateHuman:d}})();class Qi{constructor(t){l(this,"code",400);l(this,"err","");H.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=ro.getAccessToken(),t.config.headers.token=ro.getAccessToken(),t.config.baseURL=void 0,o.request(i);if(t.response.status>=500){if(t.response.data==="неверный логин или пароль"){Bn.Error("Неверный логин или пароль");return}Bn.Error("Ошибка на сервере, попробуйте позже")}if(t.response.status>=400&&t.response.status<500){const r=new Qi(t.response.data).getErr();r&&Bn.Error(r)}return Promise.reject(t)}}}const Mn=Be.create();Mn.interceptors.response.use(n=>n,async n=>await Qi.Handle(n,Mn));class so{static async Get(t,o,i){return await Mn({method:io.GET,url:t,headers:o,responseType:i})}static async Post(t,o,i,r){return o["Content-Type"]="multipart/form-data",await Mn({method:io.POST,url:t,headers:o,responseType:i,data:r})}static async Put(t,o,i){return o["Content-Type"]="multipart/form-data",await Mn({method:io.PUT,url:t,headers:o,data:i})}static async Delete(t,o){return await Mn({method:io.DELETE,url:t,headers:o})}}class Qo{constructor(t){l(this,"name","");H.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),d=s.getTime()-a.getTime();return Math.round(d/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 Yi=(n=>(n.ContentType="Content-Type",n.Token="token",n))(Yi||{}),ia=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(ia||{});const ye=class ye{static Setup(t="http://localhost",o,i="api"){this.baseUrl=ae.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=ye.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=Et.Get(ft.AccessToken);return t||(t=ye.headers),o&&(t[Yi.Token]=o),t??ye.headers}static returnResponse(t,o){if(o)return t!=null&&t.isBlob?ye.download(t.downloadFileName,o):o.data}static async Get(t){return ye.returnResponse(t,await so.Get(ye.buildUrl((t==null?void 0:t.query)??""),ye.getHeaders(t==null?void 0:t.headers),ye.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return ye.returnResponse(t,await so.Post(ye.buildUrl(t==null?void 0:t.query),ye.getHeaders(t==null?void 0:t.headers),ye.getResponseType(t.isBlob),ye.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return ye.returnResponse(t,await so.Put(ye.buildUrl(t==null?void 0:t.query),ye.getHeaders(t==null?void 0:t.headers),ye.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return ye.returnResponse(t,await so.Delete(ye.buildUrl(t==null?void 0:t.query),ye.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:o}=t;return new EventSource(ye.buildUrl(o))}static buildUrl(t=""){try{return Vi(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}};l(ye,"baseUrl",""),l(ye,"apiVersion","api"),l(ye,"host",""),l(ye,"headers",{[Yi.ContentType]:ia.ApplicationJson});let Ee=ye;const z=(n,t)=>{const o=n.__vccOpts||n;for(const[i,r]of t)o[i]=r;return o},Vu={},Pu={style:{"text-align":"center"}};function Tu(n,t){return e.openBlock(),e.createElementBlock("div",Pu,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const ra=z(Vu,[["render",Tu]]),Iu=[{path:"/:pathMatch(.*)*",name:"NotFound",component:ra}],gt=class gt{static Setup(t,o=""){this.router=t,this.title=o,this.ChangeDocumentTitle(),this.AddRoutes(Iu)}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 gt.GetStringParam("id")}static Slug(){return gt.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return gt.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=gt.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 gt.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)}};l(gt,"router"),l(gt,"title",""),l(gt,"ChangeDocumentTitle",(t="")=>{let o=gt.Route().meta.title??t;o&&(o=" | "+o),document.title=gt.title+o});let Bt=gt;class ue{constructor(t,o){l(this,"items",e.reactive([]));l(this,"item");l(this,"options",e.reactive([]));l(this,"count",e.ref(0));l(this,"classConstructor");l(this,"url","");l(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 Ee.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=Ee.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 Ee.Get({query:this.getUrl(t)}))}catch(o){console.warn("Get failed:",o)}}async GetBySlug(t){try{t||(t=Bt.Slug()),this.Set(await P.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)??_t.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await Ee.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 Ee.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 Ee.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 Ee.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(){H.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=>P.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 Mu(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const Ru=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class Du{static GetRandColor(t){return At.GetRandEL(t??Ru)}}function sa(n,t){const o=[],i=t||mt.Asc,r=i===mt.Asc?mt.Desc:mt.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 zu=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",Xn.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",Io[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=Io[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return At.GenerateNumsRange(this.startHour,this.endHour)}};const Xi=n=>n===8||n===46,Au=n=>n>46&&n<58,_u=n=>n>34&&n<41,Fu=n=>n+".",Ou=(n,t,o)=>{Xi(t)||_u(t)||(!Au(t)||o>9)&&n.preventDefault()};function Lu(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 Hu(n){const t=n.keyCode;let o=n.srcElement.value;const i=o.length;Ou(n,t,i),!Xi(t)&&(i===2||i===5)&&(o=Fu(o));const r=n.srcElement.value+String.fromCharCode(n.which);if(Xi(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=Lu(o,i),n.srcElement.value=o}const Uu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],vu="ru-RU";class Wt{constructor(){l(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?Uu[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(),d=s.getMinutes();return`${a}:${d}`}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 ju{constructor(){l(this,"dragged",!1);l(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 aa{static Get(t){const o=t.split(".");return o[o.length-1]}}const qu=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function t(s,a){const d=localStorage.getItem(`${s}_favourite`);return d?d.split(",").includes(a):!1}function o(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d){n(s,[a]);return}const c=d.split(",");c.push(a),n(s,c)}function i(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d)return;const c=d.split(",").filter(u=>u!==a);n(s,c)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:o,removeFromFavourite:i,setFavourite:n,isFavourite:t,clearFavourite:r}})();class Wu{constructor(){l(this,"list",[]);l(this,"defaultSortModel");l(this,"changeFlag",!1)}Set(t){this.Reset(),t&&(Array.isArray(t)?this.list=t:this.list=sa(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 an=new Wu;function Gu(){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 Qu=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{P.F.FTSP.Get().reset(),an.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:o}=Gu(),i=s=>uc.onBeforeRouteLeave((a,d,c)=>{o((s||r)(),c)}),r=s=>async()=>{t.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:i,submit:r}})();function la(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 Zi{constructor(){l(this,"items",[]);l(this,"idx",0);l(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 Zi;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 bi=class bi{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*)?$/}};l(bi,"validatePhone",(t,o,i)=>{bi.getPhoneRegExp().test(o)||!o?i():i(new Error("Пожалуйста, введите корректный номер телефона"))});let Ji=bi;class Yu{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 Xu{static async Auth(t){t&&t()}static Dev(){}}class Zu{constructor(){l(this,"startHour",9);l(this,"startHM",`${this.startHour}:00`);l(this,"endHour",19);l(this,"endHM",`${this.endHour}:00`);l(this,"timelinePxHeight",50);l(this,"timelineStep",Xn.FiveMinutes);l(this,"timelines",Io[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=Io[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return At.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 Ju=-68;function Ku(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const o=document.querySelector(n),i=t??Ju;let r=0;o&&(r=o.getBoundingClientRect().top+i+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class ef{static Sort(t){t.forEach((o,i)=>o.order=i)}}class Yo{static Wait(t,o){return new Promise(i=>setTimeout(()=>i(o),t))}static WaitS(t,o){return Yo.Wait(ie.S(t),o)}static WaitM(t,o){return Yo.Wait(ie.M(t),o)}}function tf(n,t){let o=!0;return n.value.validate(i=>(i||(o=!1),o)),o}const nf=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})});let of=class is{constructor(t){l(this,"id");l(this,"message","");l(this,"userName");l(this,"createdOn",new Date);l(this,"chatId");l(this,"type","message");H.BuildClass(this,t)}static Create(t,o,i,r){const s=new is;return s.id=qt(),s.chatId=t,s.message=i,s.userName=r,s}static CreatePingMessage(){const t=new is;return t.type="ping",t.id=qt(),t}isMessage(){return this.type==="message"||this.type===""}};const rf="";class sf{constructor(t="",o="",i="set"){l(this,"client");l(this,"endpoint","");l(this,"query","");l(this,"period",2e4);H.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(of.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,rf.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 af=(re=class{},l(re,"Arrays",At),l(re,"Axios",so),l(re,"BaseStore",ue),l(re,"Cache",Qo),l(re,"Classes",H),l(re,"CarouselSwipe",Mu),l(re,"Color",Du),l(re,"CreateSortModels",sa),l(re,"Cursor",zu),l(re,"DateMask",Hu),l(re,"Dates",Wt),l(re,"Dragger",ju),l(re,"Extension",aa),l(re,"Favourite",qu),l(re,"Hooks",Qu),l(re,"HttpClient",Ee),l(re,"Id",He),l(re,"MakeCarousel",la),l(re,"Period",Ni),l(re,"PhoneService",Ji),l(re,"Rating",Yu),l(re,"Router",Bt),l(re,"RouterGuard",Xu),l(re,"Scheduler",Zu),l(re,"Scroll",Ku),l(re,"Sorter",ef),l(re,"Static",Pi),l(re,"Strings",ae),l(re,"Time",ie),l(re,"Timer",Yo),l(re,"Token",ro),l(re,"Menus",Zi),l(re,"validate",tf),l(re,"WaitElement",nf),l(re,"WebSocketClient",sf),re);class lf{constructor(){l(this,"limit",25);l(this,"count",0);l(this,"curPage",1);l(this,"storeModule","")}setCurPage(t){this.curPage=t}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const ca=new lf;var da=(n=>(n.TableList="tableList",n.Default="",n))(da||{}),Nt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Nt||{}),ua=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(ua||{}),fa=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(fa||{}),Ki=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Ki||{});const cf=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:da,Animations:Nt,CalendarScale:ua,LocalStoreKeys:ft,SocialTypes:fa,ValueRelation:Ki},Symbol.toStringTag,{value:"Module"}));let df=class{async Login(t=Oe.Form.GetValues()){const o=await Ee.Post({query:"auth/login",payload:t});if(!o)throw"Ошибка авторизации";Oe.Status.SetState(o)}async LoginAs(t){await Ee.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=Oe.Form.GetValues()){const o=await Ee.Post({query:"auth/register",payload:t});if(!o)throw o}async RestorePassword(t=Oe.Form.GetValues()){await Ee.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=Oe.Form.GetValues()){t.id=Bt.GetStringParam("userId"),await Ee.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await Ee.Post({query:"auth/refresh-token",payload:{refreshToken:ro.getRefreshToken()}})}async CheckUuid(t){await Ee.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await Ee.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await Ee.Get({query:`auth/email-is-confirm/${t}`})}};const uf=new df;var ff=Object.defineProperty,Xo=(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&&ff(t,o,r),r};const ao=class oc{constructor(t){l(this,"id");l(this,"description","");l(this,"time","");l(this,"latitude","");l(this,"longitude","");l(this,"emails",[]);l(this,"postAddresses",[new Mo]);l(this,"phones",[]);l(this,"websites",[]);H.BuildClass(this,t)}addEmail(){const t=en.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=tn.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new oc;return t.id=He.UUID(),t}removeEmail(t){H.RemoveFromClassById(t,this.emails)}removePhone(t){H.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new Mo)}addWebsite(){this.websites.push(new Ti)}pushFirst(){this.emails.length||this.emails.push(new en),this.phones.length||this.phones.push(new tn)}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}};Xo([H.GetClassConstructor(en)],ao.prototype,"emails"),Xo([H.GetClassConstructor(Mo)],ao.prototype,"postAddresses"),Xo([H.GetClassConstructor(tn)],ao.prototype,"phones"),Xo([H.GetClassConstructor(Ti)],ao.prototype,"websites");let ma=ao,mf=class extends ue{constructor(){super(ma,"contacts")}};const hf=new mf;let pf=class extends ue{constructor(){super(en,"emails")}};const gf=new pf;class er{constructor(t){l(this,"id");l(this,"ftsp");l(this,"name","");H.BuildClass(this,t)}static Create(t){const o=new er;return o.id=He.UUID(),o.ftsp=JSON.stringify(t),o}}let yf=class extends ue{constructor(){super(er,"ftsp-presets")}};const wf=new yf;let bf=class extends ue{constructor(){super(ps,"humans")}};const Sf=new bf;let Cf=class extends ue{constructor(){super(tn,"phones")}};const kf=new Cf;class xf{constructor(t){l(this,"id");l(this,"nameRus","");H.BuildClass(this,t)}}var Ef=Object.defineProperty,Bf=(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&&Ef(t,o,r),r};class ha{constructor(t){l(this,"id");l(this,"nameRus","");l(this,"fields",[]);H.BuildClass(this,t)}}Bf([H.GetClassConstructor(xf)],ha.prototype,"fields");let Nf=class extends ue{constructor(){super(ha,"schemas")}};const $f=new Nf;class pa{constructor(t){l(this,"id","");l(this,"value","");l(this,"label","");l(this,"key","");l(this,"description","");l(this,"route","");l(this,"searchElementMetas",[]);H.BuildClass(this,t)}}class Vf{constructor(t){l(this,"id");l(this,"name","");l(this,"label","");H.BuildClass(this,t)}}var Pf=Object.defineProperty,ga=(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&&Pf(t,o,r),r};class Rn{constructor(t){l(this,"id");l(this,"key","");l(this,"label","");l(this,"order",0);l(this,"route","");l(this,"table","");l(this,"active",!0);l(this,"searchColumn","");l(this,"descriptionColumn","");l(this,"labelColumn","");l(this,"valueColumn","");l(this,"options",[]);l(this,"searchGroupMetaColumns",[]);H.BuildClass(this,t)}}ga([H.GetClassConstructor(pa)],Rn.prototype,"options"),ga([H.GetClassConstructor(Vf)],Rn.prototype,"searchGroupMetaColumns");class tr{constructor(t){l(this,"query","");l(this,"key","");l(this,"params","");l(this,"suggester",!1);l(this,"mustBeTranslated",!0);l(this,"options",[]);l(this,"searchGroupId","");l(this,"searchGroups",[]);l(this,"searchGroup",new Rn);l(this,"searchObjects",[]);l(this,"pagination",new zo);l(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(o=>new Rn(o))),t.searchGroup&&(this.searchGroup=new Rn(t.searchGroup)),t.options&&(this.options=t.options.map(o=>new pa(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 Rn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Bt.Route().query.groupId)}setQuery(){const t=Bt.Route().query.query;t&&(this.query=t)}}let Tf=class{constructor(){l(this,"isSearchDrawerOpen",e.ref(!1));l(this,"searchModel",e.reactive(new tr));l(this,"searchGroups",e.reactive([]));l(this,"count",0)}async Search(t){const o=await Ee.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 Ee.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(i=>{i.options=[]});const o=await Ee.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(o),o}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new tr}SetSearchModel(t){t&&(this.searchModel=new tr(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const nr=new Tf;let If=class extends ue{constructor(){super(Ro,"users-accounts")}};const Mf=new If;var Qe=(n=>(n.String="string",n.Text="text",n.Number="number",n.Date="date",n.DateTime="dateTime",n.Radio="radio",n.Set="set",n.Boolean="boolean",n.Files="files",n.File="file",n.MatrixRadio="matrixRadio",n.MatrixSet="matrixSet",n))(Qe||{});class ya{constructor(t){l(this,"id");l(this,"name",Qe.String);l(this,"valueRelation",Ki.simple);H.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===Qe.Radio)return"RadioProp";if(this.name===Qe.Set)return"SetProp";if(this.name===Qe.Number)return"NumberProp";if(this.name===Qe.String)return"StringProp"}}let Rf=class extends ue{constructor(){super(ya,"value-types")}};const Df=new Rf;let wa=(at=class{},l(at,"Auth",uf),l(at,"Contacts",hf),l(at,"Emails",gf),l(at,"FileInfos",new ue(Ze,"file-infos")),l(at,"FTSPPresets",wf),l(at,"Humans",Sf),l(at,"Phones",kf),l(at,"Schemas",$f),l(at,"UserAccounts",Mf),l(at,"ValueTypes",Df),l(at,"Search",nr),at);var Gt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(Gt||{});let zf=(Jt=class{},l(Jt,"Orders",mt),l(Jt,"Sizes",Gt),l(Jt,"Statuses",ge),l(Jt,"DataTypes",ze),l(Jt,"ValueTypes",Qe),l(Jt,"Operators",xe),Jt);class Af{constructor(){l(this,"title","");l(this,"buttons",[]);l(this,"editTitle",e.ref(!1));l(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 _f=new Af;class Ff{constructor(){l(this,"menu",[]);l(this,"path","");l(this,"isOpen",!0);l(this,"filterString","")}Set(t){this.menu=t}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(t=>{var o;return ae.SearchIn(t.name,this.filterString)||((o=t.children)==null?void 0:o.some(i=>ae.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=>ae.SearchIn(i.name,this.filterString)):t.children}}const Of=new Ff;class Lf{constructor(){l(this,"Menu",e.reactive(Of));l(this,"Head",e.reactive(_f))}}const Hf=new Lf,ba="Да",Sa="Нет";class Uf extends En{constructor(){super(...arguments);l(this,"confirmButtonText",ba);l(this,"cancelButtonText",Sa);l(this,"persistent",!0);l(this,"resolve");l(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??ba,this.cancelButtonText=i.cancelButtonText??Sa,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:En.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 Uf;class jf{constructor(){l(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class qf extends jf{Show(){super.show()}Hide(){super.hide()}}const Wf=new qf;class Qt{}l(Qt,"Admin",Hf),l(Qt,"Dialog",vf),l(Qt,"Loading",Wf),l(Qt,"Notify",Bn),l(Qt,"Btn",Kt),l(Qt,"Input",as);class P{}l(P,"Auth",e.reactive(Oe)),l(P,"UI",e.reactive(Qt)),l(P,"Paginator",e.reactive(ca)),l(P,"S",wa),l(P,"H",af),l(P,"C",Tc),l(P,"T",zf),l(P,"I",cf),l(P,"F",zc);class Ca{constructor(t){l(this,"id");l(this,"name","");l(this,"address","");l(this,"number");l(this,"building");l(this,"buildingId");P.H.Classes.BuildClass(this,t),this.setName()}setName(){this.building&&(this.name=this.building.address+", вход "+this.number,this.address=this.name)}getBuildingNumber(){var t;return String((t=this.building)==null?void 0:t.number)}getEntranceNumber(){return String(this.number)}}class ka{constructor(t){l(this,"id");l(this,"number");l(this,"buildingId");P.H.Classes.BuildClass(this,t)}}var Gf=Object.defineProperty,xa=(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&&Gf(t,o,r),r};class Zo{constructor(t){l(this,"id");l(this,"number","");l(this,"address","");l(this,"name","");l(this,"status","");l(this,"description","");l(this,"floors",[]);l(this,"entrances",[]);P.H.Classes.BuildClass(this,t)}}xa([P.H.Classes.GetClassConstructor(ka)],Zo.prototype,"floors"),xa([P.H.Classes.GetClassConstructor(Ca)],Zo.prototype,"entrances");const Qf=Object.freeze(Object.defineProperty({__proto__:null,Building:Zo,Entrance:Ca,Floor:ka},Symbol.toStringTag,{value:"Module"}));let Yf=class extends ue{constructor(){super(Zo,"buildings")}};const Xf=new Yf,Zf=Object.freeze(Object.defineProperty({__proto__:null,C:Qf,S:Object.freeze(Object.defineProperty({__proto__:null,BuildingsStore:Xf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Dn=(n=>(n.Ping="ping",n.Enter="enter",n.Exit="exit",n.Message="message",n.Write="write",n.Empty="",n))(Dn||{});class ln{constructor(t){l(this,"id");l(this,"userId");l(this,"chatId");l(this,"message","");l(this,"fileInfo",new P.C.FileInfo);l(this,"createdAt",new Date);l(this,"type",Dn.Message);H.BuildClass(this,t)}static Create(t,o,i){const r=new ln;return r.id=P.H.Id.UUID(),r.chatId=o,r.userId=i,r.message=t,r}static CreatePingMessage(){const t=new ln;return t.type=Dn.Ping,t.id=P.H.Id.UUID(),t}isMessage(){return this.type===Dn.Message||this.type===Dn.Empty}}var Jf=Object.defineProperty,Kf=(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&&Jf(t,o,r),r};const Ea=class ic{constructor(t){l(this,"id");l(this,"name","");l(this,"createdAt",new Date);l(this,"newMesage","");l(this,"userId","");l(this,"chatMessages",[]);P.H.Classes.BuildClass(this,t)}static Create(){const t=new ic;return t.id=P.H.Id.UUID(),t}addMessage(){if(this.newMesage==="")return;const t=ln.Create(this.newMesage,this.id,this.userId);return this.chatMessages.push(t),this.newMesage="",t}};Kf([P.H.Classes.GetClassConstructor(ln)],Ea.prototype,"chatMessages");let Ba=Ea;const em=Object.freeze(Object.defineProperty({__proto__:null,Chat:Ba,ChatMessage:ln},Symbol.toStringTag,{value:"Module"}));let tm=class extends ue{constructor(){super(ln,"chat-messages")}};const nm=new tm;let om=class extends ue{constructor(){super(Ba,"chats")}};const im=new om,rm=Object.freeze(Object.defineProperty({__proto__:null,C:em,S:Object.freeze(Object.defineProperty({__proto__:null,ChatMessages:nm,Chats:im},Symbol.toStringTag,{value:"Module"})),T:(Qr=class{},l(Qr,"ChatMessage",Dn),Qr)},Symbol.toStringTag,{value:"Module"})),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:ge.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 E={};for(const V of Object.keys(o))["disable","color","size","flat","outline","unelevated","type"].includes(V)||(E[V]=o[V]);return E}),r=["submit","button","reset"],s=e.computed(()=>r.includes(t.type)),a=e.computed(()=>s.value?t.type:void 0),d=e.computed(()=>s.value?ge.Primary:t.type),c=e.computed(()=>{const E={};return t.margin&&(E.margin=t.margin),t.padding&&(E.padding=t.padding),t.width&&(E.maxWidth=t.width,E.minWidth=t.width),t.height&&(E.minHeight=t.height,E.maxHeight=t.height),t.fontSize&&(E.fontSize=t.fontSize),E}),u={[ge.Primary]:"primary",[ge.Success]:"positive",[ge.Warning]:"warning",[ge.Error]:"negative",[ge.Info]:"info"},f=e.computed(()=>o.color!==void 0?o.color:u[d.value]??"primary"),m={[Gt.XS]:"xs",[Gt.S]:"sm",[Gt.M]:"md",[Gt.L]:"lg",[Gt.XL]:"xl"},h=e.computed(()=>o.size!==void 0?o.size:["xs","sm","md","lg","xl"].includes(t.size)?t.size:m[t.size]??"md"),w=e.computed(()=>o.flat!==void 0?o.flat:["text","pag","text_ano"].includes(t.skin)),y=e.computed(()=>o.outline!==void 0?o.outline:t.skin==="invert"),S=e.computed(()=>o.unelevated!==void 0?o.unelevated:t.skin==="base"),B=e.computed(()=>o.disable??t.disabled);return(E,V)=>(e.openBlock(),e.createBlock(e.unref(x.QBtn),e.mergeProps(e.unref(i),{style:e.unref(c),color:e.unref(f),size:e.unref(h),flat:e.unref(w),outline:e.unref(y),unelevated:e.unref(S),disable:e.unref(B),type:e.unref(a),"no-wrap":""}),{default:e.withCtx(()=>[e.renderSlot(E.$slots,"default"),e.createTextVNode(" "+e.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),sm=["innerHTML"],am={key:1},or=z(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,sm)):(e.openBlock(),e.createElementBlock("span",am,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),nt=z(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 c={};for(const u of Object.keys(o))u!=="delay"&&(c[u]=o[u]);return c}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=e.computed(()=>{const c=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"top":"bottom"} ${c}`}),a=e.computed(()=>{const c=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"bottom":"top"} ${c}`}),d=e.computed(()=>({background:r[t.typeStyle],whiteSpace:"pre",height:t.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(c,u)=>n.tooltipText?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},e.unref(i),{class:"tooltip-wrapper"}),[e.renderSlot(c.$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(d))},{default:e.withCtx(()=>[e.createVNode(or,{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(c.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),$t={title:"Контактная информация",phonesTitle:"Телефоны",emailsTitle:"Электронная почта",addPhone:"Добавить телефон",addEmail:"Добавить email",noPhones:"Нет телефонных номеров",noEmails:"Нет email адресов",copied:"Скопировано в буфер обмена",copiedNumber:"Номер скопирован в буфер обмена",copiedEmail:"Email скопирован в буфер обмена",saved:"Сохранено",deleted:"Удалено",enterPhone:"Введите номер телефона",enterEmail:"Введите email адрес"},Je=z(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),d=e.computed(()=>{const y={};for(const S of Object.keys(s))S!=="id"&&S!=="disable"&&(y[S]=s[S]);return y}),c=n,u=e.computed(()=>s.disable??c.disabled),f=e.ref(null);function m(){var y;(y=f.value)==null||y.focus()}t({focus:m});const h=()=>{i("input",r.value)},w=e.computed(()=>{const y={};return c.margin&&(y.margin=c.margin),c.padding&&(y.padding=c.padding),c.width&&(y.width=c.width),c.borderColor&&(y["--p-border-color"]=c.borderColor),y});return(y,S)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=B=>r.value=B)},e.unref(d),{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(w),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":h,onBlur:S[1]||(S[1]=B=>y.$emit("blur",r.value)),onFocus:S[2]||(S[2]=B=>y.$emit("focus",r.value)),onClear:S[3]||(S[3]=B=>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-c4acf8be"]]),cn=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"]))}}),lm={class:"q-mb-md"},cm={class:"text-subtitle1 text-weight-medium text-grey-9"},dm={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=e.useModel(n,"modelValue");return(o,i)=>{const r=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:t.value,"onUpdate:modelValue":i[1]||(i[1]=s=>t.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",lm,[e.createVNode(e.unref(x.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",cm,e.toDisplayString(n.title),1),e.createElementVNode("div",dm,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),[[r]]),e.createVNode(oe,{unelevated:"",label:"Удалить",color:"negative",loading:n.loading,"no-caps":"",onClick:i[0]||(i[0]=s=>o.$emit("confirm"))},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}}}),um={class:"q-mr-md"},fm={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=e.useModel(n,"modelValue");return(o,i)=>{const r=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:t.value,"onUpdate:modelValue":i[1]||(i[1]=s=>t.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",um,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",fm,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),[[r]])]),_:1}),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(o.$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),[[r]]),e.createVNode(oe,{unelevated:"",label:"Сохранить",color:"primary",loading:n.saving,"no-caps":"",onClick:i[0]||(i[0]=s=>o.$emit("save"))},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["modelValue"])}}}),mm={class:"q-mt-sm"},hm={class:"row items-center justify-between q-mb-xs q-px-xs"},pm={class:"row items-center q-gutter-xs"},gm={class:"text-uppercase text-caption text-weight-medium text-grey-7"},ym={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},wm={style:{"min-width":"0"}},bm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},Sm={key:0,class:"text-caption text-grey-6 ellipsis"},Cm={class:"row items-center no-wrap q-gutter-xs"},km={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},xm={class:"text-body2 text-grey-7"},dn=z(e.defineComponent({__name:"PContactFormViewEmails",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...$t,...t.labels})),i=e.computed(()=>t.adapter.emails(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),d=e.ref(""),c=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),h=e.ref(!1),w=e.ref(-1),y=async M=>{M&&(await navigator.clipboard.writeText(M),P.UI.Notify.Success(o.value.copiedEmail))},S=M=>{var I,A;s.value=M,a.value=i.value[M],d.value=t.adapter.emailValue(i.value[M]),c.value=((A=(I=t.adapter).emailDescription)==null?void 0:A.call(I,i.value[M]))??"",r.value=!0},B=async()=>{if(!a.value||!d.value){P.UI.Notify.Warning(o.value.enterEmail);return}u.value=!0;try{Object.assign(a.value,{...a.value,email:d.value,description:c.value}),await t.adapter.updateEmail(a.value),r.value=!1,P.UI.Notify.Success(o.value.saved)}catch{P.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},E=async()=>{f.value=!0;try{await t.adapter.addEmail(t.contact),S(i.value.length-1)}catch{P.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},V=M=>{w.value=M,h.value=!0},k=async()=>{var M,I;m.value=!0;try{const A=i.value[w.value];await t.adapter.removeEmail((I=(M=t.adapter).emailId)==null?void 0:I.call(M,A)),i.value.splice(w.value,1),h.value=!1,P.UI.Notify.Success(o.value.deleted)}catch{P.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(M,I)=>(e.openBlock(),e.createElementBlock("div",mm,[e.createElementVNode("div",hm,[e.createElementVNode("div",pm,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",gm,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:E},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,Q)=>{var se,_e,Ne,Se,he,lt;return e.openBlock(),e.createElementBlock("div",{key:((_e=(se=n.adapter).emailId)==null?void 0:_e.call(se,A))??Q,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",M.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",ym,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",wm,[e.createElementVNode("div",bm,e.toDisplayString(n.adapter.emailValue(A)),1),(Se=(Ne=n.adapter).emailDescription)!=null&&Se.call(Ne,A)?(e.openBlock(),e.createElementBlock("div",Sm,e.toDisplayString((lt=(he=n.adapter).emailDescription)==null?void 0:lt.call(he,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Cm,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:$e=>y(n.adapter.emailValue(A))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...I[4]||(I[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(oe,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:$e=>S(Q)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...I[5]||(I[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),Q>=n.presetted?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:$e=>V(Q)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...I[6]||(I[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",km,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",xm,e.toDisplayString(e.unref(o).noEmails),1),I[7]||(I[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:E},null,8,["loading"])])),e.createVNode(uo,{modelValue:e.unref(r),"onUpdate:modelValue":I[2]||(I[2]=A=>e.isRef(r)?r.value=A:null),icon:"email",title:"Редактирование email",saving:e.unref(u),onSave:B},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Je,{key:0,modelValue:e.unref(d),"onUpdate:modelValue":I[0]||(I[0]=A=>e.isRef(d)?d.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(Je,{key:1,modelValue:e.unref(c),"onUpdate:modelValue":I[1]||(I[1]=A=>e.isRef(c)?c.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(h),"onUpdate:modelValue":I[3]||(I[3]=A=>e.isRef(h)?h.value=A:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:k},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),Em={class:"q-mt-sm"},Bm={class:"row items-center justify-between q-mb-xs q-px-xs"},Nm={class:"row items-center q-gutter-xs"},$m={class:"text-uppercase text-caption text-weight-medium text-grey-7"},Vm={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},Pm={style:{"min-width":"0"}},Tm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},Im={key:0,class:"text-caption text-grey-6 ellipsis"},Mm={class:"row items-center no-wrap q-gutter-xs"},Rm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},Dm={class:"text-body2 text-grey-7"},un=z(e.defineComponent({__name:"PContactFormViewPhones",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...$t,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),d=e.ref(""),c=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),h=e.ref(!1),w=e.ref(-1),y=async M=>{M&&(await navigator.clipboard.writeText(M),P.UI.Notify.Success(o.value.copiedNumber))},S=M=>{var I,A;s.value=M,a.value=i.value[M],d.value=t.adapter.phoneNumber(i.value[M]),c.value=((A=(I=t.adapter).phoneDescription)==null?void 0:A.call(I,i.value[M]))??"",r.value=!0},B=async()=>{if(!a.value||!d.value){P.UI.Notify.Warning(o.value.enterPhone);return}u.value=!0;try{Object.assign(a.value,{...a.value,number:d.value,description:c.value}),await t.adapter.updatePhone(a.value),r.value=!1,P.UI.Notify.Success(o.value.saved)}catch{P.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},E=async()=>{f.value=!0;try{await t.adapter.addPhone(t.contact),S(i.value.length-1)}catch{P.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},V=M=>{w.value=M,h.value=!0},k=async()=>{var M,I;m.value=!0;try{const A=i.value[w.value];await t.adapter.removePhone((I=(M=t.adapter).phoneId)==null?void 0:I.call(M,A)),i.value.splice(w.value,1),h.value=!1,P.UI.Notify.Success(o.value.deleted)}catch{P.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(M,I)=>(e.openBlock(),e.createElementBlock("div",Em,[e.createElementVNode("div",Bm,[e.createElementVNode("div",Nm,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",$m,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:E},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,Q)=>{var se,_e,Ne,Se,he,lt;return e.openBlock(),e.createElementBlock("div",{key:((_e=(se=n.adapter).phoneId)==null?void 0:_e.call(se,A))??Q,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",M.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",Vm,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",Pm,[e.createElementVNode("div",Tm,e.toDisplayString(n.adapter.phoneNumber(A)),1),(Se=(Ne=n.adapter).phoneDescription)!=null&&Se.call(Ne,A)?(e.openBlock(),e.createElementBlock("div",Im,e.toDisplayString((lt=(he=n.adapter).phoneDescription)==null?void 0:lt.call(he,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Mm,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:$e=>y(n.adapter.phoneNumber(A))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...I[4]||(I[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(oe,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:$e=>S(Q)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...I[5]||(I[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),Q>=n.presetted?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:$e=>V(Q)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...I[6]||(I[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",Dm,e.toDisplayString(e.unref(o).noPhones),1),I[7]||(I[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:E},null,8,["loading"])])),e.createVNode(uo,{modelValue:e.unref(r),"onUpdate:modelValue":I[2]||(I[2]=A=>e.isRef(r)?r.value=A:null),icon:"phone",title:"Редактирование телефона",saving:e.unref(u),onSave:B},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Je,{key:0,modelValue:e.unref(d),"onUpdate:modelValue":I[0]||(I[0]=A=>e.isRef(d)?d.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(Je,{key:1,modelValue:e.unref(c),"onUpdate:modelValue":I[1]||(I[1]=A=>e.isRef(c)?c.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(h),"onUpdate:modelValue":I[3]||(I[3]=A=>e.isRef(h)?h.value=A:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:k},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),zm={class:"row items-center q-gutter-sm"},Am={class:"text-weight-medium text-grey-9"},_m=e.defineComponent({__name:"PContactForm",props:{contact:{},adapter:{},title:{default:$t.title},phonesPresetted:{default:3},emailsPresetted:{default:2},margin:{default:"0"},labels:{}},setup(n){const t=n,o=e.computed(()=>({...$t,...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),d=()=>{a.value=!a.value},c=async()=>{const u=s.value;u&&(await navigator.clipboard.writeText(u),P.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:d},[e.createElementVNode("div",zm,[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:c},{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(un,{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(dn,{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"]))}}),ir=z(_m,[["__scopeId","data-v-327b9235"]]),Fm={class:"contact-edit-wrapper"},rr=z(e.defineComponent({__name:"PContactFormEdit",props:{contact:{},adapter:{},phonesPresetted:{default:3},emailsPresetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",Fm,[e.createVNode(un,{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(dn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-8548f1de"]]),Om={class:"edit-emails-wrapper"},sr=z(e.defineComponent({__name:"PContactFormEditEmails",props:{contact:{},adapter:{},presetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",Om,[e.createVNode(dn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-2f0b3c6b"]]),Lm={class:"edit-phones-wrapper"},ar=z(e.defineComponent({__name:"PContactFormEditPhones",props:{contact:{},adapter:{},presetted:{default:3},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",Lm,[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-59e80623"]]),Hm={class:"contact-view-wrapper"},lr=z(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",Hm,[e.createVNode(un,{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(dn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"])]))}}),[["__scopeId","data-v-f1271bd5"]]);function Na(n){n.component("PContactForm",ir),n.component("PContactFormDeleteDialog",co),n.component("PContactFormEdit",rr),n.component("PContactFormEditDialog",uo),n.component("PContactFormEditEmails",sr),n.component("PContactFormEditPhones",ar),n.component("PContactFormView",lr),n.component("PContactFormViewEmails",dn),n.component("PContactFormViewPhones",un)}const Um=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:ir,PContactFormDeleteDialog:co,PContactFormEdit:rr,PContactFormEditDialog:uo,PContactFormEditEmails:sr,PContactFormEditPhones:ar,PContactFormView:lr,PContactFormViewEmails:dn,PContactFormViewPhones:un,default:Na,defaultContactsLabels:$t},Symbol.toStringTag,{value:"Module"}));class $a{constructor(t){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Ze);P.H.Classes.BuildClass(this,t)}}class fo{constructor(t){l(this,"id");l(this,"passportId");l(this,"fileInfoId");l(this,"fileInfo",new P.C.FileInfo);l(this,"order",0);H.BuildClass(this,t)}static Create(t){const o=new fo;return o.id=P.H.Id.UUID(),o.passportId=t,o}}var vm=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&&vm(t,o,r),r};class cr{constructor(t){l(this,"id");l(this,"num","");l(this,"seria","");l(this,"division","");l(this,"divisionCode","");l(this,"citzenship","");l(this,"date",new Date);l(this,"address","");l(this,"passportScans",[]);H.BuildClass(this,t)}}jm([H.GetClassConstructor(fo)],cr.prototype,"passportScans");class Va{constructor(t){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Ze);P.H.Classes.BuildClass(this,t)}}const qm=Object.freeze(Object.defineProperty({__proto__:null,Inn:$a,Passport:cr,PassportScan:fo,Snils:Va},Symbol.toStringTag,{value:"Module"}));let Wm=class extends ue{constructor(){super($a,"inns")}};const Gm=new Wm;let Qm=class extends ue{constructor(){super(fo,"passport-scans")}};const Ym=new Qm;let Xm=class extends ue{constructor(){super(cr,"passports")}};const Zm=new Xm;let Jm=class extends ue{constructor(){super(Va,"snilss")}};const Km=new Jm,eh=Object.freeze(Object.defineProperty({__proto__:null,C:qm,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Gm,PassportScans:Ym,Passports:Zm,Snilss:Km},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class dr{constructor(t){l(this,"id");l(this,"name","");P.H.Classes.BuildClass(this,t)}static Create(t){const o=new dr;return o.id=P.H.Id.UUID(),o.name=t,o}}const th=Object.freeze(Object.defineProperty({__proto__:null,Extract:dr},Symbol.toStringTag,{value:"Module"})),nh=[{path:"/admin/extracts",name:"ExtractsList",component:()=>Promise.resolve().then(()=>Rb)}];class mo{constructor(t){l(this,"id");l(this,"name","");l(this,"label","");P.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new mo;return i.id=P.H.Id.UUID(),i.name=t,i.label=o,i}}let oh=class extends ue{constructor(){super(mo,"extracts")}};const ih=new oh,rh=Object.freeze(Object.defineProperty({__proto__:null,C:th,R:nh,S:Object.freeze(Object.defineProperty({__proto__:null,ExtractsStore:ih},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class fn{constructor(t){l(this,"id");l(this,"name","");l(this,"score",0);l(this,"order",0);l(this,"showMoreQuestions",!1);l(this,"showOther",!1);l(this,"fieldId");l(this,"isMatrixY",!1);P.H.Classes.BuildClass(this,t)}static Create(t){const o=new fn;return o.id=P.H.Id.UUID(),o.fieldId=t,o}}class Pa{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fieldId");P.H.Classes.BuildClass(this,t)}}class ur{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);P.H.Classes.BuildClass(this,t)}}class zn{constructor(t){l(this,"id");l(this,"name","");l(this,"fieldId");P.H.Classes.BuildClass(this,t)}static Create(t){const o=new zn;return o.id=P.H.Id.UUID(),o.fieldId=t,o}}var sh=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&&sh(t,o,r),r};const mn=class ki{constructor(t){l(this,"id");l(this,"name","");l(this,"code","");l(this,"valueTypeId");l(this,"order",0);l(this,"ageCompare",!1);l(this,"answerVariants",[]);l(this,"answerVariantsForDelete",[]);l(this,"fieldExamples",[]);l(this,"fieldVariants",[]);l(this,"valueType",new ya);l(this,"fieldMeasures",[]);l(this,"showSet",!1);l(this,"showRadio",!1);l(this,"isEdit",!1);l(this,"children",[]);l(this,"parentId");l(this,"formSectionId");l(this,"selected",!1);P.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 ki;return o.id=P.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 fn(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 ur(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=fn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=ki.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 ki(this);return t.id=P.H.Id.UUID(),t.answerVariants.forEach(o=>{o.id=P.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([P.H.Classes.GetClassConstructor(fn)],mn.prototype,"answerVariants"),ho([P.H.Classes.GetClassConstructor(Pa)],mn.prototype,"fieldExamples"),ho([P.H.Classes.GetClassConstructor(zn)],mn.prototype,"fieldVariants"),ho([P.H.Classes.GetClassConstructor(ur)],mn.prototype,"fieldMeasures"),ho([P.H.Classes.GetClassConstructor(mn)],mn.prototype,"children");let Jo=mn;class fr{constructor(t){l(this,"id");l(this,"answerId");l(this,"comment","");l(this,"fileInfoId");l(this,"fileInfo",new Ze);P.H.Classes.BuildClass(this,t)}}class hn{constructor(t){l(this,"id");l(this,"answerVariantId");l(this,"answerVariantIdY");l(this,"fieldFillId");P.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new hn;return i.id=qt(),i.fieldFillId=t,i.answerVariantId=o,i}static GetClassName(){return"selectedAnswerVariant"}}var ah=Object.defineProperty,Ta=(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&&ah(t,o,r),r};const mr=class rs{constructor(t){l(this,"id");l(this,"valueString");l(this,"valueOther");l(this,"valueNumber");l(this,"valueDate");l(this,"fileInfo",new Ze);l(this,"fileInfoId");l(this,"order",0);l(this,"selectedAnswerVariants",[]);l(this,"patientId");l(this,"fieldId");l(this,"formFillId");l(this,"answerVariantId");l(this,"filled",!1);l(this,"researchResultId");l(this,"answerFiles",[]);l(this,"answerFilesForDelete",[]);P.H.Classes.BuildClass(this,t)}setFilled(t){this.filled=t}static Create(t,o){const i=new rs;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=>rs.Create(i,o))}addFile(){const t=new fr;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=hn.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=hn.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}};Ta([P.H.Classes.GetClassConstructor(hn)],mr.prototype,"selectedAnswerVariants"),Ta([P.H.Classes.GetClassConstructor(fr)],mr.prototype,"answerFiles");let An=mr;class lh{constructor(t){l(this,"id");l(this,"fieldId");P.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var ch=Object.defineProperty,dh=(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&&ch(t,o,r),r};const Ia=class rc{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fields",[]);l(this,"formId");P.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 rc;return o.id=P.H.Id.UUID(),o.formId=t,o}addField(){const t=Jo.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}};dh([P.H.Classes.GetClassConstructor(Jo)],Ia.prototype,"fields");let Ko=Ia;var uh=Object.defineProperty,fh=(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&&uh(t,o,r),r};const Ma=class sc{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"isLaboratory",!1);l(this,"formSections",[]);l(this,"isEdit",!1);l(this,"withDates",!1);l(this,"withScores",!1);l(this,"selectedForExport",!1);l(this,"filterString","");l(this,"showOnlyNotFilled",!1);l(this,"showOnlyFilled",!1);P.H.Classes.BuildClass(this,t)}static GetClassName(){return"Form"}static Create(){const t=new sc;return t.id=P.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=Ko.Create(this.id);return this.formSections.push(t),P.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)}};fh([P.H.Classes.GetClassConstructor(Ko)],Ma.prototype,"formSections");let Ra=Ma;var mh=Object.defineProperty,hh=(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&&mh(t,o,r),r};const Da=class ac{constructor(t){l(this,"id");l(this,"date",new Date);l(this,"editMode",!1);l(this,"userFormId");l(this,"fillingPercentage",0);l(this,"fieldFills",[]);l(this,"num","");l(this,"formId");P.H.Classes.BuildClass(this,t)}static Create(t){const o=new ac;return o.id=P.H.Id.UUID(),o.formId=t.id,o.fieldFills.push(...An.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 An;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=An.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,""):""}};hh([P.H.Classes.GetClassConstructor(An)],Da.prototype,"fieldFills");let za=Da;const ph=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:fn,Field:Jo,FieldExample:Pa,FieldFill:An,FieldFillFile:fr,FieldFilter:lh,FieldMeasure:ur,FieldVariant:zn,Form:Ra,FormFill:za,FormSection:Ko,SelectedAnswerVariant:hn},Symbol.toStringTag,{value:"Module"}));let gh=class extends ue{constructor(){super(fn,"answer-variants")}};const yh=new gh;let wh=class extends ue{constructor(){super(An,"field-fills")}};const bh=new wh;let Sh=class extends ue{constructor(){super(Jo,"fields")}};const Ch=new Sh;let kh=class extends ue{constructor(){super(za,"form-fills")}};const xh=new kh;let Eh=class extends ue{constructor(){super(Ko,"form-sections")}};const Bh=new Eh;let Nh=class extends ue{constructor(){super(Ra,"forms")}};const $h=new Nh;let Vh=class extends ue{constructor(){super(hn,"selected-answer-variants")}};const Ph=new Vh,Th=Object.freeze(Object.defineProperty({__proto__:null,C:ph,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:yh,FieldFills:bh,Fields:Ch,FormFills:xh,FormSections:Bh,Forms:$h,SelectedAnswerVariants:Ph},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class ei{constructor(t){l(this,"id");l(this,"name","");l(this,"link","");l(this,"selected",!1);l(this,"hide",!1);l(this,"editMode",!1);l(this,"color","");l(this,"background","");l(this,"order",0);l(this,"menuId");l(this,"iconId");l(this,"icon",new Ze);l(this,"iconName","");l(this,"svgCode","");H.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=He.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var Ih=Object.defineProperty,Mh=(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&&Ih(t,o,r),r};class hr{constructor(t){l(this,"id");l(this,"name","");l(this,"link","");l(this,"top",!0);l(this,"side",!0);l(this,"show",!1);l(this,"hide",!1);l(this,"active",!1);l(this,"order",0);l(this,"selected",!1);l(this,"editMode",!1);l(this,"subMenus",[]);l(this,"subMenusForDelete",[]);l(this,"iconId");l(this,"icon",new Ze);H.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=He.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new ei)}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"}}Mh([H.GetClassConstructor(ei)],hr.prototype,"subMenus");const Rh=Object.freeze(Object.defineProperty({__proto__:null,Menu:hr,SubMenu:ei},Symbol.toStringTag,{value:"Module"}));let Dh=class extends P.H.BaseStore{constructor(){super(hr,"menus")}};const zh=new Dh;let Ah=class extends P.H.BaseStore{constructor(){super(ei,"sub-menus")}};const _h=new Ah,Fh=Object.freeze(Object.defineProperty({__proto__:null,C:Rh,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:zh,SubMenus:_h},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class ti{constructor(t){l(this,"id","");l(this,"name","");l(this,"component","");l(this,"order");l(this,"active",!1);l(this,"key",0);H.BuildClass(this,t)}static Create(t,o,i,r,s){const a=new ti;return a.id=t,a.name=o,a.component=i,a.order=r,a.active=!!s,a}}var Aa=(n=>(n.User="USER",n.Admin="ADMIN",n))(Aa||{});class Oh{constructor(t){l(this,"id");l(this,"name",Aa.User);l(this,"label","");l(this,"startPage","");H.BuildClass(this,t)}}class pr{constructor(t){l(this,"id");l(this,"document",new Ze);l(this,"documentId");l(this,"pageId");H.BuildClass(this,t)}}var Lh=Object.defineProperty,Hh=(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&&Lh(t,o,r),r};class ni{constructor(t){l(this,"id");l(this,"pageId");l(this,"fileInfoId");l(this,"fileInfo");l(this,"description");H.BuildClass(this,t)}}Hh([H.GetClassConstructor(Ze)],ni.prototype,"fileInfo");class oi{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"downloadToFile",!1);l(this,"pageSectionId");l(this,"scan",new Ze);l(this,"scanId");H.BuildClass(this,t)}getFileInfos(){return[this.scan]}getFileName(){return this.name?this.name:this.scan.originalName}}var Uh=Object.defineProperty,vh=(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&&Uh(t,o,r),r};class _n{constructor(t){l(this,"id");l(this,"name","");l(this,"singleScan",!1);l(this,"scan");l(this,"scanId");l(this,"order",0);l(this,"description","");l(this,"scans",[]);l(this,"scansForDelete",[]);l(this,"pageSectionDocuments",[]);l(this,"pageSideMenuId");l(this,"pageId");l(this,"text","");l(this,"documents",[]);H.BuildClass(this,t),this.documents=this.pageSectionDocuments,this.text=this.description.replace("<p>undefined</p>","")}addDocument(){const t=new oi;t.order=this.pageSectionDocuments.length-1,this.pageSectionDocuments.push(t)}getFileInfos(){const t=[];return this.pageSectionDocuments.forEach(o=>{t.push(...o.getFileInfos())}),t}infoExists(t){const o=ae.SearchIn(this.name,t),i=ae.SearchIn(this.description,t),r=this.getDocuments(t);return o||i||r.length>0}getDocuments(t){return this.pageSectionDocuments.filter(o=>ae.SearchIn(o.name,t))}getDescription(t){return t?ae.WrapSubStr(this.description,t):this.description}filter(t){if(!t){this.text=this.description,this.documents=this.pageSectionDocuments;return}this.text=ae.SearchIn(this.description,t)?ae.WrapSubStr(this.description,t):"",this.documents=this.pageSectionDocuments.filter(o=>ae.SearchIn(o.name,t))}}vh([H.GetClassConstructor(oi)],_n.prototype,"pageSectionDocuments");var jh=Object.defineProperty,qh=(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&&jh(t,o,r),r};class Yt{constructor(t){l(this,"id");l(this,"name","Новое меню");l(this,"order",0);l(this,"description","");l(this,"routeAnchor","");l(this,"slug","");l(this,"pageSections",[]);l(this,"showContent",!1);l(this,"pageId");l(this,"selected",!1);l(this,"sections",[]);l(this,"text","");H.BuildClass(this,t),this.sections=this.pageSections,this.text=this.description.replace("<p>undefined</p>","")}getFileInfos(){const t=[];return this.pageSections.forEach(o=>{t.push(...o.getFileInfos())}),t}addPageSection(){const t=new _n;t.order=this.pageSections.length+1,t.name=`Новой раздел ${t.order}`,t.id=He.UUID(),this.pageSections.push(t)}infoExists(t){const o=ae.SearchIn(this.name,t),i=ae.SearchIn(this.description,t),r=this.getPageSections(t).length>0;return o||i||r}getPageSections(t){return t.length?this.pageSections.filter(o=>o.infoExists(t)):this.pageSections}filter(t){t.length?(this.sections=this.pageSections.filter(o=>o.infoExists(t)),this.text=ae.SearchIn(this.description,t)?ae.WrapSubStr(this.description,t):""):(this.sections=this.pageSections,this.text=this.description),this.sections.forEach(o=>o.filter(t))}}qh([H.GetClassConstructor(_n)],Yt.prototype,"pageSections");var Wh=Object.defineProperty,ii=(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&&Wh(t,o,r),r};class Fn{constructor(t){l(this,"id");l(this,"title","");l(this,"content","");l(this,"slug","");l(this,"pagesGroup","Без группы");l(this,"link","");l(this,"withComments",!1);l(this,"showContacts",!1);l(this,"collaps",!1);l(this,"showContent",!1);l(this,"pageImages",[]);l(this,"pageImagesForDelete",[]);l(this,"pageImagesNames",[]);l(this,"pageSideMenus",[]);l(this,"menus",[]);l(this,"pageSideMenusForDelete",[]);l(this,"pageSections",[]);l(this,"pageSectionsForDelete",[]);l(this,"pageDocuments",[]);l(this,"contact",new ma);l(this,"contactId");l(this,"role",new Oh);l(this,"roleId");l(this,"filterStr","");l(this,"activeMenuId","");H.BuildClass(this,t),this.menus=this.pageSideMenus}getActiveMenu(){const t=this.pageSideMenus.find(o=>o.id===this.activeMenuId);return t||this.pageSideMenus[0]}setActiveMenuId(t){this.activeMenuId=t}getLink(){return this.slug!==""?`/pages/${this.slug}`:"404"}getFileInfos(){const t=[];return this.pageSideMenus.forEach(o=>{t.push(...o.getFileInfos())}),this.pageImages.forEach(o=>{o.fileInfo&&t.push(o.fileInfo)}),t}addSideMenu(){const t=new Yt;return t.order=this.pageSideMenus.length+1,t.name=`Новое меню ${t.order}`,t.id=He.UUID(),this.pageSideMenus.push(t),t.id}selectSideMenu(t,o){if(!t&&this.pageSideMenus.length>0){this.pageSideMenus[0].selected=!0;return}this.pageSideMenus.forEach(i=>{o?i.selected=i.id===t:i.selected=i.slug===t})}getSelectedSideMenu(){const t=this.pageSideMenus.find(o=>o.selected);return t||new Yt}addCustomSectionsToSideMenu(t){t.forEach(o=>{const i=new Yt;i.id=o.id,i.name=o.name,typeof o.order<"u"?this.pageSideMenus.splice(o.order,0,i):this.pageSideMenus.push(i)})}getPageSideMenus(){if(this.showContacts&&!this.pageSideMenus.find(t=>t.id==="contacts")){const t=new Yt;t.id="contacts",t.name="Контакты",this.pageSideMenus.push(t)}return this.filterStr===""?this.pageSideMenus:this.pageSideMenus.filter(t=>t.infoExists(this.filterStr))}filter(){this.filterStr===""?this.menus=this.pageSideMenus:this.menus=this.pageSideMenus.filter(t=>t.infoExists(this.filterStr)),this.menus.forEach(t=>t.filter(this.filterStr))}static GetClassName(){return"page"}}ii([H.GetClassConstructor(ni)],Fn.prototype,"pageImages"),ii([H.GetClassConstructor(Yt)],Fn.prototype,"pageSideMenus"),ii([H.GetClassConstructor(_n)],Fn.prototype,"pageSections"),ii([H.GetClassConstructor(pr)],Fn.prototype,"pageDocuments");const Gh=Object.freeze(Object.defineProperty({__proto__:null,CustomSection:ti,Page:Fn,PageDocument:pr,PageImage:ni,PageSection:_n,PageSectionDocument:oi,PageSideMenu:Yt},Symbol.toStringTag,{value:"Module"}));let Qh=class extends P.H.BaseStore{constructor(){super(ti,"custom-sections")}};const Yh=new Qh;let Xh=class extends P.H.BaseStore{constructor(){super(pr,"page-documents")}};const Zh=new Xh;let Jh=class extends P.H.BaseStore{constructor(){super(ni,"page-images")}};const Kh=new Jh;let ep=class extends P.H.BaseStore{constructor(){super(oi,"page-section-documents")}};const tp=new ep;let np=class extends P.H.BaseStore{constructor(){super(_n,"page-sections")}};const op=new np;let ip=class extends P.H.BaseStore{constructor(){super(Yt,"page-side-menus")}};const rp=new ip;let sp=class extends P.H.BaseStore{constructor(){super(Fn,"pages")}};const ap=new sp,lp=Object.freeze(Object.defineProperty({__proto__:null,C:Gh,S:Object.freeze(Object.defineProperty({__proto__:null,CustomSections:Yh,PageDocuments:Zh,PageImages:Kh,PageSectionDocuments:tp,PageSections:op,PageSideMenus:rp,Pages:ap},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ft{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"sessionId");l(this,"payload",{});P.H.Classes.BuildClass(this,t)}static Create(t){const o=new Ft;return o.id=P.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}}var cp=Object.defineProperty,dp=(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&&cp(t,o,r),r};const _a=class lc{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"slots",[]);P.H.Classes.BuildClass(this,t)}static Create(t){const o=new lc;return o.id=P.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}};dp([P.H.Classes.GetClassConstructor(Ft)],_a.prototype,"slots");let On=_a;var up=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&&up(t,o,r),r};const gr=class cc{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"scheduleDayId");l(this,"placeId");l(this,"sessions",[]);l(this,"slots",[]);P.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new cc;return i.id=P.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}};Fa([P.H.Classes.GetClassConstructor(On)],gr.prototype,"sessions"),Fa([P.H.Classes.GetClassConstructor(Ft)],gr.prototype,"slots");let po=gr;var fp=Object.defineProperty,mp=(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&&fp(t,o,r),r};const Oa=class dc{constructor(t){l(this,"id");l(this,"date",new Date(0));l(this,"description","");l(this,"ownerId");l(this,"ownerType","");l(this,"schedules",[]);P.H.Classes.BuildClass(this,t)}static Create(t,o,i=new Date){const r=new dc;return r.id=P.H.Id.UUID(),r.ownerId=t,r.ownerType=o||"",r.date=i,r}};mp([P.H.Classes.GetClassConstructor(po)],Oa.prototype,"schedules");let ri=Oa;class Ln{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"color","");P.H.Classes.BuildClass(this,t)}static Create(){const t=new Ln;return t.id=P.H.Id.UUID(),t}}const hp=Object.freeze(Object.defineProperty({__proto__:null,Schedule:po,ScheduleDay:ri,SchedulePlace:Ln,ScheduleSession:On,ScheduleSlot:Ft},Symbol.toStringTag,{value:"Module"})),fe=n=>n?P.H.Time.HMtoM(n):NaN,st=n=>P.H.Time.ConcatHM(Math.floor(n/60),n%60),Hn=n=>{if(!n)return"";const t=P.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},go=(n,t)=>P.H.Time.DiffM(n,t),pn=(n,t)=>P.H.Time.AddMtoHM(n,t),yr=(n,t)=>{const o=fe(n.startTime),i=fe(t.startTime);return isFinite(o)?isFinite(i)?o-i:-1:1},yo=(n,t)=>{const o=fe(n.startTime),i=fe(n.endTime),r=fe(t.startTime),s=fe(t.endTime);return!isFinite(o)||!isFinite(i)||!isFinite(r)||!isFinite(s)?!1:o<s&&r<i},wo=(n,t)=>Math.round(n/t)*t,La=(n,t=8*60,o=20*60)=>{let i=t,r=o;for(const{item:d}of n){const c=fe(d.startTime),u=fe(d.endTime);isFinite(c)&&(i=Math.min(i,c)),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}},Ha=(n,t)=>{const o=fe(n.item.startTime),i=fe(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+"%"}},Ua=(n,t)=>{const o=fe(n.startTime),i=fe(n.endTime);if(!isFinite(o)||!isFinite(i)||i<=o)return{top:"0%",height:"auto"};const r=i-o,s=fe(t.startTime),a=fe(t.endTime),d=isFinite(s)?Math.max((s-o)/r*100,0):0;let c=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return c=Math.min(Math.max(c,3),100-d),{top:d+"%",height:c+"%"}},va=(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)),ja=(n,t,o)=>n.some(i=>i.id!==t.id&&o(t,i)),qa=(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})},Wa=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",wr={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:"пересечение"},Ga={createDay(n){return ri.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=P.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}},pp={class:"schedule-admin"},gp={key:0,class:"no-days text-center text-grey q-py-xl"},yp={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},wp={key:1,class:"row items-center q-gutter-xs zoom-control"},bp={key:0,class:"grid-view"},Sp={key:0,class:"text-grey text-center q-py-lg"},Cp={class:"grid-header"},kp={class:"row items-center justify-center q-gutter-xs"},xp={class:"ellipsis"},Ep={class:"time-gutter"},Bp=["data-schedule-id","onDblclick"],Np=["title","onPointerdown","onClick"],$p={class:"block-content"},Vp={class:"block-time"},Pp={class:"block-name ellipsis"},Tp={key:0,class:"block-speakers ellipsis"},Ip={key:0,class:"session-perfoms"},Mp=["title","onPointerdown","onClick"],Rp={class:"nested-time"},Dp={class:"nested-name ellipsis"},zp={key:0,class:"nested-speakers ellipsis"},Ap=["title","onPointerdown"],_p={class:"block-actions"},Fp=["title","onPointerdown"],Op=["title"],Lp={class:"session-spine-name"},Hp={class:"block-time"},Up={key:0,class:"session-badge"},vp={key:1,class:"conflict-badge"},jp={class:"block-name ellipsis"},qp={class:"text-caption text-grey-6 q-pa-xs"},Wp={key:1,class:"list-view"},Gp={class:"row items-center q-gutter-sm"},Qp={class:"text-subtitle2"},Yp={key:0,class:"sub-block"},Xp={class:"sub-title"},Zp={class:"list-row session-row"},Jp={key:0,class:"nested-list"},Kp={class:"col-4 ellipsis"},eg={class:"time-text"},tg={class:"sub-block"},ng={class:"sub-title"},og={class:"list-row slot-row"},ig={key:0,class:"text-grey text-center q-py-sm"},rg={class:"text-caption text-grey-6 q-mb-sm"},sg={class:"text-h6"},ag={class:"row items-center q-gutter-sm q-mb-md"},lg={key:0,class:"text-grey text-center q-py-md"},cg={class:"col ellipsis"},dg={class:"text-h6"},ug={class:"row q-col-gutter-sm q-mb-sm"},fg={class:"col-6"},mg={class:"col-6"},gn=15,Qa=6,Ya=z(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}},setup(n){var Jl,Kl;const t=n,o=e.computed(()=>({...wr,...t.labels})),i=e.computed(()=>({...Ga,...t.factories})),r=p=>t.slotListOf?t.slotListOf(p):(p==null?void 0:p.slots)||[],s=p=>t.nestedSlotListOf?t.nestedSlotListOf(p):(p==null?void 0:p.slots)||[],a=p=>(p==null?void 0:p.name)||o.value.hall,d=p=>t.sessionName?t.sessionName(p):(p==null?void 0:p.name)||`${o.value.session} ${(p==null?void 0:p.startTime)||""}–${(p==null?void 0:p.endTime)||""}`.trim(),c=p=>t.slotName?t.slotName(p):(p==null?void 0:p.name)||o.value.slot,u=p=>t.slotSubtitle?t.slotSubtitle(p):"",f=e.ref("grid"),m=e.ref((Kl=(Jl=t.days)==null?void 0:Jl[0])==null?void 0:Kl.id),h=e.ref(!1),w=e.ref(""),y=e.ref(!1),S=e.ref(null),B=e.ref(null),E=e.ref(void 0),V=e.ref(null),k=e.ref(null),M=e.ref(!1),I=e.ref(0),A=e.ref(null),Q=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],se=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch(se,p=>localStorage.setItem("schedule-grid-zoom",String(p)));const _e=e.computed(()=>Math.max(ke.value.total/60*se.value,360)),Ne=e.computed(()=>_e.value+"px"),Se=e.computed(()=>[...t.days||[]].sort((p,g)=>new Date(p.date).getTime()-new Date(g.date).getTime())),he=e.computed(()=>Se.value.find(p=>p.id===m.value));e.watch(()=>Se.value.map(p=>p.id).join(","),()=>{var p;(!m.value||!Se.value.some(g=>g.id===m.value))&&(m.value=(p=Se.value[0])==null?void 0:p.id)});const lt=p=>{if(t.dayTitle)return t.dayTitle(p);const g=new Date(p.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},$e=p=>{const g=new Date(p);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},It=async(p,g)=>{g&&(p.date=new Date(g),await t.persist.updateDay(p),await t.persist.refresh())},Mt=async p=>{var C;if(!p)return;for(const R of yt(p))await le(R);await t.persist.removeDay(p);const g=(t.days||[]).indexOf(p);g>=0&&t.days.splice(g,1),await t.persist.refresh(),m.value=(C=Se.value[0])==null?void 0:C.id},vt=async()=>{var j,J;const p=Se.value,g=p[p.length-1],C=g?new Date(new Date(g.date).getTime()+864e5):new Date;let R;try{R=i.value.createDay(C)}catch{t.persist.notify("warning",o.value.saveEventFirst);return}try{await((J=(j=t.persist).createDay)==null?void 0:J.call(j,R));for(const me of t.places||[])await G(me,R);await t.persist.refresh()}catch{t.persist.notify("negative",o.value.createFailed);return}m.value=R.id,t.persist.notify("positive",`${o.value.dayAdded}: ${lt(R)}`)},yt=p=>((p==null?void 0:p.schedules)||[]).slice().sort((g,C)=>{const R=Ct(g),j=Ct(C);return R.localeCompare(j,"ru")}),Ct=p=>{if(t.hallName)return t.hallName(p);const g=p.place||(t.places||[]).find(C=>C.id===p.placeId);return(g==null?void 0:g.name)||o.value.hall},rt=()=>{h.value=!0},Ce=e.computed(()=>{const p=he.value,g=new Set(((p==null?void 0:p.schedules)||[]).map(C=>C.placeId));return(t.places||[]).filter(C=>!g.has(C.id))}),G=async(p,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(p,g,i.value.createSchedule);return}const C=i.value.createSchedule(p.id,g.id);await t.persist.createSchedule(C)},qe=async p=>{h.value=!1;const g=he.value;if(!g){t.persist.notify("warning",o.value.selectDayFirst);return}if(yt(g).some(C=>C.placeId===p.id)){t.persist.notify("warning",o.value.alreadyAdded);return}try{await G(p,g)}catch(C){console.warn("addPlaceToDay failed:",C),t.persist.notify("negative",o.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),m.value=g.id},Rt=async()=>{var C,R,j;const p=(C=w.value)==null?void 0:C.trim();if(!p){t.persist.notify("warning",o.value.enterName);return}const g=i.value.createPlace(p);try{if(!await((j=(R=t.persist).createPlace)==null?void 0:j.call(R,g))){t.persist.notify("negative",o.value.hallCreateFailed);return}}catch(J){console.warn("createPlace failed:",J),t.persist.notify("negative",o.value.hallCreateFailed);return}w.value="",await qe(g),t.persist.notify("positive",o.value.hallCreated.replace("{name}",p))},we=async p=>{await le(p);const g=Ye(p);g&&(g.schedules=(g.schedules||[]).filter(C=>C.id!==p.id)),await t.persist.refresh()},le=async p=>{for(const g of p.sessions||[]){for(const C of s(g))await t.persist.removeSlot(C);await t.persist.removeSession(g)}for(const g of r(p))await t.persist.removeSlot(g);await t.persist.removeSchedule(p)},Ye=p=>(t.days||[]).find(g=>(g.schedules||[]).some(C=>C.id===p.id)),Xe=p=>[...s(p)].sort(yr),Qn=p=>(p.sessions||[]).some(g=>s(g).length>0),Ke=new WeakMap,jt=p=>{const g=Ke.get(p),C=r(p);if(g&&g.src===C)return g.list;const R=new Set((p.sessions||[]).map(J=>J.id)),j=C.filter(J=>!J.sessionId||!R.has(J.sessionId));return Ke.set(p,{src:C,list:j}),j},Me=p=>[...(p.sessions||[]).map(g=>({kind:"session",item:g})),...jt(p).map(g=>({kind:"slot",item:g}))],wn=p=>(p.sessions||[]).map(g=>({kind:"session",item:g})),ke=e.computed(()=>{var g,C;const p=(((g=he.value)==null?void 0:g.schedules)||[]).flatMap(R=>Me(R));for(const R of((C=he.value)==null?void 0:C.schedules)||[])for(const j of R.sessions||[])p.push(...Xe(j).map(J=>({kind:"slot",item:J})));return La(p)}),et=e.computed(()=>{const p=[];for(let g=ke.value.start;g<=ke.value.end;g+=60)p.push({min:g,label:st(g)});return p}),ee=e.computed(()=>{const p=[];for(let g=ke.value.start+30;g<ke.value.end;g+=60)p.push({min:g,label:st(g)});return p}),Re=p=>Ha(p,ke.value),ct=e.computed(()=>{if(!V.value||!B.value)return{};const p=ke.value,g=(V.value.minutes-p.start)/p.total*100,C=Math.max(B.value.duration/p.total*100,2.5);return{top:g+"%",height:C+"%"}}),dt=e.computed(()=>!V.value||!B.value?"":st(V.value.minutes+B.value.duration)),bn=e.computed(()=>{if(!V.value)return{};const p=ke.value,g=(V.value.minutes-p.start)/p.total*100,C=Math.max(gn/p.total*100,1.5);return{top:g+"%",height:C+"%"}}),kt=e.computed(()=>{var j,J,me,Te,De;if(!V.value||!B.value||!B.value.id)return 0;const p=xo(V.value.scheduleId);if(!p)return 0;const g={startTime:V.value.time,endTime:dt.value},C=(j=V.value.session)==null?void 0:j.id;let R=0;for(const D of Me(p))D.item.id!==((J=B.value)==null?void 0:J.id)&&(((me=B.value)==null?void 0:me.kind)==="slot"&&D.kind==="session"&&D.item.id===C||yo(g,D.item)&&R++);if(((Te=B.value)==null?void 0:Te.kind)==="slot"&&V.value.session)for(const D of Xe(V.value.session))D.id!==((De=B.value)==null?void 0:De.id)&&yo(g,D)&&R++;return R}),Dt=e.computed(()=>kt.value>0),Si=(p,g)=>va(Me(p),g,yo),Yr=(p,g)=>ja(Xe(p),g,yo),Xr=(p,g)=>Ua(p,g),Sn=p=>{const g=ke.value,C=fe(p.item.startTime),R=fe(p.item.endTime);return!isFinite(C)||!isFinite(R)?48:(R-C)/g.total*_e.value},Yn=p=>Wa(Sn(p)),Zr=p=>{const g=t.slotName?t.slotName(p.item):p.item.name||(p.kind==="session"?o.value.session:o.value.slot);if(p.kind==="slot"&&Yn(p)!=="h-full"){const C=u(p.item);if(C)return`${g} — ${C}`}return g},Jr=(p,g)=>{const C=c(p);if(g!=="h-full"){const R=u(p);if(R)return`${C} — ${R}`}return C},ko=p=>{const g=`${p.item.startTime||"?"}–${p.item.endTime||"?"}`;if(p.kind==="slot"){const C=u(p.item);return[c(p.item),g,C?`${o.value.participants}: ${C}`:""].filter(Boolean).join(`
23
23
  `)}return[d(p.item),g].filter(Boolean).join(`
24
- `)},B=p=>{const g=u(p);return[c(p),`${p.startTime}–${p.endTime}`,g?`${i.value.participants}: ${g}`:""].filter(Boolean).join(`
25
- `)},$=(p,g)=>{var C;return{conflict:Fr(p.item,g),dragging:((C=wt.value)==null?void 0:C.perfom.id)===g.id,[Qn(p)]:!0}},I=e.ref(null),_=(p,g)=>{const C=p.getBoundingClientRect(),R=Math.min(Math.max((g-C.top)/C.height,0),1);return ke.value.start+gi(R*ke.value.total,gn)},Z=(p,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||T.value||(I.value={gi:p,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",Ve),window.addEventListener("pointerup",O),window.addEventListener("pointercancel",te),window.addEventListener("keydown",pe))},Ve=p=>{const g=I.value;if(g){if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<_a)return;g.moved=!0;const C=hi(g.gi.item.startTime,g.gi.item.endTime);E.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(C)&&C>0?C:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}Ie(p.clientX,p.clientY),ne(p.clientX,p.clientY)}},Ie=(p,g)=>{var Me,De;const C=document.elementFromPoint(p,g),R=C==null?void 0:C.closest(".hall-col"),q=R==null?void 0:R.getAttribute("data-schedule-id");if(!R||!q){x.value=void 0,V.value=null;return}const J=Si(q);if(!J)return;x.value=J.id;const me=_(R,g);V.value={scheduleId:J.id,minutes:me,time:rt(me),hallName:Ct(J),...((Me=E.value)==null?void 0:Me.kind)==="slot"?{session:jr(J.sessions,me,me+(((De=E.value)==null?void 0:De.duration)||30),fe)}:{}},k.value={x:p,y:g}},ne=(p,g)=>{const C=A.value;if(!C)return;const R=C.getBoundingClientRect();g<R.top+48?C.scrollTop-=14:g>R.bottom-48&&(C.scrollTop+=14),p<R.left+48?C.scrollLeft-=14:p>R.right-48&&(C.scrollLeft+=14)},O=p=>{H(p)},H=async p=>{const g=I.value;if(U(),I.value=null,!g||!g.moved)return;M.value=Date.now();const C=document.elementFromPoint(p.clientX,p.clientY),R=C==null?void 0:C.closest(".hall-col"),q=R==null?void 0:R.getAttribute("data-schedule-id"),J=q?Si(q):void 0;if(R&&J){const me=_(R,p.clientY);await Dl(J,me)}j()},U=()=>{window.removeEventListener("pointermove",Ve),window.removeEventListener("pointerup",O),window.removeEventListener("pointercancel",te),window.removeEventListener("keydown",pe)},j=()=>{I.value=null,E.value=null,x.value=void 0,V.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor="",M.value=Date.now()},te=()=>{U(),j()},pe=p=>{p.key==="Escape"&&te()};e.onBeforeUnmount(()=>{U(),qr(),document.body.style.userSelect="",document.body.style.cursor=""});const be=p=>{if(!p)return null;for(const g of t.days||[])for(const C of g.schedules||[]){const R=(C.sessions||[]).find(J=>J.id===p);if(R)return{kind:"session",item:R,schedule:C};const q=r(C).find(J=>J.id===p);if(q)return{kind:"slot",item:q,schedule:C}}return null},dt=()=>{var p;return be((p=E.value)==null?void 0:p.id)},bo=(p,g)=>{g.preventDefault(),g.stopPropagation();const C=p.item,R=fe(C.startTime),q=fe(C.endTime);if(!isFinite(R)||!isFinite(q))return;const J=g.clientY;T.value=!0;const me=D=>{const X=(D.clientY-J)/se.value*60,K=gi(q+X,gn);C.endTime=rt(Math.max(K,R+gn))},Me=async()=>{window.removeEventListener("pointermove",me),window.removeEventListener("pointerup",De),T.value=!1,M.value=Date.now();const D=be(C.id);D&&(await xt(C,D.kind),await t.persist.refresh())},De=()=>{Me()};window.addEventListener("pointermove",me),window.addEventListener("pointerup",De)},wt=e.ref(null),Hr=(p,g,C)=>{if(C.target.closest(".nested-edit, .nested-resize")||C.button!==0||T.value)return;const R=C.target.closest(".session-perfoms"),q=fe(p.startTime),J=fe(p.endTime),me=hi(g.startTime,g.endTime);!R||!isFinite(q)||!isFinite(J)||J<=q||(wt.value={perfom:g,session:p,startX:C.clientX,startY:C.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:q,sessionDur:J-q,durMin:isFinite(me)&&me>0?me:30,container:R},window.addEventListener("pointermove",Pl),window.addEventListener("pointerup",Tl),window.addEventListener("pointercancel",Ur),window.addEventListener("keydown",Rl))},Pl=p=>{const g=wt.value;if(!g)return;if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<_a)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const C=g.container.getBoundingClientRect(),R=Math.min(Math.max((p.clientY-C.top)/C.height,0),1);let q=g.sessionStart+gi(R*g.sessionDur,gn);const J=g.sessionStart+g.sessionDur-g.durMin;q=Math.min(Math.max(q,g.sessionStart),Math.max(J,g.sessionStart)),g.perfom.startTime=rt(q),g.perfom.endTime=rt(q+g.durMin),k.value={x:p.clientX,y:p.clientY}},Tl=p=>{wb(p)},wb=async p=>{var me;const g=wt.value;if(qr(),wt.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;M.value=Date.now();const C=document.elementFromPoint(p.clientX,p.clientY),R=C==null?void 0:C.closest(".hall-col"),q=R==null?void 0:R.getAttribute("data-schedule-id"),J=q?Si(q):void 0;if(R&&J){E.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||i.value.slot,duration:g.durMin};const Me=_(R,p.clientY),De=rt(Me),D=hi(g.perfom.startTime,g.perfom.endTime),X=pn(De,D>0?D:30),K=((me=_l(g.perfom))==null?void 0:me.id)===J.id&&g.perfom.startTime===De&&g.perfom.endTime===X;await Dl(J,Me),K&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),E.value=null;return}g.perfom.startTime=vn(g.perfom.startTime),g.perfom.endTime=vn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},Ur=()=>{const p=wt.value;qr(),p&&(p.perfom.startTime=p.savedStart,p.perfom.endTime=p.savedEnd),wt.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor=""},qr=()=>{window.removeEventListener("pointermove",Pl),window.removeEventListener("pointerup",Tl),window.removeEventListener("pointercancel",Ur),window.removeEventListener("keydown",Rl)},Rl=p=>{p.key==="Escape"&&Ur()},bb=(p,g,C)=>{C.preventDefault(),C.stopPropagation();const R=fe(p.startTime),q=fe(p.endTime),J=fe(g.startTime),me=C.target.closest(".nested-perfom"),Me=me==null?void 0:me.closest(".session-perfoms");if(!me||!Me||!isFinite(R)||!isFinite(q)||q<=R||!isFinite(J))return;const De=Me.getBoundingClientRect(),D=q-R;T.value=!0;const X=Cn=>{const Bb=Math.min(Math.max((Cn.clientY-De.top)/De.height,0),1),Nb=Math.min(Math.max(J+gn,R+gi(Bb*D,gn)),q);g.endTime=rt(Nb)},K=async()=>{window.removeEventListener("pointermove",X),window.removeEventListener("pointerup",W),T.value=!1,M.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},W=()=>{K()};window.addEventListener("pointermove",X),window.addEventListener("pointerup",W)},Dl=async(p,g)=>{var X;x.value=void 0,V.value=null,k.value=null;const C=dt();if(!C)return;const R=rt(g),q=hi(C.item.startTime,C.item.endTime),J=pn(R,q>0?q:30);if(((X=C.schedule)==null?void 0:X.id)===p.id&&C.item.startTime===R&&C.item.endTime===J)return;const me=C.item.startTime;if(C.item.startTime=R,C.item.endTime=J,C.kind==="slot"){const K=jr(p.sessions,fe(R),fe(J),fe);K?C.item.sessionId=K.id:delete C.item.sessionId}if(C.kind==="session"){const K=fe(R)-fe(me);for(const W of Xe(C.item))W.startTime&&(W.startTime=pn(W.startTime,K),W.endTime&&(W.endTime=pn(W.endTime,K)),W.scheduleId=p.id,await xt(W,"slot"))}const Me=C.schedule,De=C.kind==="session"?p.sessions:r(p),D=C.item;if(Me&&Me.id!==p.id){D.scheduleId=p.id;const K=C.kind==="session"?Me.sessions:r(Me);P.H.Classes.RemoveFromClassById(D.id,K,[]),De.push(D)}await xt(D,C.kind),await t.persist.refresh()},Sb=async(p,g)=>{if(g.target.closest(".timeline-block"))return;const C=_(g.currentTarget,g.clientY),R=o.value.createSlot(p);R.startTime=rt(C),R.endTime=rt(C+30);const q=jr(p.sessions,C,C+30,fe);q!=null&&q.id&&(R.sessionId=q.id),await t.persist.createSlot(R),await t.persist.refresh();const J=be(R.id);J&&Ci(J)},Al=async(p,g,C)=>{if(p.added){if(p.added.element.scheduleId=g.id,C==="slot"&&p.added.element.sessionId&&((g.sessions||[]).some(q=>q.id===p.added.element.sessionId)||delete p.added.element.sessionId),await xt(p.added.element,C),C==="session")for(const R of s(p.added.element))R.scheduleId=g.id,await t.persist.updateSlot(R);await t.persist.refresh()}},Si=p=>{for(const g of t.days||[]){const C=(g.schedules||[]).find(R=>R.id===p);if(C)return C}},jr=(p,g,C,R)=>Da(p,g,C,R),zl=p=>((p==null?void 0:p.sessions)||[]).map(g=>({id:g.id,label:d(g)})),_l=p=>{for(const g of t.days||[])for(const C of g.schedules||[])if(r(C).some(R=>R.id===p.id)||p.sessionId&&(C.sessions||[]).some(R=>R.id===p.sessionId))return C},Fl=e.computed(()=>{const p=S.value;if(p)return p.kind==="session"?Si(p.item.scheduleId)||kb(p.item):_l(p.item)}),Cb=e.computed(()=>{const p=S.value;return!p||p.kind!=="slot"?[]:zl(Fl.value)}),kb=(p,g)=>{for(const C of t.days||[])for(const R of C.schedules||[])if((R.sessions||[]).some(q=>q.id===p.id))return R},Ol=async(p,g)=>{g?p.sessionId=g:delete p.sessionId,await t.persist.updateSlot(p),await t.persist.refresh()},Ll=async p=>{const g=o.value.createSession(p);await t.persist.createSession(g),await t.persist.refresh()},vl=async p=>{const g=o.value.createSlot(p),C=[...r(p)].sort(pr).slice(-1)[0];g.startTime=vn(C==null?void 0:C.endTime)||"9:00",g.endTime=pn(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},Wr=async(p,g)=>{if(g==="slot")await t.persist.removeSlot(p);else{for(const C of s(p))delete C.sessionId,await t.persist.updateSlot(C);await t.persist.removeSession(p)}await t.persist.refresh()},xt=async(p,g)=>{const C=vn(p.startTime),R=vn(p.endTime);if(!C){t.persist.notify("warning",i.value.correctStartTime);return}p.startTime=C,p.endTime=R||pn(C,30),g==="slot"?await t.persist.updateSlot(p):await t.persist.updateSession(p)},Ci=p=>{T.value||Date.now()-M.value<400||(S.value={kind:p.kind,item:p.item},y.value=!0)},xb=async()=>{const p=S.value;p&&(await xt(p.item,p.kind),y.value=!1,S.value=null,await t.persist.refresh())},Eb=async()=>{const p=S.value;p&&(await Wr(p.item,p.kind),y.value=!1,S.value=null)};return t.persist.loadOptions&&t.persist.loadOptions(),(p,g)=>{var Me,De;const C=e.resolveComponent("PButton"),R=e.resolveComponent("PInput"),q=e.resolveComponent("PTooltip"),J=e.resolveComponent("PSelect"),me=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",rp,[(Me=n.days)!=null&&Me.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ap,[e.createVNode(e.unref(N.QTabs),{modelValue:m.value,"onUpdate:modelValue":g[0]||(g[0]=D=>m.value=D),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,D=>(e.openBlock(),e.createBlock(e.unref(N.QTab),{key:D.id,name:D.id,label:at(D)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(N.QSpace)),he.value?(e.openBlock(),e.createBlock(R,{key:0,"model-value":$e(he.value.date),label:i.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=D=>Pt(he.value,D))},null,8,["model-value","label"])):e.createCommentVNode("",!0),e.createVNode(C,{size:"sm",color:"negative",outline:"",icon:"delete",label:i.value.deleteDay,disable:!he.value,onClick:g[2]||(g[2]=D=>Tt(he.value))},null,8,["label","disable"]),e.createVNode(C,{size:"sm",color:"primary",outline:"",icon:"event",label:i.value.addDay,onClick:Ut},null,8,["label"]),e.createVNode(C,{size:"sm",color:"primary",outline:"",icon:"add",label:i.value.addHall,onClick:it},null,8,["label"]),f.value==="grid"?(e.openBlock(),e.createElementBlock("div",lp,[e.createVNode(e.unref(N.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(N.QBtnToggle),{modelValue:se.value,"onUpdate:modelValue":g[3]||(g[3]=D=>se.value=D),"toggle-color":"primary",options:Q,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QBtnToggle),{modelValue:f.value,"onUpdate:modelValue":g[4]||(g[4]=D=>f.value=D),"toggle-color":"primary",options:[{label:i.value.grid,value:"grid",icon:"calendar_view_week"},{label:i.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),f.value==="grid"?(e.openBlock(),e.createElementBlock("div",cp,[yt(he.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:A,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":yt(he.value).length,"--hours":Math.max(ke.value.total/60,1),"--half-hours":Math.max(ke.value.total/60*2,2)})},[e.createElementVNode("div",up,[g[15]||(g[15]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt(he.value),D=>(e.openBlock(),e.createElementBlock("div",{key:D.id,class:e.normalizeClass(["hall-head",{"drag-over":x.value===D.id}])},[e.createElementVNode("div",fp,[e.createVNode(e.unref(N.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",mp,e.toDisplayString(Ct(D)),1),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:X=>vl(D)},{default:e.withCtx(()=>[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:X=>Ll(D)},{default:e.withCtx(()=>[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.addSession),1)]),_:1})]),_:1},8,["onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:X=>we(D)},{default:e.withCtx(()=>[e.createVNode(q,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:Ne.value})},[e.createElementVNode("div",hp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ke.value,D=>(e.openBlock(),e.createElementBlock("div",{key:D.min,class:"hour-label",style:e.normalizeStyle({top:(D.min-ke.value.start)/ke.value.total*100+"%"})},e.toDisplayString(D.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value,D=>(e.openBlock(),e.createElementBlock("div",{key:D.min,class:"half-label",style:e.normalizeStyle({top:(D.min-ke.value.start)/ke.value.total*100+"%"})},e.toDisplayString(D.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt(he.value),D=>(e.openBlock(),e.createElementBlock("div",{key:D.id,class:e.normalizeClass(["hall-col",{"drag-over":x.value===D.id}]),"data-schedule-id":D.id,onDblclick:X=>Sb(D,X)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Te(D),X=>{var K;return e.openBlock(),e.createElementBlock("div",{key:X.item.id,class:e.normalizeClass(["timeline-block",[X.kind,{conflict:wo(D,X),dragging:((K=E.value)==null?void 0:K.id)===X.item.id},Qn(X)]]),style:e.normalizeStyle(Re(X)),title:bi(X),onPointerdown:W=>Z(X,W),onClick:W=>Ci(X)},[e.createVNode(e.unref(N.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",yp,[e.createElementVNode("div",wp,e.toDisplayString(X.item.startTime)+"–"+e.toDisplayString(X.item.endTime),1),e.createElementVNode("div",bp,e.toDisplayString(Lr(X)),1),X.kind==="slot"&&u(X.item)?(e.openBlock(),e.createElementBlock("div",Sp,e.toDisplayString(u(X.item)),1)):e.createCommentVNode("",!0)]),X.kind==="session"&&Xe(X.item).length?(e.openBlock(),e.createElementBlock("div",Cp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe(X.item),W=>(e.openBlock(),e.createElementBlock("div",{key:W.id,class:e.normalizeClass(["nested-perfom",$(X,W)]),style:e.normalizeStyle(Or(X.item,W)),title:B(W),onPointerdown:e.withModifiers(Cn=>Hr(X.item,W,Cn),["stop"]),onClick:e.withModifiers(Cn=>Ci({kind:"slot",item:W}),["stop"])},[e.createElementVNode("div",xp,e.toDisplayString(W.startTime)+"–"+e.toDisplayString(W.endTime),1),e.createElementVNode("div",Ep,e.toDisplayString(vr(W,Qn(X))),1),u(W)?(e.openBlock(),e.createElementBlock("div",Bp,e.toDisplayString(u(W)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),e.createElementVNode("div",{class:"nested-resize",title:i.value.changeDurationTitle,onPointerdown:e.withModifiers(Cn=>bb(X.item,W,Cn),["stop","prevent"])},null,40,Np)],46,kp))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",$p,[wo(D,X)?(e.openBlock(),e.createBlock(e.unref(N.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.conflictTitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:e.withModifiers(W=>Ci(X),["stop"])},{default:e.withCtx(()=>[e.createVNode(q,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(W=>bo(X,W),["stop","prevent"])},null,40,Vp)],46,gp)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wn(D),X=>{var K;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+X.item.id,class:e.normalizeClass(["session-spine",{dragging:((K=E.value)==null?void 0:K.id)===X.item.id}]),style:e.normalizeStyle(Re(X)),title:d(X.item)},[e.createVNode(e.unref(N.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",Mp,e.toDisplayString(d(X.item)),1)],14,Ip)}),128)),V.value&&V.value.scheduleId===D.id&&E.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:Dt.value}]),style:e.normalizeStyle(bn.value)},null,6)):e.createCommentVNode("",!0),V.value&&V.value.scheduleId===D.id&&E.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[E.value.kind,{conflict:Dt.value}]]),style:e.normalizeStyle(lt.value)},[e.createElementVNode("div",Pp,[e.createTextVNode(e.toDisplayString(V.value.time)+"–"+e.toDisplayString(ct.value)+" ",1),V.value.session?(e.openBlock(),e.createElementBlock("span",Tp,e.toDisplayString(i.value.intoSession),1)):e.createCommentVNode("",!0),kt.value?(e.openBlock(),e.createElementBlock("span",Rp," ⚠ "+e.toDisplayString(i.value.conflictCount)+": "+e.toDisplayString(kt.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Dp,e.toDisplayString(E.value.name),1)],6)):e.createCommentVNode("",!0)],42,pp))),128))],4),e.createElementVNode("div",Ap,e.toDisplayString(i.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",dp,[e.createTextVNode(e.toDisplayString(i.value.noHalls)+" ",1),e.createVNode(C,{flat:"",color:"primary",size:"sm",label:i.value.addHall,onClick:it},null,8,["label"])])),k.value&&V.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:k.value.x+"px",top:k.value.y+"px"})},[e.createVNode(e.unref(N.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(V.value.time)+" · "+e.toDisplayString(V.value.hallName)+" ",1),V.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[16]||(g[16]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(N.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(i.value.intoSession)+" «"+e.toDisplayString(d(V.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),kt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[17]||(g[17]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(N.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(kt.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(De=wt.value)!=null&&De.moved&&k.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:k.value.x+"px",top:k.value.y+"px"})},[e.createVNode(e.unref(N.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(wt.value.perfom.startTime)+"–"+e.toDisplayString(wt.value.perfom.endTime)+" · "+e.toDisplayString(i.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt(he.value),D=>(e.openBlock(),e.createBlock(e.unref(N.QCard),{key:D.id,class:"hall-card q-mb-md"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),{class:"hall-card-head"},{default:e.withCtx(()=>[e.createElementVNode("div",_p,[e.createVNode(e.unref(N.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",Fp,e.toDisplayString(Ct(D)),1),e.createVNode(e.unref(N.QSpace)),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.session,onClick:X=>Ll(D)},null,8,["label","onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.slot,onClick:X=>vl(D)},null,8,["label","onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:X=>we(D)},{default:e.withCtx(()=>[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])]),_:2},1024),e.createVNode(e.unref(N.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var X;return[(X=D.sessions)!=null&&X.length?(e.openBlock(),e.createElementBlock("div",Op,[e.createElementVNode("div",Lp,[e.createVNode(e.unref(N.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(i.value.sessionsTitle),1)]),e.createVNode(e.unref(Co),{list:D.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:K=>Al(K,D,"session")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",vp,[e.createVNode(e.unref(N.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(R,{"model-value":K.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":W=>K.name=W,onBlur:W=>xt(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.startTime=W,onBlur:W=>xt(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.endTime=W,onBlur:W=>xt(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.renderSlot(p.$slots,"session-row-extra",{element:K,schedule:D},void 0,!0),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>Wr(K,"session")},null,8,["onClick"])]),Xe(K).length?(e.openBlock(),e.createElementBlock("div",Hp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe(K),W=>(e.openBlock(),e.createElementBlock("div",{key:W.id,class:"list-row nested-row"},[e.createVNode(e.unref(N.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),e.createElementVNode("div",Up,e.toDisplayString(c(W)),1),e.createElementVNode("div",qp,e.toDisplayString(W.startTime)+"–"+e.toDisplayString(W.endTime),1),e.createVNode(e.unref(N.QSpace)),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:Cn=>Ci({kind:"slot",item:W})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",jp,[e.createElementVNode("div",Wp,[e.createVNode(e.unref(N.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(i.value.slotsTitle),1)]),e.createVNode(e.unref(Co),{list:qt(D),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:K=>Al(K,D,"slot")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",Gp,[e.createVNode(e.unref(N.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(R,{"model-value":K.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":W=>K.name=W,onBlur:W=>xt(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.startTime=W,onBlur:W=>xt(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.endTime=W,onBlur:W=>xt(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(J,{"model-value":K.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:zl(D),"option-value":"id","option-label":"label","onUpdate:modelValue":W=>Ol(K,W)},null,8,["model-value","label","options","onUpdate:modelValue"]),e.renderSlot(p.$slots,"slot-row-extra",{element:K,schedule:D},void 0,!0),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>Wr(K,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!qt(D).length&&!Gn(D)?(e.openBlock(),e.createElementBlock("div",Qp,e.toDisplayString(i.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",Yp,e.toDisplayString(i.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",sp,[e.createVNode(e.unref(N.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(i.value.noDays),1),e.createVNode(C,{color:"primary",outline:"",label:i.value.addDay,icon:"event",class:"q-mt-sm",onClick:Ut},null,8,["label"])])),e.createVNode(me,{modelValue:h.value,"onUpdate:modelValue":g[7]||(g[7]=D=>h.value=D)},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCard),{style:{width:"700px","max-width":"80vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",Xp,e.toDisplayString(i.value.addHall),1)]),_:1}),e.createVNode(e.unref(N.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",Zp,[e.createVNode(R,{modelValue:w.value,"onUpdate:modelValue":g[5]||(g[5]=D=>w.value=D),label:i.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(Rt,["enter"])},null,8,["modelValue","label"]),e.createVNode(C,{color:"primary",label:i.value.create,icon:"add",dense:"",onClick:Rt},null,8,["label"])]),e.renderSlot(p.$slots,"places-list",{day:he.value,add:je},()=>[Ce.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Jp,e.toDisplayString(i.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,D=>(e.openBlock(),e.createElementBlock("div",{key:D.id,class:"place-row row items-center q-gutter-sm"},[e.createVNode(e.unref(N.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),e.createElementVNode("span",Kp,e.toDisplayString(a(D)),1),e.createVNode(C,{size:"sm",color:"primary",outline:"",label:i.value.addHall,icon:"add",dense:"",onClick:X=>je(D)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(N.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(C,{label:i.value.close,color:"primary",onClick:g[6]||(g[6]=D=>h.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(me,{modelValue:y.value,"onUpdate:modelValue":g[14]||(g[14]=D=>y.value=D)},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCard),{style:{width:"640px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),null,{default:e.withCtx(()=>{var D;return[e.createElementVNode("div",eg,e.toDisplayString(((D=S.value)==null?void 0:D.kind)==="session"?i.value.session:i.value.slot),1)]}),_:1}),S.value?(e.openBlock(),e.createBlock(e.unref(N.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:S.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=D=>S.value.item.name=D),label:i.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",tg,[e.createElementVNode("div",ng,[e.createVNode(R,{modelValue:S.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=D=>S.value.item.startTime=D),label:i.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",ig,[e.createVNode(R,{modelValue:S.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=D=>S.value.item.endTime=D),label:i.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),S.value.kind==="slot"?(e.openBlock(),e.createBlock(J,{key:0,"model-value":S.value.item.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:Cb.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=D=>Ol(S.value.item,D))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"edit-form",{kind:S.value.kind,item:S.value.item,schedule:Fl.value},void 0,!0),S.value.kind==="slot"?(e.openBlock(),e.createBlock(R,{key:1,modelValue:S.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=D=>S.value.item.description=D),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(N.QCardActions),{align:"right"},{default:e.withCtx(()=>[S.value?(e.openBlock(),e.createBlock(C,{key:0,flat:"",color:"negative",label:i.value.delete,onClick:Eb},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QSpace)),e.createVNode(C,{flat:"",label:i.value.cancel,color:"primary",onClick:g[13]||(g[13]=D=>y.value=!1)},null,8,["label"]),e.createVNode(C,{label:i.value.save,color:"primary",onClick:xb},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"])])}}}),[["__scopeId","data-v-cfbff9e3"]]),og={class:"schedule-timeline"},rg={key:0,class:"timeline-container"},sg={class:"day-header"},ag={class:"day-title"},lg={class:"timeline"},cg={key:0,class:"schedule-place"},dg={class:"events-column"},ug={key:0,class:"event-item session-item"},fg={class:"event-content"},mg={class:"event-time"},hg={class:"event-main"},pg={class:"event-name"},gg={key:0,class:"speakers-list"},yg=["onClick"],wg={class:"speaker-details"},bg={class:"speaker-name"},Sg={class:"bio-text"},Cg=["onClick"],kg={key:0,class:"perfom-divider"},xg={class:"event-content"},Eg={class:"event-time"},Bg={class:"event-main"},Ng={class:"event-name"},$g={class:"event-badges"},Vg={key:0,class:"speakers-list"},Ig=["onClick"],Mg={class:"speaker-details"},Pg={class:"speaker-name"},Tg={class:"bio-text"},Rg={key:1,class:"no-program"},Oa=z(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 i=n,o=t,r=e.computed(()=>({noProgram:i.noProgramText||"Программа пока не опубликована"})),s=k=>{if(i.dayTitle)return i.dayTitle(k);const T=new Date(k.date);return isNaN(T.getTime())||T.getFullYear()<2e3?"":T.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=k=>{var T;return i.placeName?i.placeName(k):((T=k.place)==null?void 0:T.name)||k.placeName||""},d=k=>i.slotName?i.slotName(k):(k==null?void 0:k.name)||"",c=k=>i.sessionName?i.sessionName(k):(k==null?void 0:k.name)||"",u=k=>i.slotParticipants?i.slotParticipants(k):(k==null?void 0:k.participants)||[],f=k=>i.sessionParticipants?i.sessionParticipants(k):(k==null?void 0:k.participants)||[],m=k=>{var T,M;return i.participantName?i.participantName(k):(k==null?void 0:k.name)||(k==null?void 0:k.fullName)||((M=(T=k==null?void 0:k.human)==null?void 0:T.getFullName)==null?void 0:M.call(T))||""},h=k=>i.participantBio?i.participantBio(k):(k==null?void 0:k.bio)||(k==null?void 0:k.regalias)||"",w=k=>i.slotListOf?i.slotListOf(k):(k==null?void 0:k.slots)||[],y=k=>i.nestedSlotListOf?i.nestedSlotListOf(k):(k==null?void 0:k.slots)||[],S=k=>k.schedules.filter(T=>{var M;return w(T).length>0||(((M=T.sessions)==null?void 0:M.length)||0)>0}),E=k=>{const T=[],M=new Set((k.sessions||[]).map(Q=>Q.id));for(const Q of k.sessions||[]){T.push({kind:"session",item:Q,nested:!1,index:0});for(const se of y(Q))T.push({kind:"slot",item:se,nested:!0,index:0})}let A=0;for(const Q of w(k).filter(se=>!se.sessionId||!M.has(se.sessionId)))T.push({kind:"slot",item:Q,nested:!1,index:A++});return T},x=e.computed(()=>{var k;return(k=i.days)==null?void 0:k.some(T=>{var M;return(M=T.schedules)==null?void 0:M.some(A=>{var Q;return w(A).length>0||(((Q=A.sessions)==null?void 0:Q.length)||0)>0})})}),V=(k,T)=>`${k} - ${T}`;return(k,T)=>(e.openBlock(),e.createElementBlock("div",og,[x.value?(e.openBlock(),e.createElementBlock("div",rg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,M=>(e.openBlock(),e.createElementBlock("div",{key:M.id,class:"day-section"},[e.createElementVNode("div",sg,[e.createElementVNode("div",ag,[e.createVNode(e.unref(N.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s(M)),1)])]),e.createElementVNode("div",lg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S(M),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"time-slot"},[a(A)?(e.openBlock(),e.createElementBlock("div",cg,[e.createVNode(e.unref(N.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(A)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",dg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E(A),Q=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Q.item.id},[Q.kind==="session"?(e.openBlock(),e.createElementBlock("div",ug,[e.createElementVNode("div",fg,[e.createElementVNode("div",mg,e.toDisplayString(V(Q.item.startTime,Q.item.endTime)),1),e.createElementVNode("div",hg,[e.createElementVNode("div",pg,e.toDisplayString(c(Q.item)),1),f(Q.item).length?(e.openBlock(),e.createElementBlock("div",gg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(Q.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:_e=>o("open-participant",se)},[e.createElementVNode("div",wg,[e.createElementVNode("div",bg,[e.createVNode(e.unref(N.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Sg,e.toDisplayString(h(se)),1)])],8,yg))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":Q.item.active,"nested-item":Q.nested},{clickable:i.slotClickable}]]),onClick:se=>i.slotClickable&&o("slot-click",Q.item)},[!Q.nested&&Q.index>0?(e.openBlock(),e.createElementBlock("div",kg)):e.createCommentVNode("",!0),e.createElementVNode("div",xg,[e.createElementVNode("div",Eg,e.toDisplayString(V(Q.item.startTime,Q.item.endTime)),1),e.createElementVNode("div",Bg,[e.createElementVNode("div",Ng,e.toDisplayString(d(Q.item)),1),e.createElementVNode("div",$g,[e.renderSlot(k.$slots,"badges",{item:Q.item},void 0,!0)]),u(Q.item).length?(e.openBlock(),e.createElementBlock("div",Vg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(Q.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:_e=>o("open-participant",se)},[e.createElementVNode("div",Mg,[e.createElementVNode("div",Pg,[e.createVNode(e.unref(N.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Tg,e.toDisplayString(h(se)),1)])],8,Ig))),128))])):e.createCommentVNode("",!0)])])],10,Cg))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",Rg,[e.createVNode(e.unref(N.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),e.createElementVNode("p",null,e.toDisplayString(r.value.noProgram),1)])),e.renderSlot(k.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),Dg=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Fa,ScheduleTimeline:Oa},Symbol.toStringTag,{value:"Module"})),Ag=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:pn,blockSizeClass:Aa,blockStyle:Ma,byStart:pr,diffM:hi,findEnclosingSession:Da,fromMin:rt,gridBounds:Ia,hasConflict:Ta,intersects:pi,nestedConflict:Ra,nestedSlotStyle:Pa,normTime:vn,snapMinutes:gi,toMin:fe},Symbol.toStringTag,{value:"Module"}));let zg=class extends ue{constructor(){super(no,"schedule-days")}};const _g=new zg;let Fg=class extends ue{constructor(){super(Ln,"schedule-places")}};const Og=new Fg;let Lg=class extends ue{constructor(){super(On,"schedule-sessions")}};const vg=new Lg;let Hg=class extends ue{constructor(){super(Ft,"schedule-slots")}};const Ug=new Hg;let qg=class extends ue{constructor(){super(mi,"schedule-timetables")}};const jg=new qg,Wg=Object.freeze(Object.defineProperty({__proto__:null,C:op,Components:Dg,H:Ag,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:_g,SchedulePlacesStore:Og,ScheduleSessionsStore:vg,ScheduleSlotsStore:Ug,SchedulesStore:jg},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:za,defaultScheduleLabels:gr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Gg=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:ui},Symbol.toStringTag,{value:"Module"}));let Qg=class extends ue{constructor(){super(ui,"color-themes")}};const Yg=new Qg,Xg=Object.freeze(Object.defineProperty({__proto__:null,C:Gg,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Yg},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Zg=["innerHTML"],yr=z(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 i=n,o=t;e.onBeforeMount(()=>{i.tabsStore.Select()});const r=s=>{i.tabsStore.Select(s),o("select")};return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tabs-wrapper",{compact:n.compact,vertical:n.vertical}])},[e.createVNode(e.unref(N.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,d=>(e.openBlock(),e.createBlock(e.unref(N.QTab),{key:d.value,name:d.value,label:d.htmlLabel?void 0:d.label,icon:d.icon,"no-caps":""},{default:e.withCtx(()=>[d.htmlLabel?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:d.htmlLabel},null,8,Zg)):e.createCommentVNode("",!0),d.alert?(e.openBlock(),e.createBlock(e.unref(N.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(N.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,d=>(e.openBlock(),e.createBlock(e.unref(N.QTabPanel),{key:d.value,name:d.value,class:"tab-panel"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{item:d,tab:d},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])],2))}}),[["__scopeId","data-v-80c4d829"]]),Jg={class:"q-pa-md"},wr=z(e.defineComponent({__name:"PTabsLeft",props:{buttons:{type:Array,default:()=>[]},tabsStore:{type:Object,required:!0}},emits:["select"],setup(n,{emit:t}){const i=n,o=t,r=a=>{i.tabsStore.Select(a),o("select")},s=e.ref(20);return(a,d)=>(e.openBlock(),e.createBlock(e.unref(N.QSplitter),{modelValue:e.unref(s),"onUpdate:modelValue":d[0]||(d[0]=c=>e.isRef(s)?s.value=c:null),class:"full-height"},{before:e.withCtx(()=>[e.createVNode(e.unref(N.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,c=>(e.openBlock(),e.createBlock(e.unref(N.QTab),{key:c.value,name:c.value,label:c.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",Jg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(c,u)=>(e.openBlock(),e.createBlock(oe,{key:u,label:c.text,color:c.color,class:"q-mb-sm full-width",onClick:f=>c.action(c)},null,8,["label","color","onClick"]))),128))])]),after:e.withCtx(()=>[e.createVNode(e.unref(N.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(),c=>(e.openBlock(),e.createBlock(e.unref(N.QTabPanel),{key:c.value,name:c.value},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{item:c},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-a7a16408"]]);class io{constructor(){l(this,"items",[]);l(this,"idx",0);l(this,"key","");l(this,"value","")}preSelect(){var i;const t=P.H.Router.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select((i=this.items[0])==null?void 0:i.value);return}this.Select(t)}static ToTab(t,i="",o=""){return{label:o,value:i,...t}}static Create(t,i){const o=new io;return o.key=t,o.items=i,o.items.length&&o.preSelect(),o}Select(t){if(!this.items.length)return;if(t===void 0)return this.preSelect();this.idx=this.items.findIndex(o=>o.value===t),this.value=t;const i=this.GetValue();i&&P.H.Router.SetQueryParam(this.key,i)}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 La(n){n.component("PTabs",yr),n.component("PTabsLeft",wr)}const Kg=Object.freeze(Object.defineProperty({__proto__:null,Buildings:vf,Chats:Yf,Contacts:Tm,Docs:qm,Extracts:Ym,Forms:Sh,Menus:Vh,Pages:Jh,Schedule:Wg,Settings:Xg,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:yr,PTabsLeft:wr,TabsStore:io,default:La},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),va=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 i=e.useModel(n,"modelValue"),o=t,r=e.useAttrs(),s=e.computed(()=>{const d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{o("change",i.value)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:"p-checkbox",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(N.QCheckbox),e.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.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))}}),Ha=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 i=t,o=e.useAttrs(),r=e.computed(()=>{const s={};for(const a of Object.keys(o))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=o[a]);return s});return(s,a)=>(e.openBlock(),e.createBlock(e.unref(N.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]=d=>i("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"]))}}),e1={class:"row items-center justify-end"},oo="DD.MM.YYYY",ro=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}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const i=n,o=t,r=e.useModel(n,"modelValue"),s=oo.replace(/[DMY]/g,"#"),a=e.ref(null),d=y=>{if(i.modelType){a.value=i.modelType;return}y instanceof Date?a.value="date":(typeof y=="string"&&y||a.value===null)&&(a.value="string")},c=y=>{if(!y)return"";if(y instanceof Date)return Number.isNaN(y.getTime())?"":N.date.formatDate(y,oo);const S=String(y).match(/^(\d{4})-(\d{2})-(\d{2})/);if(S)return`${S[3]}.${S[2]}.${S[1]}`;const E=new Date(y);return Number.isNaN(E.getTime())?"":N.date.formatDate(E,oo)},u=y=>{const S=y.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!S)return null;const E=+S[1],x=+S[2],V=+S[3];if(E<1||E>31||x<1||x>12||V<1900||V>2100)return null;const k=new Date(V,x-1,E);return k.getFullYear()!==V||k.getMonth()!==x-1||k.getDate()!==E?null:k},f=e.ref(c(r.value));d(r.value),e.watch(r,y=>{d(y);const S=c(y);S!==f.value&&(f.value=S)});const m=y=>{const S=typeof y=="number"?String(y):y;if(!S){const x=a.value==="date"?null:"";r.value=x,o("input",x);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(S))return;const E=u(S);if(E)if(a.value==="date")r.value=E,o("input",E);else{const x=E.getFullYear(),V=String(E.getMonth()+1).padStart(2,"0"),k=String(E.getDate()).padStart(2,"0"),T=`${x}-${V}-${k}`;r.value=T,o("input",T)}},h=()=>{o("blur",r.value)},w={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(y,S)=>{const E=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(ot,{modelValue:e.unref(f),"onUpdate:modelValue":[S[1]||(S[1]=x=>e.isRef(f)?f.value=x:null),m],class:"fit",label:n.label,placeholder:n.placeholder,mask:e.unref(s),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,inputmode:"numeric",onBlur:h},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QDate),{modelValue:e.unref(f),"onUpdate:modelValue":S[0]||(S[0]=x=>e.isRef(f)?f.value=x:null),mask:oo,"today-btn":"",locale:w},{default:e.withCtx(()=>[e.createElementVNode("div",e1,[e.withDirectives(e.createVNode(oe,{label:"Готово",color:"primary",flat:""},null,512),[[E]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:e.withCtx(()=>[e.renderSlot(y.$slots,"before")]),append:e.withCtx(()=>[e.renderSlot(y.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width"])}}}),t1=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 i=t,o=e.useModel(n,"modelValue"),r=d=>{const c=d.getFullYear(),u=String(d.getMonth()+1).padStart(2,"0"),f=String(d.getDate()).padStart(2,"0");return`${c}-${u}-${f}`},s=d=>{i("input",d instanceof Date?r(d):d??null)},a=()=>{i("blur")};return(d,c)=>(e.openBlock(),e.createBlock(ro,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder||void 0,margin:n.margin,padding:n.padding,onBlur:a,onInput:s},{before:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),append:e.withCtx(()=>[e.renderSlot(d.$slots,"right")]),_:3},8,["modelValue","label","placeholder","margin","padding"]))}}),n1={class:"row items-center justify-end"},i1={class:"row items-center justify-end"},Ua=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:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),i=e.ref(""),o=e.ref(""),r=e.ref(""),s=w=>w?N.date.formatDate(w,"DD.MM.YYYY HH:mm"):"",a=w=>{if(!w||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(w))return null;const y=N.date.extractDate(w,"DD.MM.YYYY HH:mm");return Number.isNaN(y.getTime())?null:y},d=w=>{t.value=w},c=w=>{const y=String(w??"");i.value=y.replace(/[_\s]/g,"")===""?"":y},u=()=>{const w=a(i.value);w?d(w):i.value===""?d(null):i.value=s(t.value)},f=()=>{if(o.value){const w=t.value?N.date.formatDate(t.value,"HH:mm"):"00:00",y=`${o.value} ${w}`,S=a(y);S&&(i.value=s(S),d(S))}o.value=""},m=()=>{if(r.value){const w=t.value?N.date.formatDate(t.value,"DD.MM.YYYY"):"",y=N.date.formatDate(new Date,"DD.MM.YYYY"),S=w?`${w} ${r.value}`:`${y} ${r.value}`,E=a(S);E&&(i.value=s(E),d(E))}r.value=""};e.watch(t,w=>{w!==a(i.value)&&(i.value=s(w??null))},{immediate:!0});const h={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(w,y)=>{const S=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(ot,{"model-value":e.unref(i),label:n.label,placeholder:n.placeholder,disable:n.disable,readonly:n.readonly,error:n.error,"error-message":n.errorMessage,mask:"##.##.#### ##:##","fill-mask":"","onUpdate:modelValue":c,onBlur:u},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QDate),{modelValue:e.unref(o),"onUpdate:modelValue":y[0]||(y[0]=E=>e.isRef(o)?o.value=E:null),mask:"DD.MM.YYYY",locale:h},{default:e.withCtx(()=>[e.createElementVNode("div",n1,[e.withDirectives(e.createVNode(oe,{label:"OK",color:"primary",flat:"",onClick:f},null,512),[[S]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"access_time",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QTime),{modelValue:e.unref(r),"onUpdate:modelValue":y[1]||(y[1]=E=>e.isRef(r)?r.value=E:null),mask:"HH:mm",format24h:"",locale:h},{default:e.withCtx(()=>[e.createElementVNode("div",i1,[e.withDirectives(e.createVNode(oe,{label:"OK",color:"primary",flat:"",onClick:m},null,512),[[S]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model-value","label","placeholder","disable","readonly","error","error-message"])}}}),o1=z(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,i)=>(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"]]),r1={class:"p-hint-popup"},br=z(e.defineComponent({__name:"PHint",props:{text:{}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.text?(e.openBlock(),e.createBlock(e.unref(N.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:o[0]||(o[0]=e.withModifiers(r=>t.value=!0,["stop"]))},{default:e.withCtx(()=>[e.createVNode(mt,{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(N.QMenu),{modelValue:e.unref(t),"onUpdate:modelValue":o[1]||(o[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",r1,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),s1=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 i=t,o=e.useModel(n,"modelValue");let r=null;const s=d=>{i("input",d),r=d instanceof Date?d:null},a=()=>{r instanceof Date&&(i("beforeChange",r),i("change",r),r=null)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:"style-container",style:e.normalizeStyle({width:n.width,position:"relative"})},[e.createVNode(ro,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder,margin:n.margin,onBlur:a,onInput:s},null,8,["modelValue","label","placeholder","margin"])],4))}}),a1=z(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,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),i[1]||(i[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"]]),l1=z(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,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),i[1]||(i[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"]]),c1=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}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:t}){const i=t,o=e.useAttrs(),r=e.computed(()=>typeof o.id=="string"?o.id:void 0),s=e.computed(()=>{const M={};for(const A of Object.keys(o))A!=="id"&&(M[A]=o[A]);return M}),a=n,d=()=>{const M=a.step.toString();return M.includes(".")?M.split(".")[1].length:0},c=d(),u=e.useModel(n,"modelValue"),m=(M=>Math.min(Math.max(M,a.min),a.max))(u.value);m!==u.value&&(u.value=m);const h=e.ref(m.toFixed(d())),w=e.computed(()=>{const M={};return a.margin&&(M.margin=a.margin),a.padding&&(M.padding=a.padding),M}),y=M=>{const A=Math.pow(10,c);return Math.round(M*A)/A},S=(M,...A)=>{u.value=y(M),h.value=y(M).toFixed(d()),A.forEach(Q=>i(Q,u.value))},E=(M,...A)=>{a.disabled||M>a.max||M<a.min||S(M,...A)},x=()=>E(+h.value+a.step,"change"),V=()=>E(+h.value-a.step,"change"),k=M=>E(Number(M),"input"),T=()=>E(+h.value,"change","blur");return(M,A)=>(e.openBlock(),e.createBlock(e.unref(N.QInput),e.mergeProps(e.unref(s),{for:e.unref(r),"model-value":e.unref(h),label:n.label||void 0,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:e.unref(w),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":k,onBlur:T}),{before:e.withCtx(()=>[e.createVNode(e.unref(N.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:V},{default:e.withCtx(()=>[e.createVNode(a1)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(N.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:x},{default:e.withCtx(()=>[e.createVNode(l1)]),_:1})]),_:1},16,["for","model-value","label","disable","input-style","style"]))}}),d1=z(c1,[["__scopeId","data-v-6f4093e8"]]),u1=z(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 i=n,o=t,r=e.ref(i.open);e.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>{const c=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(N.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:d[0]||(d[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(c,{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(c,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),f1=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,i)=>(e.openBlock(),e.createBlock(e.unref(N.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"]))}}),m1=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,i)=>(e.openBlock(),e.createBlock(e.unref(N.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"]))}}),h1={class:"tags-selector"},p1={key:0,class:"empty-state"},qa=z(e.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:t}){const i=n,o=e.ref(""),r=i.store.Options,s=e.computed(()=>r.filter(c=>P.H.Strings.SearchIn(c.label,o.value))),a=t;e.onBeforeMount(async()=>{await i.store.GetOptions()});const d=async c=>{await i.store.Get(c.value),a("select",i.store.Item)};return(c,u)=>{const f=e.resolveDirective("ripple");return e.openBlock(),e.createElementBlock("div",h1,[e.createVNode(ot,{modelValue:e.unref(o),"onUpdate:modelValue":u[0]||(u[0]=m=>e.isRef(o)?o.value=m:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),e.createVNode(e.unref(N.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.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(N.QItem),{key:m.value,clickable:"",class:"tag-item",onClick:h=>d(m)},{default:e.withCtx(()=>[e.createVNode(e.unref(N.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",p1,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),so=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:()=>[]}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{emit:t}){const i=e.useModel(n,"modelValue"),o=t,r=e.useAttrs(),s=e.computed(()=>typeof r.id=="string"?r.id:void 0),a=e.computed(()=>{const h={};for(const w of Object.keys(r))w!=="id"&&w!=="disable"&&(h[w]=r[w]);return h}),d=n,c=e.computed(()=>r.disable??d.disabled),u=h=>{o("change",h)},f=()=>{o("clear",void 0)},m=e.computed(()=>{const h={};return d.margin&&(h.margin=d.margin),d.padding&&(h.padding=d.padding),d.width&&(h.width=d.width),d.inPadding&&(h.padding=d.inPadding),h});return(h,w)=>(e.openBlock(),e.createBlock(e.unref(N.QSelect),e.mergeProps({modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=y=>i.value=y)},e.unref(a),{for:e.unref(s),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,disable:e.unref(c),readonly:n.readonly,"input-style":{color:n.color||void 0},style:e.unref(m),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u,onClear:f}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(h.$slots,"before",{},()=>[e.renderSlot(h.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(h.$slots,"append",{},()=>[e.renderSlot(h.$slots,"right")])]),_:2},[h.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"prepend")]),key:"0"}:void 0,h.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"after")]),key:"1"}:void 0,h.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),key:"2"}:void 0,h.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"label")]),key:"3"}:void 0,h.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"error")]),key:"4"}:void 0,h.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"hint")]),key:"5"}:void 0,h.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"counter")]),key:"6"}:void 0,h.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"loading")]),key:"7"}:void 0,h.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"selected")]),key:"8"}:void 0,h.$slots.option?{name:"option",fn:e.withCtx(y=>[e.renderSlot(h.$slots,"option",e.normalizeProps(e.guardReactiveProps(y)))]),key:"9"}:void 0,h.$slots["no-option"]?{name:"no-option",fn:e.withCtx(y=>[e.renderSlot(h.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(y)))]),key:"10"}:void 0,h.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"before-options")]),key:"11"}:void 0,h.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"after-options")]),key:"12"}:void 0,h.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(y=>[e.renderSlot(h.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(y)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","disable","readonly","input-style","style"]))}}),ja=e.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var d;const t=n,i=((d=t.storeOpts)==null?void 0:d.Options)??[],o=e.ref(i);async function r(c,u,f,m){var S,E;const w="set"+(((S=u[0])==null?void 0:S.toUpperCase())+u.slice(1)),y=c[w];typeof y=="function"?y(f):(c[u]=f,c[u+"Id"]=f==null?void 0:f.id),await((E=m==null?void 0:m.Update)==null?void 0:E.call(m,c))}const s=(c,u)=>{if(c===""){u(()=>{o.value=i});return}u(()=>{o.value=i.filter(f=>P.H.Strings.SearchInFields(c,[f.label]))})},a=async c=>{c?(await t.storeOpts.Get(c.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()=>{i.length>0||await t.storeOpts.GetOptions(t.optLabel,t.optValue)}),(c,u)=>(e.openBlock(),e.createBlock(so,{"use-input":"",options:e.unref(o),"model-value":n.item[n.prop+"Id"],label:n.label,disable:n.disabled,"map-options":"",clearable:"",dense:"",outlined:"","hide-bottom-space":"","onUpdate:modelValue":a,onFilter:s},{append:e.withCtx(()=>[e.createVNode(br,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),g1=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 i=e.useModel(n,"modelValue"),o=t,r=n,s=()=>{o("change",r.value)};return(a,d)=>(e.openBlock(),e.createElementBlock("div",{class:"p-radio",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(N.QRadio),{modelValue:i.value,"onUpdate:modelValue":[d[0]||(d[0]=c=>i.value=c),s],val:n.value,name:n.name,label:n.label||void 0,size:n.size,style:e.normalizeStyle({fontSize:n.fontSize})},null,8,["modelValue","val","name","label","size","style"])],4))}}),y1=z(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 i=n,o=t,r=e.ref(i.open);e.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>{const c=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(N.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:d[0]||(d[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(c,{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(c,{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"]]),w1=z(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,i)=>(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"]]),b1=e.defineComponent({__name:"PTable",props:{margin:{type:String,required:!1,default:"0 0 20px 0"},width:{type:String,required:!1,default:"100%"},fontSize:{type:String,required:!1,default:"var(--font-size-default)"}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock("table",e.mergeProps(t.$attrs,{style:{width:n.width,margin:n.margin},class:"p-table"}),[e.createElementVNode("thead",null,[e.renderSlot(t.$slots,"thead")]),e.createElementVNode("tbody",null,[e.renderSlot(t.$slots,"tbody")])],16))}}),Wa=z(e.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const t=n,i=e.computed(()=>t.row[t.prop]),o=async()=>{t.row[t.prop]=!t.row[t.prop],await t.store.Update(t.row)};return(r,s)=>(e.openBlock(),e.createBlock(e.unref(N.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:o())},[e.createVNode(e.unref(N.QIcon),{name:e.unref(i)?"check_circle":"radio_button_unchecked",color:e.unref(i)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),e.createVNode(mt,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),S1=z(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}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue"),i=e.useAttrs(),o=e.computed(()=>typeof i.id=="string"?i.id:void 0),r=e.computed(()=>{const c={};for(const u of Object.keys(i))u!=="id"&&(c[u]=i[u]);return c}),s=n,a=e.computed(()=>({color:s.color||void 0,resize:s.resize})),d=e.computed(()=>{const c={};return s.margin&&(c.margin=s.margin),s.padding&&(c.padding=s.padding),s.borderColor&&(c["--p-border-color"]=s.borderColor),c});return(c,u)=>(e.openBlock(),e.createBlock(e.unref(N.QInput),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=f=>t.value=f)},e.unref(r),{for:e.unref(o),label:n.label||void 0,mask:n.mask,type:"textarea","input-style":e.unref(a),style:e.unref(d),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>c.$emit("input",t.value)),onBlur:u[2]||(u[2]=f=>c.$emit("blur",t.value)),onFocus:u[3]||(u[3]=f=>c.$emit("focus",t.value))}),{before:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),append:e.withCtx(()=>[e.renderSlot(c.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","input-style","style"]))}}),[["__scopeId","data-v-8e01fef2"]]),Ga=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 i=e.useModel(n,"modelValue"),o=t,r=e.useAttrs(),s=e.computed(()=>{const d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{o("change",i.value)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:"p-toggle",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(N.QToggle),e.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.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))}}),C1={class:"top-slider-content"},k1={class:"center"},x1=z(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 i=n,o=t,r=e.ref(i.open);e.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=e.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[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:d[3]||(d[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",C1,[e.createElementVNode("div",k1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createVNode(e.unref(N.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:d[2]||(d[2]=c=>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 E1(n){n.component("PButton",oe),n.component("PBadge",ai),n.component("PCheckBox",va),n.component("PChip",Ha),n.component("PDateInput",ro),n.component("PDatePicker",t1),n.component("PDateTimeInput",Ua),n.component("PDialog",cn),n.component("PFlex",o1),n.component("PHint",br),n.component("PInput",ot),n.component("PInputDate",s1),n.component("PInputNumber",d1),n.component("PLeftSlider",u1),n.component("PList",f1),n.component("PListItem",m1),n.component("POptionsListSingle",qa),n.component("POpts",ja),n.component("PRadio",g1),n.component("PRightSlider",y1),n.component("PSelect",so),n.component("PSticky",w1),n.component("PString",tr),n.component("PTextarea",S1),n.component("PTopSlider",x1),n.component("PTable",b1),n.component("PTableToggle",Wa),n.component("PToggle",Ga),n.component("PTooltip",mt)}const B1={key:0,class:"mainblock"},N1={class:"mainblock-right"},$1={class:"body"},V1=z(e.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(n){const t=n,i=e.ref(!1),o=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.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}),i.value=!0}),(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(i)?(e.openBlock(),e.createElementBlock("div",B1,[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(o)&&e.unref(r)?"110%":"0",borderTopLeftRadius:e.unref(r)?"0":"",borderBottomLeftRadius:e.unref(r)?"0":""}),onClick:d[0]||(d[0]=c=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",N1,[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:d[1]||(d[1]=c=>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",$1,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),I1={class:"mainblock-right"},M1={class:"body"},P1=z(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,i=e.ref(!1),o=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.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}),i.value=!0}),(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(i)?(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(o)&&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:d[0]||(d[0]=c=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",I1,[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:d[1]||(d[1]=c=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4),e.createElementVNode("div",M1,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),Qa=z(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,i)=>(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"]]),T1={class:"container"},R1={class:"slide-box"},D1={class:"image"},A1={class:"image-box"},z1=["id","src","alt"],_1={class:"link-number"},F1=["id","onClick"],O1=z(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(w=>({v582c9d05:i}));const t=n,i=`${t.animationTime}ms`,o=e.ref(t.startActiveGroupIndex),r=e.ref(Nt.None),s=e.ref(Zs(t.events,t.quantity)),a=e.computed(()=>s.value[o.value]);e.onMounted(()=>{});const d=()=>o.value=o.value+1<s.value.length?o.value+1:0,c=()=>o.value=o.value-1<0?s.value.length-1:o.value-1,u=w=>{r.value=w,setTimeout(()=>r.value=Nt.None,t.animationTime)},f=w=>{w!=o.value&&(u(w<o.value?Nt.Prev:Nt.Next),setTimeout(()=>o.value=w,t.animationTime/2))},m=()=>{u(Nt.Next),setTimeout(d,t.animationTime/2)},h=()=>{u(Nt.Prev),setTimeout(c,t.animationTime/2)};return(w,y)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",T1,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:y[0]||(y[0]=e.withModifiers(S=>h(),["stop"]))},[...y[3]||(y[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",R1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(S,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",D1,[e.createElementVNode("div",A1,[e.createElementVNode("img",{id:S.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:S.fileInfo.getImageUrl(),alt:S.fileInfo.originalName,onClick:y[1]||(y[1]=x=>w.showImageInFullScreen())},null,12,z1)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:y[2]||(y[2]=e.withModifiers(S=>m(),["stop"]))},[...y[4]||(y[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",_1,[e.createVNode(Qa,{"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),(S,E)=>(e.openBlock(),e.createElementBlock("div",{id:E.toString(),key:E,class:"number",style:e.normalizeStyle({background:E.toString()===e.unref(o).toString()?"#9D9D9D":""}),onClick:e.withModifiers(x=>f(E),["stop"])},e.toDisplayString(E+1),13,F1))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),L1=e.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(i.x),s=e.ref(i.y),a=e.computed(()=>r.value+"px"),d=e.computed(()=>s.value+"px"),c=()=>{o("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(d)})},[e.renderSlot(u.$slots,"default")],4)),[[m,c]])}}}),v1={class:"date-range"},H1=z(e.defineComponent({__name:"DateInputRange",props:{start:{type:Date,default:void 0},end:{type:Date,default:void 0}},emits:["update:start","update:end","setStart","setEnd"],setup(n,{emit:t}){const i=n,o=t;e.watch(()=>[i.start,i.end],()=>{i.start||(r.value=void 0),i.end||(s.value=void 0)});const r=e.ref(i.start),s=e.ref(i.end),a=c=>{r.value=c,!(!i.end||c>i.end)&&(o("update:start",c),o("setStart",c))},d=c=>{s.value=c,!(!i.start||c<i.start)&&(o("update:end",c),o("setEnd",c))};return(c,u)=>{const f=e.resolveComponent("PInputDate");return e.openBlock(),e.createElementBlock("div",v1,[e.createVNode(f,{"model-value":e.unref(r),"onUpdate:modelValue":u[0]||(u[0]=m=>e.isRef(r)?r.value=m:null),onChange:a},null,8,["model-value"]),u[2]||(u[2]=e.createTextVNode(" - ",-1)),e.createVNode(f,{"model-value":e.unref(s),"onUpdate:modelValue":u[1]||(u[1]=m=>e.isRef(s)?s.value=m:null),onChange:d},null,8,["model-value"])])}}}),[["__scopeId","data-v-b93b6d46"]]),U1=e.defineComponent({name:"DateInputRangeV2"}),q1={class:"date-range"};function j1(n,t,i,o,r,s){return e.openBlock(),e.createElementBlock("div",q1,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const W1=z(U1,[["render",j1],["__scopeId","data-v-d28c6f33"]]),G1={class:"drop-item"},Q1={key:0,class:"drop-item-list"},Y1=z(e.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const t=n,i=e.ref(t.rolledUp),o=async()=>{i.value=!i.value};return(r,s)=>{const a=e.resolveComponent("PString"),d=e.resolveComponent("IconArrowDrop");return e.openBlock(),e.createElementBlock("div",G1,[e.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=c=>o())},[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(i)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[e.createVNode(d,{size:"10px",margin:"0"})],4)]),e.unref(i)?(e.openBlock(),e.createElementBlock("div",Q1,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),X1=z(e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Mo,required:!0}},emits:["load"],setup(n,{emit:t}){const i=n,o=e.ref(!1),r=t,s=()=>{i.model.setBoolean(o.value),o.value?P.F.FTSP.Get().setF(i.model):P.F.FTSP.Get().removeF(i.model),r("load")};return(a,d)=>{const c=e.resolveComponent("PCheckBox");return e.openBlock(),e.createBlock(c,{modelValue:e.unref(o),"onUpdate:modelValue":d[0]||(d[0]=u=>e.isRef(o)?o.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),[["__scopeId","data-v-72984c94"]]),Z1=z(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 i=t,o=e.ref(void 0),r=async a=>{_t.Get().replaceF(a,o.value),o.value=a,_t.Get().p.drop()},s=async a=>{await r(a),i("load")};return(a,d)=>{const c=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(c,{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(()=>[...d[0]||(d[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,(h,w)=>(e.openBlock(),e.createBlock(u,{key:w,color:"blue",height:"auto",text:h.label,"is-toggle":h.valueEq(e.unref(o)),"toggle-mode":!0,inverse:n.inverse,onClick:y=>s(h.valueEq(e.unref(o))?void 0:h)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-586481ea"]]),J1=["value","label"],K1=z(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 i=t,o=_t.Get(),r=e.ref(void 0),s=async d=>{o.replaceF(d,r.value),r.value=d},a=async d=>{d?await s(r.value):await s(void 0),i("load")};return(d,c)=>{const u=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(u,{modelValue:e.unref(r),"onUpdate:modelValue":c[0]||(c[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,J1))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-ae66df57"]]),ey=z(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,i)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-e280d85b"]]),ty=z(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(i,o)=>(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:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[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(i.$slots,"general-item",{},void 0,!0)],4),e.createElementVNode("div",{class:"tools-icon",style:e.normalizeStyle({display:n.withIcon?"flex":"none"})},[...o[2]||(o[2]=[e.createElementVNode("svg",{class:"icon-del"},[e.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),o[3]||(o[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"]]),ny={key:0,class:"blur"},iy={style:{display:"flex","justify-content":"center"}},oy=z(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 i=n,o=t,r=i.customClass!==""?i.customClass:"inside-class",s=e.ref(!1),a=e.ref(!1),d=e.ref(!1),c=e.ref(i.close);e.watch(()=>i.close,()=>{a.value=!1});const u=T=>{T.stopPropagation(),T.key==="Escape"&&(i.showSaveDialog?d.value=!0:a.value=!1)};e.watch(a,async()=>{var T,M;await e.nextTick(),a.value?((M=(T=document.getElementById("info-item-opened-content"))==null?void 0:T.querySelector("input"))==null||M.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&o("after-close")});const f=()=>{o("click"),a.value=!!i.withOpenWindow,c.value!==i.close&&(a.value=!1,c.value=!c.value)},m=e.computed(()=>i.customClass===""?{width:i.width,minHeight:"40px",height:"auto",maxWidth:i.maxWidth,minWidth:i.minWidth,margin:i.baseBoxMargin}:void 0),h=e.computed(()=>a.value&&i.withOpenWindow),w=e.computed(()=>({background:i.background?i.background:void 0,zIndex:h.value?"2":"0",padding:h.value?"0":i.padding,margin:i.margin,width:h.value?i.openWidth:i.width,height:h.value?i.openHeight:i.height,minHeight:"40px",maxWidth:i.maxWidth,minWidth:i.minWidth,borderColor:s.value||a.value?i.colorSelected:i.borderColor,color:s.value?i.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${i.colorSelected}`:"none",alignItems:h.value?"end":"center",cursor:(i.withHover,"pointer")})),y=e.computed(()=>({height:h.value?"0":"",overflow:i.closeWindowOverflow,width:i.width})),S=e.computed(()=>({height:h.value?"auto":"0"})),E=e.computed(()=>({color:s.value?i.colorSelected:"#343E5C",fill:s.value?i.colorSelected:"#343E5C",background:i.background})),x=()=>{i.showSaveDialog?d.value=!0:a.value=!1},V=async()=>{await o("keyup-enter"),i.close&&(a.value=!1),d.value=!1},k=()=>{a.value=!1,d.value=!1};return(T,M)=>{const A=e.resolveComponent("PString"),Q=e.resolveComponent("PButton"),se=e.resolveComponent("PModal"),_e=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",ny)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(m)),onClick:M[2]||(M[2]=e.withModifiers(Ne=>f(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(w)),onMouseenter:M[0]||(M[0]=Ne=>n.withHover?s.value=!0:s.value=!1),onMouseleave:M[1]||(M[1]=Ne=>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(y))},[e.renderSlot(T.$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(S))},[e.renderSlot(T.$slots,"open-inside-content",{},void 0,!0)],4)),[[_e,x,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(E))},[e.renderSlot(T.$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(se,{show:e.unref(d),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",iy,[e.createVNode(Q,{text:"Не сохранять",onClick:k}),e.createVNode(Q,{text:"Сохранять",onClick:V})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-e8e8f1a1"]]),ry=z(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 i=e.ref(!1),o=t,r=s=>{i.value=!i.value,o("select",s)};return(s,a)=>{const d=e.resolveComponent("PString"),c=e.resolveComponent("PButton"),u=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(u,{close:e.unref(i),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(c,{key:f,type:"admin",color:"blue",text:f,onClick:m=>r(f)},null,8,["text","onClick"]))),128)),e.createVNode(c,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:e.withCtx(()=>[e.createVNode(d,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),sy={class:"mainblock"},ay={class:"mainline"},ly=z(e.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock("div",sy,[e.createElementVNode("div",ay,[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"]]),Ya=z(e.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),i[1]||(i[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"]]),cy={class:"search-list"},dy=["onClick"],Xa=z(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 i=t,o=n,r=e.ref(o.modelValue),s=e.ref([]);async function a(){i("input",r.value),await d()}async function d(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function c(u){r.value="",i("select",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle({width:n.width})},[e.createVNode(ot,{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(Ya,{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",cy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>(e.openBlock(),e.createElementBlock("li",{key:m.value,onClick:h=>c(m)},e.toDisplayString(m.label),9,dy))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),uy=z(e.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),i=async()=>{};return(o,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:i},null,8,["modelValue"]),e.createVNode(s,{modelValue:t.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>t.value.description=a),onBlur:i},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-51bf3f08"]]),fy={};function my(n,t){return e.openBlock(),e.createElementBlock(e.Fragment,null,[t[0]||(t[0]=e.createElementVNode("div",{class:"blur"},null,-1)),t[1]||(t[1]=e.createElementVNode("div",{class:"loader-container"},[e.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const hy=z(fy,[["render",my],["__scopeId","data-v-0f1f2f84"]]),py={style:{display:"flex","justify-content":"center",width:"100%"}},gy={class:"pag-number"},yy={class:"pag-ul"},wy={key:2},by=z(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,i=m=>m?"active":"neutral",o=m=>m?"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 d=async m=>{if(m!==r.value.curPage&&(m<1&&(m=1),m>r.value.pagesCount()&&(m=r.value.pagesCount()),!t.showConfirm))return await c(m)},c=async(m,h)=>{r.value.setCurPage(m),_t.Get().p.offset=(m-1)*r.value.limit,await t.store.FTSP(),f()},u=e.computed(()=>{const m=r.value.pagesCount();return m<8?zt.GenerateNumsRange(2,m-1).filter(h=>h<m&&h>1):zt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(h=>h<m&&h>1)}),f=()=>{const m=document.querySelector(".el-table__body-wrapper"),h=document.querySelector("#list");m?m.scrollTo({top:0}):h&&h.scrollTo({top:0})};return e.onBeforeUnmount(()=>{_t.Get().p.drop()}),(m,h)=>{const w=e.resolveComponent("ArrowLeft"),y=e.resolveComponent("PButton"),S=e.resolveComponent("DoubleArrowLeft"),E=e.resolveComponent("EllipsisSvg"),x=e.resolveComponent("DoubleArrowRight"),V=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",py,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",gy,[e.createVNode(y,{skin:"pag",type:o(e.unref(r).curPage===1),onClick:h[0]||(h[0]=k=>d(e.unref(r).curPage-1))},{default:e.withCtx(()=>[e.createVNode(w)]),_:1},8,["type"]),e.createElementVNode("ul",yy,[e.createElementVNode("li",null,[e.createVNode(y,{skin:"pag",type:i(e.unref(r).curPage===1),text:"1",onClick:h[1]||(h[1]=k=>d(1))},null,8,["type"])]),e.unref(r).pagesCount()>8&&e.unref(r).curPage>4?(e.openBlock(),e.createElementBlock("li",{key:0,onMouseenter:h[3]||(h[3]=k=>s.value=!0),onMouseleave:h[4]||(h[4]=k=>s.value=!1)},[e.createVNode(y,{skin:"pag",type:"neutral",onClick:h[2]||(h[2]=k=>d(e.unref(r).curPage-5))},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(S,{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),k=>(e.openBlock(),e.createElementBlock("li",{key:k},[e.createVNode(y,{skin:"pag",type:i(k===e.unref(r).curPage),text:k,onClick:T=>d(k)},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:h[6]||(h[6]=k=>a.value=!0),onMouseleave:h[7]||(h[7]=k=>a.value=!1)},[e.createVNode(y,{skin:"pag",type:"neutral",onClick:h[5]||(h[5]=k=>d(e.unref(r).curPage+5))},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(x,{key:0})):(e.openBlock(),e.createBlock(E,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",wy,[e.createVNode(y,{skin:"pag",type:i(e.unref(r).pagesCount()===e.unref(r).curPage),text:e.unref(r).pagesCount(),onClick:h[8]||(h[8]=k=>d(e.unref(r).pagesCount()))},null,8,["type","text"])])):e.createCommentVNode("",!0)]),e.createVNode(y,{skin:"pag",type:o(e.unref(r).curPage===e.unref(r).pagesCount()),onClick:h[9]||(h[9]=k=>d(e.unref(r).curPage+1))},{default:e.withCtx(()=>[e.createVNode(V)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),Sy=z(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 i=n,o=t,r=e.ref(i.modelValue),s=e.ref();let a=er.SearchModel();e.watch(()=>i.focus,()=>{i.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const d=async f=>{if(f.length<2)return;s.value.activated=!0,a=er.SearchModel(),a.searchObjects=[],a.query=f,a.key=i.keyValue;const m=a.searchGroups.find(h=>h.key===i.keyValue);return m&&(a.searchGroup=m),await aa.Search.Search(a),a.searchObjects},c=async f=>{o("select",f),r.value=""},u=f=>{o("input",f),f.length===0&&o("input","")};return(f,m)=>(e.openBlock(),e.createBlock(Xa,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":m[0]||(m[0]=h=>e.isRef(r)?r.value=h:null),"max-height-result-list":n.maxHeightResultList,"z-index-result-list":n.zIndexResultList,"box-shadow-result-list":n.boxShadowResultList,width:n.width,"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:n.placeholder,"search-func":d,"trigger-on-focus":n.showSuggestions,suggestions:e.unref(a).searchObjects,onSelect:c,onInput:u},null,8,["modelValue","max-height-result-list","z-index-result-list","box-shadow-result-list","width","placeholder","trigger-on-focus","suggestions"]))}}),[["__scopeId","data-v-af0b4b1a"]]),Cy={class:"mainblock-body"},ky={class:"mainblock-footer"},xy=z(e.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(n){return(t,i)=>(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",Cy,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",ky,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),Ey={class:"right-slider-content"},By={class:"right-slider-content-header"},Ny={class:"right-slider-content-box"},$y={class:"right-slider-button"},Vy=z(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 i=n,o=t,r=e.ref(!1);e.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,d)=>{const c=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:d[0]||(d[0]=u=>s(!e.unref(r)))},[e.unref(r)?(e.openBlock(),e.createBlock(c,{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(c,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),e.createElementVNode("div",Ey,[e.createElementVNode("div",By,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",Ny,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",$y,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),Iy={class:"mainblock"},My={class:"body-block"},Py={class:"tab-block"},Ty=z(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 i=n,o=t,r=e.ref(!1),s=e.ref(window.matchMedia("(max-width: 768px)").matches),a=c=>{o("toggle",c)},d=e.ref(!1);return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(i.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(c,u)=>(e.openBlock(),e.createElementBlock("div",Iy,[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=>d.value=!0),onMouseleave:u[2]||(u[2]=f=>d.value=!1)},[e.createElementVNode("div",{class:"icon-block",style:e.normalizeStyle({transform:e.unref(d)?n.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":n.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:n.isToggle?"#379FFF":"#00B5A4"})},[e.renderSlot(c.$slots,"icon",{},void 0,!0)],4)],36),e.createElementVNode("div",{class:"slider-info",style:e.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[e.renderSlot(c.$slots,"slider-body",{},void 0,!0)],4)],4),e.createElementVNode("div",My,[e.renderSlot(c.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",Py,[e.renderSlot(c.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),Ry=["label","value"],Dy=z(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const i={[Qe.String]:"Текстовый ответ",[Qe.Text]:"Развёрнутый текстовый ответ",[Qe.Number]:"Числовой ответ",[Qe.Date]:"Ответ в виде даты",[Qe.Radio]:"Выбор одного из вариантов",[Qe.Set]:"Выбор нескольких вариантов",[Qe.File]:"Ответ в виде файла",[Qe.MatrixRadio]:"Матрица с одним выбором",[Qe.MatrixSet]:"Матрица с несколькими выборами"},o=t,r=s=>{o("select",s)};return(s,a)=>{const d=e.resolveComponent("PString"),c=e.resolveComponent("PSelect");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(d,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),e.createVNode(c,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(u,f)=>e.createElementVNode("option",{key:u,label:u,value:f},null,8,Ry)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),Ay=["label","value"],zy=z(e.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const i=e.ref(!1),o=t,r=e.ref();e.onBeforeMount(()=>{i.value=!0,r.value=an.GetDefault()});const s=async d=>{r.value=d??an.GetDefault(),o("load")},a=async d=>{await s(d)};return(d,c)=>{var f;const u=e.resolveComponent("PSelect");return e.unref(i)?(e.openBlock(),e.createBlock(u,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":c[0]||(c[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:c[1]||(c[1]=m=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(an).Get(),(m,h)=>(e.openBlock(),e.createElementBlock("option",{key:h,label:m.label,value:m},null,8,Ay))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-982338b4"]]),_y=["label","value"],Fy=z(e.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const i=t,o=e.ref();e.onBeforeMount(()=>{o.value=an.GetDefault()});const r=async a=>{a||(o.value=an.GetDefault()),_t.Get().setSortModel(o.value),_t.Get().p.drop(),i("load")},s=async a=>{await r(a)};return(a,d)=>{var u;const c=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(c,{modelValue:e.unref(o),"onUpdate:modelValue":d[0]||(d[0]=f=>e.isRef(o)?o.value=f:null),"popper-append-to-body":!1,clearable:!((u=e.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(an).Get(),(f,m)=>(e.openBlock(),e.createElementBlock("option",{key:m,label:f.label,value:f},null,8,_y))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-80f413ec"]]),Oy={class:"switch-container"},Ly={class:"line"},vy={class:"line"},Hy=z(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 i=n,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>i.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>i.secondModel.valueEq(u.value)?void 0:o,d=m=>{var w;return{color:(w=u.value)!=null&&w.valueEq(m)?"#006bb4":"#B0A4C0"}},c=t,u=e.ref(void 0),f=async m=>{var h;(h=u.value)!=null&&h.valueEq(m)||(u.value=m,c("load"))};return(m,h)=>{const w=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",Oy,[e.createElementVNode("div",Ly,[e.createVNode(w,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(d(n.firstModel)),onClick:h[0]||(h[0]=y=>f(n.firstModel))},null,8,["string","style"]),e.createVNode(w,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(d()),onClick:h[1]||(h[1]=y=>f())},null,8,["style"]),e.createVNode(w,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(d(n.secondModel)),onClick:h[2]||(h[2]=y=>f(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",vy,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(r()),onClick:h[3]||(h[3]=y=>f(n.firstModel))},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob2",{active:!e.unref(u)}]),style:e.normalizeStyle(s()),onClick:h[4]||(h[4]=y=>f())},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(a()),onClick:h[5]||(h[5]=y=>f(n.secondModel))},null,6),h[6]||(h[6]=e.createElementVNode("div",{class:"switch-axis"},null,-1)),h[7]||(h[7]=e.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),h[8]||(h[8]=e.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),h[9]||(h[9]=e.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),Uy={},qy={class:"flex"};function jy(n,t){return e.openBlock(),e.createElementBlock("div",qy,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const Wy=z(Uy,[["render",jy],["__scopeId","data-v-5023d414"]]),Gy=z(e.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:t}){const i=e.ref(!1),o=t,r=async()=>{o("submit"),i.value=!i.value};return(s,a)=>{const d=e.resolveComponent("PString"),c=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(i),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(c,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:e.withCtx(()=>[n.content.length>0?(e.openBlock(),e.createBlock(d,{key:0,string:n.content},null,8,["string"])):(e.openBlock(),e.createBlock(d,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-0794596f"]]),Qy={class:"top-slider-content"},Yy={class:"center"},Xy=z(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 i=n,o=t,r=e.ref(!0);e.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=e.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[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:d[3]||(d[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Qy,[e.createElementVNode("div",Yy,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",{class:"click-line",style:e.normalizeStyle({height:n.sliderOffHeight}),onClick:d[2]||(d[2]=c=>s(!e.unref(r)))},[e.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function Zy(n){n.component("PageNotFound",Qs),n.component("AdaptiveContainer",V1),n.component("AdaptiveContainerHorizontal",P1),n.component("CarouselImages",O1),n.component("ContextWindow",L1),n.component("DateInputRangeV2",W1),n.component("DateInputRange",H1),n.component("DropList",Y1),n.component("FilterCheckbox",X1),n.component("FiltersButtonsSelect",Z1),n.component("FilterSelect",K1),n.component("FTSPPanel",ey),n.component("GeneralItem",ty),n.component("GridContainer",Qa),n.component("InfoItem",oy),n.component("InfoItemSelectButtons",ry),n.component("LeftRightContainer",ly),n.component("PAutocomplete",Xa),n.component("PhoneForm",uy),n.component("PLoader",hy),n.component("PPagination",by),n.component("RemoteSearch",Sy),n.component("ResearcheContainer",xy),n.component("RightSliderContainer",Vy),n.component("RightTabsContainer",Ty),n.component("SelectValueType",Dy),n.component("SortList",zy),n.component("SortSelect",Fy),n.component("Switch3Pos",Hy),n.component("ThemeWrapper",Wy),n.component("ToggleInfoItem",Gy),n.component("TopSliderContainer",Xy)}const Jy=z(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(i,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,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),o[3]||(o[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"]]),Ky=z(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(i,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,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),o[3]||(o[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"]]),e0=z(e.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),i[1]||(i[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"]]),t0=z(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,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),i[1]||(i[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"]]),Za=z(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,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),i[1]||(i[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"]]),n0=z(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,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),i[1]||(i[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"]]),i0=z(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,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),i[1]||(i[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"]]),o0=z(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,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),i[1]||(i[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"]]),r0=z(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,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),i[1]||(i[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"]]),s0=z(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,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})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),i[1]||(i[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"]]),a0=z(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(i,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,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),o[3]||(o[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"]]),l0=z(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(i,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,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),o[3]||(o[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"]]),c0=z(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(i,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,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),o[3]||(o[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"]]),d0=z(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(i,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,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),o[3]||(o[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"]]),u0=z(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(i,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,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),o[3]||(o[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 f0(n){n.component("IconDownload",Jy),n.component("IconFilter",Ky),n.component("ArrowLeft",a0),n.component("ArrowRight",l0),n.component("DoubleArrowLeft",c0),n.component("DoubleArrowRight",d0),n.component("EllipsisSvg",u0),n.component("IconArrowLeft",e0),n.component("IconCheckDefault",t0),n.component("IconClose",Za),n.component("IconEdit",n0),n.component("IconEmail",i0),n.component("IconMove",o0),n.component("IconPhone",r0),n.component("IconSearch",Ya),n.component("IconSelectArrow",s0)}const m0=e.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const t=e.ref(n.initActiveIdx),i=o=>{t.value=o};return e.watch(()=>n.initActiveIdx,()=>{i(n.initActiveIdx)}),{changeActiveId:i,activeIdx:t}}});function h0(n,t,i,o,r,s){return e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const p0=z(m0,[["render",h0]]),g0=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 i=e.ref(n.activeId==="0"),o=()=>{i.value=!i.value,t("changeActiveId",n.tabId)};return e.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!0)}),e.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!1)}),{collapsed:i,handleItemClick:o}}}),y0=["for"],w0={class:"inside-icon"};function b0(n,t,i,o,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",w0,[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,y0),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-c2e31ebb><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-c2e31ebb></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-c2e31ebb></path></symbol></svg>',1))],64)}const S0=z(g0,[["render",b0],["__scopeId","data-v-c2e31ebb"]]),C0={class:"tab"},k0={class:"rotate"},x0=z(e.defineComponent({__name:"VerticalCollapseContainer",setup(n){const t=e.ref(!1),i=async()=>{t.value=!t.value};return(o,r)=>{const s=e.resolveComponent("ArrowRight"),a=e.resolveComponent("ArrowLeft");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",C0,[e.renderSlot(o.$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(o.$slots,"inside-content-left",{},void 0,!0)],4),e.createElementVNode("div",{class:"arrow-bar",onClick:i},[e.createElementVNode("div",k0,[e.renderSlot(o.$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(o.$slots,"inside-content-right",{},void 0,!0)],4)]),e.createVNode(a),e.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),E0={class:"add-block_body"},B0=z(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,i)=>{const o=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(o,{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",E0,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),N0=z(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,i)=>(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"]]),$0={class:"add-block_body"},V0=z(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,i)=>{const o=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(o,{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",$0,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),I0={class:"select-dialog"},M0={class:"select-dialog-header"},P0={class:"select-dialog-title"},T0={class:"select-dialog-content"},R0={class:"select-dialog-actions"},Ja=z(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:i}){const o=n,r=i,s=e.useModel(n,"modelValue"),a=e.ref([]),d=N.Ripple,c=async()=>{await o.store.GetOptions(),a.value=o.store.Options},u=async S=>{await o.store.Get(S.value);const E=o.store.Item,x=new E.constructor(E);r("add",x),f()},f=()=>{r("close"),s.value=!1},m=S=>{S||r("close")},h=()=>{s.value&&f()},w=()=>{s.value=!s.value},y=async()=>{await e.nextTick();const S=document.querySelector(".select-dialog-content .q-item");S&&"focus"in S&&S.focus()};return t({opened:s,toggle:w}),e.onBeforeMount(c),(S,E)=>{const x=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:s.value,"onUpdate:modelValue":[E[0]||(E[0]=V=>s.value=V),m],position:"top",onKeydown:e.withKeys(h,["escape"]),onShow:y},{default:e.withCtx(()=>[e.createElementVNode("div",I0,[e.createElementVNode("div",M0,[e.createElementVNode("div",P0,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[x]])]),e.createElementVNode("div",T0,[e.createVNode(e.unref(N.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),V=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(N.QItem),{key:V.value,clickable:"",class:"q-px-md q-py-sm",onClick:k=>u(V)},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QItemSection),null,{default:e.withCtx(()=>[e.createVNode(e.unref(N.QItemLabel),{class:"text-body1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(d)]])),128))]),_:1})]),e.createElementVNode("div",R0,[e.withDirectives(e.createVNode(oe,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[x]])])])]),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-462df82a"]]),D0=["src"],A0={key:0,class:"header-row"},z0={class:"title-wrapper"},_0={key:0,class:"title-icon"},F0={class:"title-text"},O0={class:"text-subtitle1 text-weight-medium"},L0={key:0,class:"caption-row"},v0={class:"text-caption text-grey-6"},H0=["innerHTML"],U0={key:1,class:"card-footer"},Ka=z(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 i=e.ref(null),o=n,r=t,s=e.computed(()=>o.img?o.isMain?"365px":"200px":"0"),a=d=>{o.noPointer||r("click",d)};return(d,c)=>(e.openBlock(),e.createBlock(e.unref(N.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,D0)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QCardSection),{class:"card-content",style:e.normalizeStyle({maxHeight:n.maxHeight})},{default:e.withCtx(()=>[n.title||d.$slots.title||d.$slots.icon?(e.openBlock(),e.createElementBlock("div",A0,[e.createElementVNode("div",z0,[n.icon||d.$slots.icon?(e.openBlock(),e.createElementBlock("div",_0,[e.renderSlot(d.$slots,"icon",{},()=>[e.createVNode(e.unref(N.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",F0,[e.renderSlot(d.$slots,"title",{},()=>[e.createElementVNode("span",O0,e.toDisplayString(n.title),1)],!0)])]),d.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",L0,[e.renderSlot(d.$slots,"caption",{},()=>[e.createElementVNode("span",v0,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||d.$slots.title?(e.openBlock(),e.createBlock(e.unref(N.QSeparator),{key:1,class:"header-separator"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:i,class:"content-wrapper"},[e.renderSlot(d.$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,H0)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",U0,[e.renderSlot(d.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),q0={key:0,class:"list-title"},j0={class:"draggable-item"},W0={class:"drag-handle"},G0={class:"item-content"},Q0={key:0,class:"item-actions"},Y0={class:"item-content"},X0={key:0,class:"item-actions"},Z0={key:4,class:"add-button-container"},J0=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:P.H.BaseStore,default:void 0},addFunc:{type:Function,required:!0},addToList:{type:Boolean,default:!0},removeFromList:{type:Boolean,default:!0},margin:{type:String,required:!0,default:"0"},background:{type:String,required:!0,default:"var(--background-color)"}},emits:["add","remove","update","sort"],setup(n,{emit:t}){e.useCssVars(c=>({v73008f9f:n.background}));const i=n,o=t,r=async()=>{const c=await i.addFunc();c.order!=="undefined"&&(c.order=i.list.length),i.addToList&&i.store&&i.store.AppendToAll(c),i.store&&await i.store.Create(c),await d(),o("add",c)},s=async c=>{i.removeFromList&&P.H.Classes.RemoveFromClassById(c,i.list),i.store&&await i.store.Remove(c),await d(),o("remove",c)},a=async c=>{i.store&&await i.store.Update(c),o("update",c)},d=async()=>{!i.sortable||i.list.length===0||typeof i.list[0].order>"u"||(P.H.Sorter.Sort(i.list),i.store&&await i.store.UpdateMany(i.list),o("sort"))};return(c,u)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(c.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(e.openBlock(),e.createElementBlock("div",q0,e.toDisplayString(n.title),1)):e.renderSlot(c.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(Co),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:d},{item:e.withCtx(({element:f,index:m})=>[e.createElementVNode("div",j0,[e.createElementVNode("div",W0,[e.createVNode(e.unref(N.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",G0,[e.renderSlot(c.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(ot,{modelValue:f.name,"onUpdate:modelValue":h=>f.name=h,outlined:"",dense:"",class:"content-input",onBlur:h=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",Q0,[e.createVNode(oe,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:h=>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",Y0,[e.renderSlot(c.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(ot,{modelValue:f.name,"onUpdate:modelValue":h=>f.name=h,outlined:"",dense:"",class:"content-input",onBlur:h=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",X0,[e.createVNode(oe,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:h=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)],4))),128)),n.showAdd?(e.openBlock(),e.createElementBlock("div",Z0,[e.createVNode(oe,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),el=z(J0,[["__scopeId","data-v-27edbd1f"]]),K0={class:"del-block_title"},ew={class:"del-block_body"},tw=z(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,i)=>(e.openBlock(),e.createElementBlock("div",{class:"del-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createElementVNode("div",K0,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",ew,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),nw={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},iw={class:"edit-dialog-header"},ow={class:"edit-dialog-title"},rw={class:"edit-dialog-content"},sw={key:0,class:"edit-dialog-actions"},tl=z(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},nw),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:i}){const o=n,r=i,s=e.ref(!1);e.watch(()=>o.modelValue,m=>{s.value=m},{immediate:!0});const a=async()=>{r("confirm"),d()},d=()=>{r("close"),s.value=!1,r("update:modelValue",!1)},c=()=>{s.value&&d()};t({opened:s,toggle:()=>{s.value=!s.value,r("update:modelValue",s.value)}});const f=async()=>{await e.nextTick();const m=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');m&&"focus"in m&&m.focus()};return(m,h)=>{const w=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:e.unref(s),"onUpdate:modelValue":[h[0]||(h[0]=y=>e.isRef(s)?s.value=y:null),d],position:"top",onKeydown:[e.withKeys(a,["enter"]),e.withKeys(c,["escape"])],onShow:f},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:o.width})},[e.createElementVNode("div",iw,[e.createElementVNode("div",ow,e.toDisplayString(o.title),1),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[w]])]),e.createElementVNode("div",rw,[e.renderSlot(m.$slots,"default",{},void 0,!0)]),o.showConfirm?(e.openBlock(),e.createElementBlock("div",sw,[e.withDirectives(e.createVNode(oe,{flat:"",label:o.cancelLabel,size:"sm"},null,8,["label"]),[[w]]),e.createVNode(oe,{flat:"",label:o.confirmLabel,color:"primary",disable:o.disabled,size:"sm",onClick:a},null,8,["label","disable"])])):e.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"])}}}),[["__scopeId","data-v-beb7df93"]]),nl=z(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 i=n,o=t,r=a=>{a.key==="Escape"&&s()};e.onMounted(()=>{document.body.addEventListener("keydown",r)}),e.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{i.closable&&o("close")};return(a,d)=>{const c=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(c,{size:"20px"})])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function aw(n){n.component("CollapseContainer",p0),n.component("CollapseItem",S0),n.component("VerticalCollapseContainer",x0),n.component("PAdd",B0),n.component("PAddDialog",Ja),n.component("PCard",Ka),n.component("PCrudList",el),n.component("PEditDialog",tl),n.component("PModal",nl),n.component("PContainer",N0),n.component("PContainerStickyHead",V0),n.component("PDel",tw)}const lw={class:"btn-group"},il=z(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 i=t,o=e.computed(()=>Oe.Form.GetButtons()),r=e.useTemplateRef("fields"),s=async d=>{if(!d.isSubmit){Oe.Form.SetChunk(d.GetChunk()),a();return}const c=Oe.Form.Validate();if(c.length>0){Qt.Notify.Error(c.join("<br/>"));return}i("submit")},a=()=>{if(!r.value)return;const d=r.value[0];d&&d.$refs.input.focus()};return e.onMounted(async()=>{await a()}),e.onBeforeUnmount(()=>{Oe.Form.Reset()}),(d,c)=>(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(tr,{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(ot,{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",lw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(u,f)=>(e.openBlock(),e.createBlock(oe,{id:u.id,key:u.GetChunk(),disabled:e.unref(Oe).Form.IsBlock,type:f===0?e.unref(ge).Success:e.unref(ge).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"]]),cw=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(i,o)=>(e.openBlock(),e.createBlock(nl,{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(il,{margin:n.margin,padding:"0",onSubmit:o[0]||(o[0]=r=>i.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),dw=["onClick"],uw=z(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 i=n,o=t,r=e.ref(window.innerWidth),s=e.ref(),a=e.ref(Number(i.tabHeight.replace(/[^+\d]/g,""))),d=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(i.tabHeight.replace(/[^+\d]/g,""))};e.onMounted(()=>window.addEventListener("resize",d)),e.onUnmounted(()=>window.removeEventListener("resize",d));const c=e.computed(()=>`calc(100% - ${a.value}px + 1px)`);e.onBeforeMount(()=>{i.menus.Select()});const u=f=>{i.menus.Select(f),o("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,(h,w)=>(e.openBlock(),e.createElementBlock("div",{key:w},[e.createElementVNode("div",{class:e.normalizeClass({"selected-tab":w===n.menus.idx,tab:w!==n.menus.idx}),style:e.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:y=>u(w)},e.toDisplayString(h.name),15,dw)]))),128))],4),e.createElementVNode("div",{class:"body-container",style:e.normalizeStyle({background:n.background,height:e.unref(c)})},[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"]]),fw={class:"field"},mw=z(e.defineComponent({__name:"PNameEdit",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(!1),s=e.ref(),a=e.ref(i.withName.name),d=e.ref(!1),c=()=>{d.value=!1},u=async()=>{a.value.trim(),i.withName.setName&&i.withName.setName(a.value),r.value=!r.value,o("submit")};return(f,m)=>{const h=e.resolveComponent("PString"),w=e.resolveComponent("PInput"),y=e.resolveComponent("InfoItem"),S=e.resolveComponent("PButton"),E=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(E,{ref_key:"form",ref:s,style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(y,{title:"Название","show-save-dialog":d.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:c},{"open-inside-content":e.withCtx(()=>[e.createVNode(y,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:e.withCtx(()=>[e.createElementVNode("div",fw,[e.createVNode(w,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=x=>a.value=x),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])])]),_:1}),e.createVNode(S,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:e.withCtx(()=>[a.value.length?(e.openBlock(),e.createBlock(h,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(e.openBlock(),e.createBlock(h,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-4f7966cb"]]),hw=["id"],pw=["for"],gw={class:"left-field"},yw=["href","download"],ww={key:1,class:"text-field__input"},bw={class:"right-field"},Sw=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Ze},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 i=n,o=t,r=ve.GUID(),s=ve.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!c(f.name)){Bn.Error(`Загруженный файл должен быть в одном из форматов: ${i.formats.join(", ")}`);return}const m=new Ze;m.setFile(f),m.url=URL.createObjectURL(f),o("upload",m)},d=()=>{o("remove")};e.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const c=u=>{let f=Xs.Get(u);return!!i.formats.includes(f.toLowerCase())};return(u,f)=>{const m=e.resolveComponent("PString"),h=e.resolveComponent("PFlex"),w=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,hw),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,pw)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",gw,[e.createVNode(h,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,yw),e.createVNode(w,{skin:"text",type:"del",onClick:d},{default:e.withCtx(()=>[e.createVNode(Za,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",ww,[e.createVNode(m,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",bw,[e.createVNode(w,{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)}}}),Cw=z(Sw,[["__scopeId","data-v-8b73ee22"]]);function ol(n,t){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),i.push.apply(i,o)}return i}function ce(n){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?ol(Object(i),!0).forEach(function(o){ht(n,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ol(Object(i)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(i,o))})}return n}function ht(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function kw(n,t){if(n==null)return{};var i,o,r=function(a,d){if(a==null)return{};var c,u,f={},m=Object.keys(a);for(u=0;u<m.length;u++)c=m[u],d.indexOf(c)>=0||(f[c]=a[c]);return f}(n,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o<s.length;o++)i=s[o],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(n,i)&&(r[i]=n[i])}return r}function yn(n){return function(t){if(Array.isArray(t))return Sr(t)}(n)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(n)||function(t,i){if(t){if(typeof t=="string")return Sr(t,i);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Sr(t,i)}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
26
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Sr(n,t){(t==null||t>n.length)&&(t=n.length);for(var i=0,o=new Array(t);i<t;i++)o[i]=n[i];return o}var rl,xw,ao,Pe=(rl=function(n){/*!
24
+ `)},N=p=>{const g=u(p);return[c(p),`${p.startTime}–${p.endTime}`,g?`${o.value.participants}: ${g}`:""].filter(Boolean).join(`
25
+ `)},$=(p,g)=>{var C;return{conflict:Yr(p.item,g),dragging:((C=wt.value)==null?void 0:C.perfom.id)===g.id,[Yn(p)]:!0}},T=e.ref(null),_=(p,g)=>{const C=p.getBoundingClientRect(),R=Math.min(Math.max((g-C.top)/C.height,0),1);return ke.value.start+wo(R*ke.value.total,gn)},Z=(p,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||M.value||(T.value={gi:p,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",Ve),window.addEventListener("pointerup",L),window.addEventListener("pointercancel",te),window.addEventListener("keydown",pe))},Ve=p=>{const g=T.value;if(g){if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<Qa)return;g.moved=!0;const C=go(g.gi.item.startTime,g.gi.item.endTime);B.value={kind:g.gi.kind,id:g.gi.item.id,name:g.gi.item.name||(g.gi.kind==="session"?o.value.session:o.value.slot),duration:isFinite(C)&&C>0?C:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}Pe(p.clientX,p.clientY),ne(p.clientX,p.clientY)}},Pe=(p,g)=>{var Te,De;const C=document.elementFromPoint(p,g),R=C==null?void 0:C.closest(".hall-col"),j=R==null?void 0:R.getAttribute("data-schedule-id");if(!R||!j){E.value=void 0,V.value=null;return}const J=xo(j);if(!J)return;E.value=J.id;const me=_(R,g);V.value={scheduleId:J.id,minutes:me,time:st(me),hallName:Ct(J),...((Te=B.value)==null?void 0:Te.kind)==="slot"?{session:ns(J.sessions,me,me+(((De=B.value)==null?void 0:De.duration)||30),fe)}:{}},k.value={x:p,y:g}},ne=(p,g)=>{const C=A.value;if(!C)return;const R=C.getBoundingClientRect();g<R.top+48?C.scrollTop-=14:g>R.bottom-48&&(C.scrollTop+=14),p<R.left+48?C.scrollLeft-=14:p>R.right-48&&(C.scrollLeft+=14)},L=p=>{U(p)},U=async p=>{const g=T.value;if(v(),T.value=null,!g||!g.moved)return;I.value=Date.now();const C=document.elementFromPoint(p.clientX,p.clientY),R=C==null?void 0:C.closest(".hall-col"),j=R==null?void 0:R.getAttribute("data-schedule-id"),J=j?xo(j):void 0;if(R&&J){const me=_(R,p.clientY);await jl(J,me)}q()},v=()=>{window.removeEventListener("pointermove",Ve),window.removeEventListener("pointerup",L),window.removeEventListener("pointercancel",te),window.removeEventListener("keydown",pe)},q=()=>{T.value=null,B.value=null,E.value=void 0,V.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor="",I.value=Date.now()},te=()=>{v(),q()},pe=p=>{p.key==="Escape"&&te()};e.onBeforeUnmount(()=>{v(),ts(),document.body.style.userSelect="",document.body.style.cursor=""});const be=p=>{if(!p)return null;for(const g of t.days||[])for(const C of g.schedules||[]){const R=(C.sessions||[]).find(J=>J.id===p);if(R)return{kind:"session",item:R,schedule:C};const j=r(C).find(J=>J.id===p);if(j)return{kind:"slot",item:j,schedule:C}}return null},ut=()=>{var p;return be((p=B.value)==null?void 0:p.id)},Ci=(p,g)=>{g.preventDefault(),g.stopPropagation();const C=p.item,R=fe(C.startTime),j=fe(C.endTime);if(!isFinite(R)||!isFinite(j))return;const J=g.clientY;M.value=!0;const me=D=>{const X=(D.clientY-J)/se.value*60,K=wo(j+X,gn);C.endTime=st(Math.max(K,R+gn))},Te=async()=>{window.removeEventListener("pointermove",me),window.removeEventListener("pointerup",De),M.value=!1,I.value=Date.now();const D=be(C.id);D&&(await xt(C,D.kind),await t.persist.refresh())},De=()=>{Te()};window.addEventListener("pointermove",me),window.addEventListener("pointerup",De)},wt=e.ref(null),Kr=(p,g,C)=>{if(C.target.closest(".nested-edit, .nested-resize")||C.button!==0||M.value)return;const R=C.target.closest(".session-perfoms"),j=fe(p.startTime),J=fe(p.endTime),me=go(g.startTime,g.endTime);!R||!isFinite(j)||!isFinite(J)||J<=j||(wt.value={perfom:g,session:p,startX:C.clientX,startY:C.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:j,sessionDur:J-j,durMin:isFinite(me)&&me>0?me:30,container:R},window.addEventListener("pointermove",Hl),window.addEventListener("pointerup",Ul),window.addEventListener("pointercancel",es),window.addEventListener("keydown",vl))},Hl=p=>{const g=wt.value;if(!g)return;if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<Qa)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const C=g.container.getBoundingClientRect(),R=Math.min(Math.max((p.clientY-C.top)/C.height,0),1);let j=g.sessionStart+wo(R*g.sessionDur,gn);const J=g.sessionStart+g.sessionDur-g.durMin;j=Math.min(Math.max(j,g.sessionStart),Math.max(J,g.sessionStart)),g.perfom.startTime=st(j),g.perfom.endTime=st(j+g.durMin),k.value={x:p.clientX,y:p.clientY}},Ul=p=>{Db(p)},Db=async p=>{var me;const g=wt.value;if(ts(),wt.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;I.value=Date.now();const C=document.elementFromPoint(p.clientX,p.clientY),R=C==null?void 0:C.closest(".hall-col"),j=R==null?void 0:R.getAttribute("data-schedule-id"),J=j?xo(j):void 0;if(R&&J){B.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||o.value.slot,duration:g.durMin};const Te=_(R,p.clientY),De=st(Te),D=go(g.perfom.startTime,g.perfom.endTime),X=pn(De,D>0?D:30),K=((me=Gl(g.perfom))==null?void 0:me.id)===J.id&&g.perfom.startTime===De&&g.perfom.endTime===X;await jl(J,Te),K&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),B.value=null;return}g.perfom.startTime=Hn(g.perfom.startTime),g.perfom.endTime=Hn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},es=()=>{const p=wt.value;ts(),p&&(p.perfom.startTime=p.savedStart,p.perfom.endTime=p.savedEnd),wt.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor=""},ts=()=>{window.removeEventListener("pointermove",Hl),window.removeEventListener("pointerup",Ul),window.removeEventListener("pointercancel",es),window.removeEventListener("keydown",vl)},vl=p=>{p.key==="Escape"&&es()},zb=(p,g,C)=>{C.preventDefault(),C.stopPropagation();const R=fe(p.startTime),j=fe(p.endTime),J=fe(g.startTime),me=C.target.closest(".nested-perfom"),Te=me==null?void 0:me.closest(".session-perfoms");if(!me||!Te||!isFinite(R)||!isFinite(j)||j<=R||!isFinite(J))return;const De=Te.getBoundingClientRect(),D=j-R;M.value=!0;const X=Cn=>{const Hb=Math.min(Math.max((Cn.clientY-De.top)/De.height,0),1),Ub=Math.min(Math.max(J+gn,R+wo(Hb*D,gn)),j);g.endTime=st(Ub)},K=async()=>{window.removeEventListener("pointermove",X),window.removeEventListener("pointerup",W),M.value=!1,I.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},W=()=>{K()};window.addEventListener("pointermove",X),window.addEventListener("pointerup",W)},jl=async(p,g)=>{var X;E.value=void 0,V.value=null,k.value=null;const C=ut();if(!C)return;const R=st(g),j=go(C.item.startTime,C.item.endTime),J=pn(R,j>0?j:30);if(((X=C.schedule)==null?void 0:X.id)===p.id&&C.item.startTime===R&&C.item.endTime===J)return;const me=C.item.startTime;if(C.item.startTime=R,C.item.endTime=J,C.kind==="slot"){const K=ns(p.sessions,fe(R),fe(J),fe);K?C.item.sessionId=K.id:delete C.item.sessionId}if(C.kind==="session"){const K=fe(R)-fe(me);for(const W of Xe(C.item))W.startTime&&(W.startTime=pn(W.startTime,K),W.endTime&&(W.endTime=pn(W.endTime,K)),W.scheduleId=p.id,await xt(W,"slot"))}const Te=C.schedule,De=C.kind==="session"?p.sessions:r(p),D=C.item;if(Te&&Te.id!==p.id){D.scheduleId=p.id;const K=C.kind==="session"?Te.sessions:r(Te);P.H.Classes.RemoveFromClassById(D.id,K,[]),De.push(D)}await xt(D,C.kind),await t.persist.refresh()},Ab=async(p,g)=>{if(g.target.closest(".timeline-block"))return;const C=_(g.currentTarget,g.clientY),R=i.value.createSlot(p);R.startTime=st(C),R.endTime=st(C+30);const j=ns(p.sessions,C,C+30,fe);j!=null&&j.id&&(R.sessionId=j.id),await t.persist.createSlot(R),await t.persist.refresh();const J=be(R.id);J&&Eo(J)},ql=async(p,g,C)=>{if(p.added){if(p.added.element.scheduleId=g.id,C==="slot"&&p.added.element.sessionId&&((g.sessions||[]).some(j=>j.id===p.added.element.sessionId)||delete p.added.element.sessionId),await xt(p.added.element,C),C==="session")for(const R of s(p.added.element))R.scheduleId=g.id,await t.persist.updateSlot(R);await t.persist.refresh()}},xo=p=>{for(const g of t.days||[]){const C=(g.schedules||[]).find(R=>R.id===p);if(C)return C}},ns=(p,g,C,R)=>qa(p,g,C,R),Wl=p=>((p==null?void 0:p.sessions)||[]).map(g=>({id:g.id,label:d(g)})),Gl=p=>{for(const g of t.days||[])for(const C of g.schedules||[])if(r(C).some(R=>R.id===p.id)||p.sessionId&&(C.sessions||[]).some(R=>R.id===p.sessionId))return C},Ql=e.computed(()=>{const p=S.value;if(p)return p.kind==="session"?xo(p.item.scheduleId)||Fb(p.item):Gl(p.item)}),_b=e.computed(()=>{const p=S.value;return!p||p.kind!=="slot"?[]:Wl(Ql.value)}),Fb=(p,g)=>{for(const C of t.days||[])for(const R of C.schedules||[])if((R.sessions||[]).some(j=>j.id===p.id))return R},Yl=async(p,g)=>{g?p.sessionId=g:delete p.sessionId,await t.persist.updateSlot(p),await t.persist.refresh()},Xl=async p=>{const g=i.value.createSession(p);await t.persist.createSession(g),await t.persist.refresh()},Zl=async p=>{const g=i.value.createSlot(p),C=[...r(p)].sort(yr).slice(-1)[0];g.startTime=Hn(C==null?void 0:C.endTime)||"9:00",g.endTime=pn(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},os=async(p,g)=>{if(g==="slot")await t.persist.removeSlot(p);else{for(const C of s(p))delete C.sessionId,await t.persist.updateSlot(C);await t.persist.removeSession(p)}await t.persist.refresh()},xt=async(p,g)=>{const C=Hn(p.startTime),R=Hn(p.endTime);if(!C){t.persist.notify("warning",o.value.correctStartTime);return}p.startTime=C,p.endTime=R||pn(C,30),g==="slot"?await t.persist.updateSlot(p):await t.persist.updateSession(p)},Eo=p=>{M.value||Date.now()-I.value<400||(S.value={kind:p.kind,item:p.item},y.value=!0)},Ob=async()=>{const p=S.value;p&&(await xt(p.item,p.kind),y.value=!1,S.value=null,await t.persist.refresh())},Lb=async()=>{const p=S.value;p&&(await os(p.item,p.kind),y.value=!1,S.value=null)};return t.persist.loadOptions&&t.persist.loadOptions(),(p,g)=>{var Te,De;const C=e.resolveComponent("PButton"),R=e.resolveComponent("PInput"),j=e.resolveComponent("PTooltip"),J=e.resolveComponent("PSelect"),me=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",pp,[(Te=n.days)!=null&&Te.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",yp,[e.createVNode(e.unref(x.QTabs),{modelValue:m.value,"onUpdate:modelValue":g[0]||(g[0]=D=>m.value=D),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,D=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:D.id,name:D.id,label:lt(D)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(x.QSpace)),he.value?(e.openBlock(),e.createBlock(R,{key:0,"model-value":$e(he.value.date),label:o.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=D=>It(he.value,D))},null,8,["model-value","label"])):e.createCommentVNode("",!0),e.createVNode(C,{size:"sm",color:"negative",outline:"",icon:"delete",label:o.value.deleteDay,disable:!he.value,onClick:g[2]||(g[2]=D=>Mt(he.value))},null,8,["label","disable"]),e.createVNode(C,{size:"sm",color:"primary",outline:"",icon:"event",label:o.value.addDay,onClick:vt},null,8,["label"]),e.createVNode(C,{size:"sm",color:"primary",outline:"",icon:"add",label:o.value.addHall,onClick:rt},null,8,["label"]),f.value==="grid"?(e.openBlock(),e.createElementBlock("div",wp,[e.createVNode(e.unref(x.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(x.QBtnToggle),{modelValue:se.value,"onUpdate:modelValue":g[3]||(g[3]=D=>se.value=D),"toggle-color":"primary",options:Q,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QBtnToggle),{modelValue:f.value,"onUpdate:modelValue":g[4]||(g[4]=D=>f.value=D),"toggle-color":"primary",options:[{label:o.value.grid,value:"grid",icon:"calendar_view_week"},{label:o.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),f.value==="grid"?(e.openBlock(),e.createElementBlock("div",bp,[yt(he.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:A,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":yt(he.value).length,"--hours":Math.max(ke.value.total/60,1),"--half-hours":Math.max(ke.value.total/60*2,2)})},[e.createElementVNode("div",Cp,[g[15]||(g[15]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt(he.value),D=>(e.openBlock(),e.createElementBlock("div",{key:D.id,class:e.normalizeClass(["hall-head",{"drag-over":E.value===D.id}])},[e.createElementVNode("div",kp,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",xp,e.toDisplayString(Ct(D)),1),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:X=>Zl(D)},{default:e.withCtx(()=>[e.createVNode(j,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:X=>Xl(D)},{default:e.withCtx(()=>[e.createVNode(j,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.addSession),1)]),_:1})]),_:1},8,["onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:X=>we(D)},{default:e.withCtx(()=>[e.createVNode(j,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])],2))),128))]),e.createElementVNode("div",{class:"grid-body",style:e.normalizeStyle({height:Ne.value})},[e.createElementVNode("div",Ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(et.value,D=>(e.openBlock(),e.createElementBlock("div",{key:D.min,class:"hour-label",style:e.normalizeStyle({top:(D.min-ke.value.start)/ke.value.total*100+"%"})},e.toDisplayString(D.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value,D=>(e.openBlock(),e.createElementBlock("div",{key:D.min,class:"half-label",style:e.normalizeStyle({top:(D.min-ke.value.start)/ke.value.total*100+"%"})},e.toDisplayString(D.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt(he.value),D=>(e.openBlock(),e.createElementBlock("div",{key:D.id,class:e.normalizeClass(["hall-col",{"drag-over":E.value===D.id}]),"data-schedule-id":D.id,onDblclick:X=>Ab(D,X)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me(D),X=>{var K;return e.openBlock(),e.createElementBlock("div",{key:X.item.id,class:e.normalizeClass(["timeline-block",[X.kind,{conflict:Si(D,X),dragging:((K=B.value)==null?void 0:K.id)===X.item.id},Yn(X)]]),style:e.normalizeStyle(Re(X)),title:ko(X),onPointerdown:W=>Z(X,W),onClick:W=>Eo(X)},[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",$p,[e.createElementVNode("div",Vp,e.toDisplayString(X.item.startTime)+"–"+e.toDisplayString(X.item.endTime),1),e.createElementVNode("div",Pp,e.toDisplayString(Zr(X)),1),X.kind==="slot"&&u(X.item)?(e.openBlock(),e.createElementBlock("div",Tp,e.toDisplayString(u(X.item)),1)):e.createCommentVNode("",!0)]),X.kind==="session"&&Xe(X.item).length?(e.openBlock(),e.createElementBlock("div",Ip,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe(X.item),W=>(e.openBlock(),e.createElementBlock("div",{key:W.id,class:e.normalizeClass(["nested-perfom",$(X,W)]),style:e.normalizeStyle(Xr(X.item,W)),title:N(W),onPointerdown:e.withModifiers(Cn=>Kr(X.item,W,Cn),["stop"]),onClick:e.withModifiers(Cn=>Eo({kind:"slot",item:W}),["stop"])},[e.createElementVNode("div",Rp,e.toDisplayString(W.startTime)+"–"+e.toDisplayString(W.endTime),1),e.createElementVNode("div",Dp,e.toDisplayString(Jr(W,Yn(X))),1),u(W)?(e.openBlock(),e.createElementBlock("div",zp,e.toDisplayString(u(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:o.value.changeDurationTitle,onPointerdown:e.withModifiers(Cn=>zb(X.item,W,Cn),["stop","prevent"])},null,40,Ap)],46,Mp))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",_p,[Si(D,X)?(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(j,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.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=>Eo(X),["stop"])},{default:e.withCtx(()=>[e.createVNode(j,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",{class:"block-resize",title:o.value.changeDurationTitle,onPointerdown:e.withModifiers(W=>Ci(X,W),["stop","prevent"])},null,40,Fp)],46,Np)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wn(D),X=>{var K;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+X.item.id,class:e.normalizeClass(["session-spine",{dragging:((K=B.value)==null?void 0:K.id)===X.item.id}]),style:e.normalizeStyle(Re(X)),title:d(X.item)},[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",Lp,e.toDisplayString(d(X.item)),1)],14,Op)}),128)),V.value&&V.value.scheduleId===D.id&&B.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:Dt.value}]),style:e.normalizeStyle(bn.value)},null,6)):e.createCommentVNode("",!0),V.value&&V.value.scheduleId===D.id&&B.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[B.value.kind,{conflict:Dt.value}]]),style:e.normalizeStyle(ct.value)},[e.createElementVNode("div",Hp,[e.createTextVNode(e.toDisplayString(V.value.time)+"–"+e.toDisplayString(dt.value)+" ",1),V.value.session?(e.openBlock(),e.createElementBlock("span",Up,e.toDisplayString(o.value.intoSession),1)):e.createCommentVNode("",!0),kt.value?(e.openBlock(),e.createElementBlock("span",vp," ⚠ "+e.toDisplayString(o.value.conflictCount)+": "+e.toDisplayString(kt.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",jp,e.toDisplayString(B.value.name),1)],6)):e.createCommentVNode("",!0)],42,Bp))),128))],4),e.createElementVNode("div",qp,e.toDisplayString(o.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",Sp,[e.createTextVNode(e.toDisplayString(o.value.noHalls)+" ",1),e.createVNode(C,{flat:"",color:"primary",size:"sm",label:o.value.addHall,onClick:rt},null,8,["label"])])),k.value&&V.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:k.value.x+"px",top:k.value.y+"px"})},[e.createVNode(e.unref(x.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(V.value.time)+" · "+e.toDisplayString(V.value.hallName)+" ",1),V.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[16]||(g[16]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(x.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(o.value.intoSession)+" «"+e.toDisplayString(d(V.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),kt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[17]||(g[17]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(x.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(kt.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(De=wt.value)!=null&&De.moved&&k.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:k.value.x+"px",top:k.value.y+"px"})},[e.createVNode(e.unref(x.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(wt.value.perfom.startTime)+"–"+e.toDisplayString(wt.value.perfom.endTime)+" · "+e.toDisplayString(o.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Wp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt(he.value),D=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{key:D.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",Gp,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",Qp,e.toDisplayString(Ct(D)),1),e.createVNode(e.unref(x.QSpace)),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:o.value.session,onClick:X=>Xl(D)},null,8,["label","onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:o.value.slot,onClick:X=>Zl(D)},null,8,["label","onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:X=>we(D)},{default:e.withCtx(()=>[e.createVNode(j,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])]),_:2},1024),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var X;return[(X=D.sessions)!=null&&X.length?(e.openBlock(),e.createElementBlock("div",Yp,[e.createElementVNode("div",Xp,[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(o.value.sessionsTitle),1)]),e.createVNode(e.unref(xi),{list:D.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:K=>ql(K,D,"session")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",Zp,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(R,{"model-value":K.name,label:o.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":W=>K.name=W,onBlur:W=>xt(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.startTime,label:o.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.startTime=W,onBlur:W=>xt(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.endTime,label:o.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.endTime=W,onBlur:W=>xt(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.renderSlot(p.$slots,"session-row-extra",{element:K,schedule:D},void 0,!0),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>os(K,"session")},null,8,["onClick"])]),Xe(K).length?(e.openBlock(),e.createElementBlock("div",Jp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe(K),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",Kp,e.toDisplayString(c(W)),1),e.createElementVNode("div",eg,e.toDisplayString(W.startTime)+"–"+e.toDisplayString(W.endTime),1),e.createVNode(e.unref(x.QSpace)),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:Cn=>Eo({kind:"slot",item:W})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",tg,[e.createElementVNode("div",ng,[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(o.value.slotsTitle),1)]),e.createVNode(e.unref(xi),{list:jt(D),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:K=>ql(K,D,"slot")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",og,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(R,{"model-value":K.name,label:o.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":W=>K.name=W,onBlur:W=>xt(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.startTime,label:o.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.startTime=W,onBlur:W=>xt(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.endTime,label:o.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.endTime=W,onBlur:W=>xt(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(J,{"model-value":K.sessionId,label:o.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:Wl(D),"option-value":"id","option-label":"label","onUpdate:modelValue":W=>Yl(K,W)},null,8,["model-value","label","options","onUpdate:modelValue"]),e.renderSlot(p.$slots,"slot-row-extra",{element:K,schedule:D},void 0,!0),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>os(K,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!jt(D).length&&!Qn(D)?(e.openBlock(),e.createElementBlock("div",ig,e.toDisplayString(o.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",rg,e.toDisplayString(o.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",gp,[e.createVNode(e.unref(x.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(o.value.noDays),1),e.createVNode(C,{color:"primary",outline:"",label:o.value.addDay,icon:"event",class:"q-mt-sm",onClick:vt},null,8,["label"])])),e.createVNode(me,{modelValue:h.value,"onUpdate:modelValue":g[7]||(g[7]=D=>h.value=D)},{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",sg,e.toDisplayString(o.value.addHall),1)]),_:1}),e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",ag,[e.createVNode(R,{modelValue:w.value,"onUpdate:modelValue":g[5]||(g[5]=D=>w.value=D),label:o.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(Rt,["enter"])},null,8,["modelValue","label"]),e.createVNode(C,{color:"primary",label:o.value.create,icon:"add",dense:"",onClick:Rt},null,8,["label"])]),e.renderSlot(p.$slots,"places-list",{day:he.value,add:qe},()=>[Ce.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",lg,e.toDisplayString(o.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,D=>(e.openBlock(),e.createElementBlock("div",{key:D.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",cg,e.toDisplayString(a(D)),1),e.createVNode(C,{size:"sm",color:"primary",outline:"",label:o.value.addHall,icon:"add",dense:"",onClick:X=>qe(D)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(x.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(C,{label:o.value.close,color:"primary",onClick:g[6]||(g[6]=D=>h.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(me,{modelValue:y.value,"onUpdate:modelValue":g[14]||(g[14]=D=>y.value=D)},{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 D;return[e.createElementVNode("div",dg,e.toDisplayString(((D=S.value)==null?void 0:D.kind)==="session"?o.value.session:o.value.slot),1)]}),_:1}),S.value?(e.openBlock(),e.createBlock(e.unref(x.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:S.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=D=>S.value.item.name=D),label:o.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",ug,[e.createElementVNode("div",fg,[e.createVNode(R,{modelValue:S.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=D=>S.value.item.startTime=D),label:o.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",mg,[e.createVNode(R,{modelValue:S.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=D=>S.value.item.endTime=D),label:o.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),S.value.kind==="slot"?(e.openBlock(),e.createBlock(J,{key:0,"model-value":S.value.item.sessionId,label:o.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:_b.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=D=>Yl(S.value.item,D))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"edit-form",{kind:S.value.kind,item:S.value.item,schedule:Ql.value},void 0,!0),S.value.kind==="slot"?(e.openBlock(),e.createBlock(R,{key:1,modelValue:S.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=D=>S.value.item.description=D),label:o.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(()=>[S.value?(e.openBlock(),e.createBlock(C,{key:0,flat:"",color:"negative",label:o.value.delete,onClick:Lb},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QSpace)),e.createVNode(C,{flat:"",label:o.value.cancel,color:"primary",onClick:g[13]||(g[13]=D=>y.value=!1)},null,8,["label"]),e.createVNode(C,{label:o.value.save,color:"primary",onClick:Ob},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"])])}}}),[["__scopeId","data-v-cfbff9e3"]]),hg={class:"schedule-timeline"},pg={key:0,class:"timeline-container"},gg={class:"day-header"},yg={class:"day-title"},wg={class:"timeline"},bg={key:0,class:"schedule-place"},Sg={class:"events-column"},Cg={key:0,class:"event-item session-item"},kg={class:"event-content"},xg={class:"event-time"},Eg={class:"event-main"},Bg={class:"event-name"},Ng={key:0,class:"speakers-list"},$g=["onClick"],Vg={class:"speaker-details"},Pg={class:"speaker-name"},Tg={class:"bio-text"},Ig=["onClick"],Mg={key:0,class:"perfom-divider"},Rg={class:"event-content"},Dg={class:"event-time"},zg={class:"event-main"},Ag={class:"event-name"},_g={class:"event-badges"},Fg={key:0,class:"speakers-list"},Og=["onClick"],Lg={class:"speaker-details"},Hg={class:"speaker-name"},Ug={class:"bio-text"},vg={key:1,class:"no-program"},Xa=z(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=k=>{if(o.dayTitle)return o.dayTitle(k);const M=new Date(k.date);return isNaN(M.getTime())||M.getFullYear()<2e3?"":M.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=k=>{var M;return o.placeName?o.placeName(k):((M=k.place)==null?void 0:M.name)||k.placeName||""},d=k=>o.slotName?o.slotName(k):(k==null?void 0:k.name)||"",c=k=>o.sessionName?o.sessionName(k):(k==null?void 0:k.name)||"",u=k=>o.slotParticipants?o.slotParticipants(k):(k==null?void 0:k.participants)||[],f=k=>o.sessionParticipants?o.sessionParticipants(k):(k==null?void 0:k.participants)||[],m=k=>{var M,I;return o.participantName?o.participantName(k):(k==null?void 0:k.name)||(k==null?void 0:k.fullName)||((I=(M=k==null?void 0:k.human)==null?void 0:M.getFullName)==null?void 0:I.call(M))||""},h=k=>o.participantBio?o.participantBio(k):(k==null?void 0:k.bio)||(k==null?void 0:k.regalias)||"",w=k=>o.slotListOf?o.slotListOf(k):(k==null?void 0:k.slots)||[],y=k=>o.nestedSlotListOf?o.nestedSlotListOf(k):(k==null?void 0:k.slots)||[],S=k=>k.schedules.filter(M=>{var I;return w(M).length>0||(((I=M.sessions)==null?void 0:I.length)||0)>0}),B=k=>{const M=[],I=new Set((k.sessions||[]).map(Q=>Q.id));for(const Q of k.sessions||[]){M.push({kind:"session",item:Q,nested:!1,index:0});for(const se of y(Q))M.push({kind:"slot",item:se,nested:!0,index:0})}let A=0;for(const Q of w(k).filter(se=>!se.sessionId||!I.has(se.sessionId)))M.push({kind:"slot",item:Q,nested:!1,index:A++});return M},E=e.computed(()=>{var k;return(k=o.days)==null?void 0:k.some(M=>{var I;return(I=M.schedules)==null?void 0:I.some(A=>{var Q;return w(A).length>0||(((Q=A.sessions)==null?void 0:Q.length)||0)>0})})}),V=(k,M)=>`${k} - ${M}`;return(k,M)=>(e.openBlock(),e.createElementBlock("div",hg,[E.value?(e.openBlock(),e.createElementBlock("div",pg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,I=>(e.openBlock(),e.createElementBlock("div",{key:I.id,class:"day-section"},[e.createElementVNode("div",gg,[e.createElementVNode("div",yg,[e.createVNode(e.unref(x.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s(I)),1)])]),e.createElementVNode("div",wg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S(I),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"time-slot"},[a(A)?(e.openBlock(),e.createElementBlock("div",bg,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(A)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",Sg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B(A),Q=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Q.item.id},[Q.kind==="session"?(e.openBlock(),e.createElementBlock("div",Cg,[e.createElementVNode("div",kg,[e.createElementVNode("div",xg,e.toDisplayString(V(Q.item.startTime,Q.item.endTime)),1),e.createElementVNode("div",Eg,[e.createElementVNode("div",Bg,e.toDisplayString(c(Q.item)),1),f(Q.item).length?(e.openBlock(),e.createElementBlock("div",Ng,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(Q.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:_e=>i("open-participant",se)},[e.createElementVNode("div",Vg,[e.createElementVNode("div",Pg,[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Tg,e.toDisplayString(h(se)),1)])],8,$g))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":Q.item.active,"nested-item":Q.nested},{clickable:o.slotClickable}]]),onClick:se=>o.slotClickable&&i("slot-click",Q.item)},[!Q.nested&&Q.index>0?(e.openBlock(),e.createElementBlock("div",Mg)):e.createCommentVNode("",!0),e.createElementVNode("div",Rg,[e.createElementVNode("div",Dg,e.toDisplayString(V(Q.item.startTime,Q.item.endTime)),1),e.createElementVNode("div",zg,[e.createElementVNode("div",Ag,e.toDisplayString(d(Q.item)),1),e.createElementVNode("div",_g,[e.renderSlot(k.$slots,"badges",{item:Q.item},void 0,!0)]),u(Q.item).length?(e.openBlock(),e.createElementBlock("div",Fg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(Q.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:_e=>i("open-participant",se)},[e.createElementVNode("div",Lg,[e.createElementVNode("div",Hg,[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Ug,e.toDisplayString(h(se)),1)])],8,Og))),128))])):e.createCommentVNode("",!0)])])],10,Ig))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",vg,[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(k.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),jg=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Ya,ScheduleTimeline:Xa},Symbol.toStringTag,{value:"Module"})),qg=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:pn,blockSizeClass:Wa,blockStyle:Ha,byStart:yr,diffM:go,findEnclosingSession:qa,fromMin:st,gridBounds:La,hasConflict:va,intersects:yo,nestedConflict:ja,nestedSlotStyle:Ua,normTime:Hn,snapMinutes:wo,toMin:fe},Symbol.toStringTag,{value:"Module"}));let Wg=class extends ue{constructor(){super(ri,"schedule-days")}};const Gg=new Wg;let Qg=class extends ue{constructor(){super(Ln,"schedule-places")}};const Yg=new Qg;let Xg=class extends ue{constructor(){super(On,"schedule-sessions")}};const Zg=new Xg;let Jg=class extends ue{constructor(){super(Ft,"schedule-slots")}};const Kg=new Jg;let e1=class extends ue{constructor(){super(po,"schedule-timetables")}};const t1=new e1,n1=Object.freeze(Object.defineProperty({__proto__:null,C:hp,Components:jg,H:qg,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Gg,SchedulePlacesStore:Yg,ScheduleSessionsStore:Zg,ScheduleSlotsStore:Kg,SchedulesStore:t1},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:Ga,defaultScheduleLabels:wr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),o1=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:mo},Symbol.toStringTag,{value:"Module"}));let i1=class extends ue{constructor(){super(mo,"color-themes")}};const r1=new i1,s1=Object.freeze(Object.defineProperty({__proto__:null,C:o1,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:r1},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),br=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]=d=>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"]))}}),a1={class:"tags-selector"},l1={key:0,class:"empty-state"},si=z(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(c=>P.H.Strings.SearchIn(c.label,i.value))),a=t;e.onBeforeMount(async()=>{await o.store.GetOptions()});const d=async c=>{await o.store.Get(c.value),a("select",o.store.Item)};return(c,u)=>{const f=e.resolveDirective("ripple");return e.openBlock(),e.createElementBlock("div",a1,[e.createVNode(Je,{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:h=>d(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",l1,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),c1={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},d1={class:"edit-dialog-header"},u1={class:"edit-dialog-title"},f1={class:"edit-dialog-content"},m1={key:0,class:"edit-dialog-actions"},Un=z(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},c1),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.ref(!1);e.watch(()=>i.modelValue,m=>{s.value=m},{immediate:!0});const a=async()=>{r("confirm"),d()},d=()=>{r("close"),s.value=!1,r("update:modelValue",!1)},c=()=>{s.value&&d()};t({opened:s,toggle:()=>{s.value=!s.value,r("update:modelValue",s.value)}});const f=async()=>{await e.nextTick();const m=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');m&&"focus"in m&&m.focus()};return(m,h)=>{const w=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:e.unref(s),"onUpdate:modelValue":[h[0]||(h[0]=y=>e.isRef(s)?s.value=y:null),d],position:"top",onKeydown:[e.withKeys(a,["enter"]),e.withKeys(c,["escape"])],onShow:f},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:i.width})},[e.createElementVNode("div",d1,[e.createElementVNode("div",u1,e.toDisplayString(i.title),1),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[w]])]),e.createElementVNode("div",f1,[e.renderSlot(m.$slots,"default",{},void 0,!0)]),i.showConfirm?(e.openBlock(),e.createElementBlock("div",m1,[e.withDirectives(e.createVNode(oe,{flat:"",label:i.cancelLabel,size:"sm"},null,8,["label"]),[[w]]),e.createVNode(oe,{flat:"",label:i.confirmLabel,color:"primary",disable:i.disabled,size:"sm",onClick:a},null,8,["label","disable"])])):e.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"])}}}),[["__scopeId","data-v-beb7df93"]]),Sr=z(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 d=>{o.row[o.prop]=d,await o.store.Update(o.row),r.value.toggle()};return(d,c)=>(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(br,{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 h;return[(h=n.row[n.prop])!=null&&h.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"}),c[0]||(c[0]=e.createTextVNode(" Добавить ",-1))],64))]}),_:1},8,["color","text-color","outline"])]}),_:1})),e.createVNode(Un,{ref_key:"edit",ref:r,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default",{},()=>[e.createVNode(si,{store:n.storeOpts,onSelect:a},null,8,["store"])],!0)]),_:3},512)],64))}}),[["__scopeId","data-v-29efd68b"]]),h1={class:"tag-name"},p1={key:0,class:"tag-extra"},Cr=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])||""}),d=e.computed(()=>Math.max(0,s.value-1)),c=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",h1,e.toDisplayString(e.unref(a)),1),e.unref(d)?(e.openBlock(),e.createElementBlock("span",p1,"+"+e.toDisplayString(e.unref(d)),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(Un,{ref_key:"edit",ref:o,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},()=>[n.storeOpts?(e.openBlock(),e.createBlock(si,{key:0,store:n.storeOpts,onSelect:c},null,8,["store"])):e.createCommentVNode("",!0)])]),_:3},512)],64))}}),g1={key:0,class:"relation-label"},y1={class:"relation-count"},kr=z(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&&P.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",g1,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.createElementVNode("span",y1,e.toDisplayString(n.count),1)],2)]),_:1}))}}),[["__scopeId","data-v-20c0d0d2"]]),xr=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(P).H.Router.To(`/admin/${n.domen}/${n.row.id}`))})]),_:1}))}}),w1={class:"cell-text"},Er=z(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 c=i.value;return c!=null&&String(c).length>t.tooltipThreshold}),a=e.computed(()=>{const c=i.value;return c==null||c===""?t.emptyPlaceholder:typeof c=="number"&&t.decimals!==void 0?c.toFixed(t.decimals):String(c)}),d=async()=>{t.store&&await t.store.Update(t.row)};return(c,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",w1,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(Un,{key:0,ref_key:"edit",ref:o,onConfirm:d},{default:e.withCtx(()=>[e.createVNode(Je,{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"]]),bo=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:()=>[]}},{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 h={};for(const w of Object.keys(r))w!=="id"&&w!=="disable"&&(h[w]=r[w]);return h}),d=n,c=e.computed(()=>r.disable??d.disabled),u=h=>{i("change",h)},f=()=>{i("clear",void 0)},m=e.computed(()=>{const h={};return d.margin&&(h.margin=d.margin),d.padding&&(h.padding=d.padding),d.width&&(h.width=d.width),d.inPadding&&(h.padding=d.inPadding),h});return(h,w)=>(e.openBlock(),e.createBlock(e.unref(x.QSelect),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":w[0]||(w[0]=y=>o.value=y)},e.unref(a),{for:e.unref(s),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,disable:e.unref(c),readonly:n.readonly,"input-style":{color:n.color||void 0},style:e.unref(m),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u,onClear:f}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(h.$slots,"before",{},()=>[e.renderSlot(h.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(h.$slots,"append",{},()=>[e.renderSlot(h.$slots,"right")])]),_:2},[h.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"prepend")]),key:"0"}:void 0,h.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"after")]),key:"1"}:void 0,h.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),key:"2"}:void 0,h.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"label")]),key:"3"}:void 0,h.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"error")]),key:"4"}:void 0,h.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"hint")]),key:"5"}:void 0,h.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"counter")]),key:"6"}:void 0,h.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"loading")]),key:"7"}:void 0,h.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"selected")]),key:"8"}:void 0,h.$slots.option?{name:"option",fn:e.withCtx(y=>[e.renderSlot(h.$slots,"option",e.normalizeProps(e.guardReactiveProps(y)))]),key:"9"}:void 0,h.$slots["no-option"]?{name:"no-option",fn:e.withCtx(y=>[e.renderSlot(h.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(y)))]),key:"10"}:void 0,h.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"before-options")]),key:"11"}:void 0,h.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"after-options")]),key:"12"}:void 0,h.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(y=>[e.renderSlot(h.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(y)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","disable","readonly","input-style","style"]))}}),Br=z(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(bo,{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"]]),b1={class:"cell-text"},Nr=z(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 c=i.value;return typeof c=="string"&&c.length>t.truncateLength}),a=e.computed(()=>{const c=i.value;return typeof c!="string"?c:c.length>t.truncateLength?c.slice(0,t.truncateLength)+"...":c}),d=async()=>{t.store&&await t.store.Update(t.row)};return(c,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",b1,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(Un,{key:0,ref_key:"edit",ref:o,onConfirm:d},{default:e.withCtx(()=>[e.createVNode(Je,{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"]]),$r=z(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=d=>{P.F.FTSP.Get().p.page=d.pagination.page-1,P.F.FTSP.Get().p.rowsPerPage=d.pagination.rowsPerPage,r.value.page=d.pagination.page,r.value.rowsPerPage=d.pagination.rowsPerPage},a=async d=>{s(d),await o.store.FTSP(),i("request")};return(d,c)=>(e.openBlock(),e.createBlock(e.unref(x.QTable),{pagination:e.unref(r),"onUpdate:pagination":c[0]||(c[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(d.$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 Za(n){n.component("PTable",$r),n.component("PTableBadge",Sr),n.component("PTableBadges",Cr),n.component("PTableCount",kr),n.component("PTableEdit",xr),n.component("PTableNumber",Er),n.component("PTableSelect",Br),n.component("PTableString",Nr)}const S1=Object.freeze(Object.defineProperty({__proto__:null,PTable:$r,PTableBadge:Sr,PTableBadges:Cr,PTableCount:kr,PTableEdit:xr,PTableNumber:Er,PTableSelect:Br,PTableString:Nr,default:Za},Symbol.toStringTag,{value:"Module"})),C1=["innerHTML"],Vr=z(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,d=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:d.value,name:d.value,label:d.htmlLabel?void 0:d.label,icon:d.icon,"no-caps":""},{default:e.withCtx(()=>[d.htmlLabel?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:d.htmlLabel},null,8,C1)):e.createCommentVNode("",!0),d.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,d=>(e.openBlock(),e.createBlock(e.unref(x.QTabPanel),{key:d.value,name:d.value,class:"tab-panel"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{item:d,tab:d},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])],2))}}),[["__scopeId","data-v-80c4d829"]]),k1={class:"q-pa-md"},Pr=z(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,d)=>(e.openBlock(),e.createBlock(e.unref(x.QSplitter),{modelValue:e.unref(s),"onUpdate:modelValue":d[0]||(d[0]=c=>e.isRef(s)?s.value=c: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,c=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:c.value,name:c.value,label:c.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",k1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(c,u)=>(e.openBlock(),e.createBlock(oe,{key:u,label:c.text,color:c.color,class:"q-mb-sm full-width",onClick:f=>c.action(c)},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(),c=>(e.openBlock(),e.createBlock(e.unref(x.QTabPanel),{key:c.value,name:c.value},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{item:c},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-a7a16408"]]);class ai{constructor(){l(this,"items",[]);l(this,"idx",0);l(this,"key","");l(this,"value","")}preSelect(){var o;const t=P.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 ai;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&&P.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 Ja(n){n.component("PTabs",Vr),n.component("PTabsLeft",Pr)}const x1=Object.freeze(Object.defineProperty({__proto__:null,Buildings:Zf,Chats:rm,Contacts:Um,Docs:eh,Extracts:rh,Forms:Th,Menus:Fh,Pages:lp,Schedule:n1,Settings:s1,Table:S1,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:Vr,PTabsLeft:Pr,TabsStore:ai,default:Ja},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Ka=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 d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{i("change",o.value)};return(d,c)=>(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":c[0]||(c[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))}}),E1={class:"row items-center justify-end"},li="DD.MM.YYYY",ci=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}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const o=n,i=t,r=e.useModel(n,"modelValue"),s=li.replace(/[DMY]/g,"#"),a=e.ref(null),d=y=>{if(o.modelType){a.value=o.modelType;return}y instanceof Date?a.value="date":(typeof y=="string"&&y||a.value===null)&&(a.value="string")},c=y=>{if(!y)return"";if(y instanceof Date)return Number.isNaN(y.getTime())?"":x.date.formatDate(y,li);const S=String(y).match(/^(\d{4})-(\d{2})-(\d{2})/);if(S)return`${S[3]}.${S[2]}.${S[1]}`;const B=new Date(y);return Number.isNaN(B.getTime())?"":x.date.formatDate(B,li)},u=y=>{const S=y.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!S)return null;const B=+S[1],E=+S[2],V=+S[3];if(B<1||B>31||E<1||E>12||V<1900||V>2100)return null;const k=new Date(V,E-1,B);return k.getFullYear()!==V||k.getMonth()!==E-1||k.getDate()!==B?null:k},f=e.ref(c(r.value));d(r.value),e.watch(r,y=>{d(y);const S=c(y);S!==f.value&&(f.value=S)});const m=y=>{const S=typeof y=="number"?String(y):y;if(!S){const E=a.value==="date"?null:"";r.value=E,i("input",E);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(S))return;const B=u(S);if(B)if(a.value==="date")r.value=B,i("input",B);else{const E=B.getFullYear(),V=String(B.getMonth()+1).padStart(2,"0"),k=String(B.getDate()).padStart(2,"0"),M=`${E}-${V}-${k}`;r.value=M,i("input",M)}},h=()=>{i("blur",r.value)},w={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(y,S)=>{const B=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(Je,{modelValue:e.unref(f),"onUpdate:modelValue":[S[1]||(S[1]=E=>e.isRef(f)?f.value=E:null),m],class:"fit",label:n.label,placeholder:n.placeholder,mask:e.unref(s),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,inputmode:"numeric",onBlur:h},{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(f),"onUpdate:modelValue":S[0]||(S[0]=E=>e.isRef(f)?f.value=E:null),mask:li,"today-btn":"",locale:w},{default:e.withCtx(()=>[e.createElementVNode("div",E1,[e.withDirectives(e.createVNode(oe,{label:"Готово",color:"primary",flat:""},null,512),[[B]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:e.withCtx(()=>[e.renderSlot(y.$slots,"before")]),append:e.withCtx(()=>[e.renderSlot(y.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width"])}}}),B1=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=d=>{const c=d.getFullYear(),u=String(d.getMonth()+1).padStart(2,"0"),f=String(d.getDate()).padStart(2,"0");return`${c}-${u}-${f}`},s=d=>{o("input",d instanceof Date?r(d):d??null)},a=()=>{o("blur")};return(d,c)=>(e.openBlock(),e.createBlock(ci,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[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(d.$slots,"default")]),append:e.withCtx(()=>[e.renderSlot(d.$slots,"right")]),_:3},8,["modelValue","label","placeholder","margin","padding"]))}}),N1={class:"row items-center justify-end"},$1={class:"row items-center justify-end"},el=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:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=e.ref(""),i=e.ref(""),r=e.ref(""),s=w=>w?x.date.formatDate(w,"DD.MM.YYYY HH:mm"):"",a=w=>{if(!w||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(w))return null;const y=x.date.extractDate(w,"DD.MM.YYYY HH:mm");return Number.isNaN(y.getTime())?null:y},d=w=>{t.value=w},c=w=>{const y=String(w??"");o.value=y.replace(/[_\s]/g,"")===""?"":y},u=()=>{const w=a(o.value);w?d(w):o.value===""?d(null):o.value=s(t.value)},f=()=>{if(i.value){const w=t.value?x.date.formatDate(t.value,"HH:mm"):"00:00",y=`${i.value} ${w}`,S=a(y);S&&(o.value=s(S),d(S))}i.value=""},m=()=>{if(r.value){const w=t.value?x.date.formatDate(t.value,"DD.MM.YYYY"):"",y=x.date.formatDate(new Date,"DD.MM.YYYY"),S=w?`${w} ${r.value}`:`${y} ${r.value}`,B=a(S);B&&(o.value=s(B),d(B))}r.value=""};e.watch(t,w=>{w!==a(o.value)&&(o.value=s(w??null))},{immediate:!0});const h={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(w,y)=>{const S=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(Je,{"model-value":e.unref(o),label:n.label,placeholder:n.placeholder,disable:n.disable,readonly:n.readonly,error:n.error,"error-message":n.errorMessage,mask:"##.##.#### ##:##","fill-mask":"","onUpdate:modelValue":c,onBlur:u},{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(i),"onUpdate:modelValue":y[0]||(y[0]=B=>e.isRef(i)?i.value=B:null),mask:"DD.MM.YYYY",locale:h},{default:e.withCtx(()=>[e.createElementVNode("div",N1,[e.withDirectives(e.createVNode(oe,{label:"OK",color:"primary",flat:"",onClick:f},null,512),[[S]])])]),_: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(r),"onUpdate:modelValue":y[1]||(y[1]=B=>e.isRef(r)?r.value=B:null),mask:"HH:mm",format24h:"",locale:h},{default:e.withCtx(()=>[e.createElementVNode("div",$1,[e.withDirectives(e.createVNode(oe,{label:"OK",color:"primary",flat:"",onClick:m},null,512),[[S]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model-value","label","placeholder","disable","readonly","error","error-message"])}}}),V1=z(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"]]),P1={class:"p-hint-popup"},Tr=z(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",P1,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),T1=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=d=>{o("input",d),r=d instanceof Date?d:null},a=()=>{r instanceof Date&&(o("beforeChange",r),o("change",r),r=null)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:"style-container",style:e.normalizeStyle({width:n.width,position:"relative"})},[e.createVNode(ci,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[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))}}),I1=z(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"]]),M1=z(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"]]),R1=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}},{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 I={};for(const A of Object.keys(i))A!=="id"&&(I[A]=i[A]);return I}),a=n,d=()=>{const I=a.step.toString();return I.includes(".")?I.split(".")[1].length:0},c=d(),u=e.useModel(n,"modelValue"),m=(I=>Math.min(Math.max(I,a.min),a.max))(u.value);m!==u.value&&(u.value=m);const h=e.ref(m.toFixed(d())),w=e.computed(()=>{const I={};return a.margin&&(I.margin=a.margin),a.padding&&(I.padding=a.padding),I}),y=I=>{const A=Math.pow(10,c);return Math.round(I*A)/A},S=(I,...A)=>{u.value=y(I),h.value=y(I).toFixed(d()),A.forEach(Q=>o(Q,u.value))},B=(I,...A)=>{a.disabled||I>a.max||I<a.min||S(I,...A)},E=()=>B(+h.value+a.step,"change"),V=()=>B(+h.value-a.step,"change"),k=I=>B(Number(I),"input"),M=()=>B(+h.value,"change","blur");return(I,A)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps(e.unref(s),{for:e.unref(r),"model-value":e.unref(h),label:n.label||void 0,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:e.unref(w),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":k,onBlur:M}),{before:e.withCtx(()=>[e.createVNode(e.unref(x.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:V},{default:e.withCtx(()=>[e.createVNode(I1)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(x.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:E},{default:e.withCtx(()=>[e.createVNode(M1)]),_:1})]),_:1},16,["for","model-value","label","disable","input-style","style"]))}}),D1=z(R1,[["__scopeId","data-v-6f4093e8"]]),z1=z(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,d)=>{const c=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:d[0]||(d[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(c,{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(c,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),A1=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"]))}}),_1=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"]))}}),tl=e.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var d;const t=n,o=((d=t.storeOpts)==null?void 0:d.Options)??[],i=e.ref(o);async function r(c,u,f,m){var S,B;const w="set"+(((S=u[0])==null?void 0:S.toUpperCase())+u.slice(1)),y=c[w];typeof y=="function"?y(f):(c[u]=f,c[u+"Id"]=f==null?void 0:f.id),await((B=m==null?void 0:m.Update)==null?void 0:B.call(m,c))}const s=(c,u)=>{if(c===""){u(()=>{i.value=o});return}u(()=>{i.value=o.filter(f=>P.H.Strings.SearchInFields(c,[f.label]))})},a=async c=>{c?(await t.storeOpts.Get(c.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)}),(c,u)=>(e.openBlock(),e.createBlock(bo,{"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(Tr,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),F1=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,d)=>(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":[d[0]||(d[0]=c=>o.value=c),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))}}),O1=z(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,d)=>{const c=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:d[0]||(d[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(c,{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(c,{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"]]),L1=z(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"]]),nl=e.defineComponent({__name:"PTableHtml",props:{margin:{type:String,required:!1,default:"0 0 20px 0"},width:{type:String,required:!1,default:"100%"},fontSize:{type:String,required:!1,default:"var(--font-size-default)"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("table",e.mergeProps(t.$attrs,{style:{width:n.width,margin:n.margin},class:"p-table"}),[e.createElementVNode("thead",null,[e.renderSlot(t.$slots,"thead")]),e.createElementVNode("tbody",null,[e.renderSlot(t.$slots,"tbody")])],16))}}),ol=z(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"]]),H1=z(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}},{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 c={};for(const u of Object.keys(o))u!=="id"&&(c[u]=o[u]);return c}),s=n,a=e.computed(()=>({color:s.color||void 0,resize:s.resize})),d=e.computed(()=>{const c={};return s.margin&&(c.margin=s.margin),s.padding&&(c.padding=s.padding),s.borderColor&&(c["--p-border-color"]=s.borderColor),c});return(c,u)=>(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,type:"textarea","input-style":e.unref(a),style:e.unref(d),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>c.$emit("input",t.value)),onBlur:u[2]||(u[2]=f=>c.$emit("blur",t.value)),onFocus:u[3]||(u[3]=f=>c.$emit("focus",t.value))}),{before:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),append:e.withCtx(()=>[e.renderSlot(c.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","input-style","style"]))}}),[["__scopeId","data-v-8e01fef2"]]),il=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 d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{i("change",o.value)};return(d,c)=>(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":c[0]||(c[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))}}),U1={class:"top-slider-content"},v1={class:"center"},j1=z(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,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=e.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[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:d[3]||(d[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",U1,[e.createElementVNode("div",v1,[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:d[2]||(d[2]=c=>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 q1(n){n.component("PButton",oe),n.component("PBadge",lo),n.component("PCheckBox",Ka),n.component("PChip",br),n.component("PDateInput",ci),n.component("PDatePicker",B1),n.component("PDateTimeInput",el),n.component("PDialog",cn),n.component("PFlex",V1),n.component("PHint",Tr),n.component("PInput",Je),n.component("PInputDate",T1),n.component("PInputNumber",D1),n.component("PLeftSlider",z1),n.component("PList",A1),n.component("PListItem",_1),n.component("POptionsListSingle",si),n.component("POpts",tl),n.component("PRadio",F1),n.component("PRightSlider",O1),n.component("PSelect",bo),n.component("PSticky",L1),n.component("PString",or),n.component("PTextarea",H1),n.component("PTopSlider",j1),n.component("PTableHtml",nl),n.component("PTableToggle",ol),n.component("PToggle",il),n.component("PTooltip",nt)}const W1={key:0,class:"mainblock"},G1={class:"mainblock-right"},Q1={class:"body"},Y1=z(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,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",W1,[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:d[0]||(d[0]=c=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",G1,[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:d[1]||(d[1]=c=>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",Q1,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),X1={class:"mainblock-right"},Z1={class:"body"},J1=z(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,d)=>(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:d[0]||(d[0]=c=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",X1,[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:d[1]||(d[1]=c=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4),e.createElementVNode("div",Z1,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),rl=z(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"]]),K1={class:"container"},ey={class:"slide-box"},ty={class:"image"},ny={class:"image-box"},oy=["id","src","alt"],iy={class:"link-number"},ry=["id","onClick"],sy=z(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(w=>({v582c9d05:o}));const t=n,o=`${t.animationTime}ms`,i=e.ref(t.startActiveGroupIndex),r=e.ref(Nt.None),s=e.ref(la(t.events,t.quantity)),a=e.computed(()=>s.value[i.value]);e.onMounted(()=>{});const d=()=>i.value=i.value+1<s.value.length?i.value+1:0,c=()=>i.value=i.value-1<0?s.value.length-1:i.value-1,u=w=>{r.value=w,setTimeout(()=>r.value=Nt.None,t.animationTime)},f=w=>{w!=i.value&&(u(w<i.value?Nt.Prev:Nt.Next),setTimeout(()=>i.value=w,t.animationTime/2))},m=()=>{u(Nt.Next),setTimeout(d,t.animationTime/2)},h=()=>{u(Nt.Prev),setTimeout(c,t.animationTime/2)};return(w,y)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",K1,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:y[0]||(y[0]=e.withModifiers(S=>h(),["stop"]))},[...y[3]||(y[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",ey,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(S,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:e.normalizeClass({animationnext:e.unref(r)===e.unref(Nt).Next,animationprev:e.unref(r)===e.unref(Nt).Prev})},[e.createElementVNode("div",ty,[e.createElementVNode("div",ny,[e.createElementVNode("img",{id:S.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:S.fileInfo.getImageUrl(),alt:S.fileInfo.originalName,onClick:y[1]||(y[1]=E=>w.showImageInFullScreen())},null,12,oy)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:y[2]||(y[2]=e.withModifiers(S=>m(),["stop"]))},[...y[4]||(y[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",iy,[e.createVNode(rl,{"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),(S,B)=>(e.openBlock(),e.createElementBlock("div",{id:B.toString(),key:B,class:"number",style:e.normalizeStyle({background:B.toString()===e.unref(i).toString()?"#9D9D9D":""}),onClick:e.withModifiers(E=>f(B),["stop"])},e.toDisplayString(B+1),13,ry))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),ay=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"),d=e.computed(()=>s.value+"px"),c=()=>{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(d)})},[e.renderSlot(u.$slots,"default")],4)),[[m,c]])}}}),ly={class:"date-range"},cy=z(e.defineComponent({__name:"DateInputRange",props:{start:{type:Date,default:void 0},end:{type:Date,default:void 0}},emits:["update:start","update:end","setStart","setEnd"],setup(n,{emit:t}){const o=n,i=t;e.watch(()=>[o.start,o.end],()=>{o.start||(r.value=void 0),o.end||(s.value=void 0)});const r=e.ref(o.start),s=e.ref(o.end),a=c=>{r.value=c,!(!o.end||c>o.end)&&(i("update:start",c),i("setStart",c))},d=c=>{s.value=c,!(!o.start||c<o.start)&&(i("update:end",c),i("setEnd",c))};return(c,u)=>{const f=e.resolveComponent("PInputDate");return e.openBlock(),e.createElementBlock("div",ly,[e.createVNode(f,{"model-value":e.unref(r),"onUpdate:modelValue":u[0]||(u[0]=m=>e.isRef(r)?r.value=m:null),onChange:a},null,8,["model-value"]),u[2]||(u[2]=e.createTextVNode(" - ",-1)),e.createVNode(f,{"model-value":e.unref(s),"onUpdate:modelValue":u[1]||(u[1]=m=>e.isRef(s)?s.value=m:null),onChange:d},null,8,["model-value"])])}}}),[["__scopeId","data-v-b93b6d46"]]),dy=e.defineComponent({name:"DateInputRangeV2"}),uy={class:"date-range"};function fy(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock("div",uy,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const my=z(dy,[["render",fy],["__scopeId","data-v-d28c6f33"]]),hy={class:"drop-item"},py={key:0,class:"drop-item-list"},gy=z(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"),d=e.resolveComponent("IconArrowDrop");return e.openBlock(),e.createElementBlock("div",hy,[e.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=c=>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(d,{size:"10px",margin:"0"})],4)]),e.unref(o)?(e.openBlock(),e.createElementBlock("div",py,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),yy=z(e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Mi,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?P.F.FTSP.Get().setF(o.model):P.F.FTSP.Get().removeF(o.model),r("load")};return(a,d)=>{const c=e.resolveComponent("PCheckBox");return e.openBlock(),e.createBlock(c,{modelValue:e.unref(i),"onUpdate:modelValue":d[0]||(d[0]=u=>e.isRef(i)?i.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),[["__scopeId","data-v-72984c94"]]),wy=z(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=>{_t.Get().replaceF(a,i.value),i.value=a,_t.Get().p.drop()},s=async a=>{await r(a),o("load")};return(a,d)=>{const c=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(c,{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(()=>[...d[0]||(d[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,(h,w)=>(e.openBlock(),e.createBlock(u,{key:w,color:"blue",height:"auto",text:h.label,"is-toggle":h.valueEq(e.unref(i)),"toggle-mode":!0,inverse:n.inverse,onClick:y=>s(h.valueEq(e.unref(i))?void 0:h)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-586481ea"]]),by=["value","label"],Sy=z(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=_t.Get(),r=e.ref(void 0),s=async d=>{i.replaceF(d,r.value),r.value=d},a=async d=>{d?await s(r.value):await s(void 0),o("load")};return(d,c)=>{const u=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(u,{modelValue:e.unref(r),"onUpdate:modelValue":c[0]||(c[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,by))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-ae66df57"]]),Cy=z(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,o)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-e280d85b"]]),ky=z(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"]]),xy={key:0,class:"blur"},Ey={style:{display:"flex","justify-content":"center"}},By=z(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),d=e.ref(!1),c=e.ref(o.close);e.watch(()=>o.close,()=>{a.value=!1});const u=M=>{M.stopPropagation(),M.key==="Escape"&&(o.showSaveDialog?d.value=!0:a.value=!1)};e.watch(a,async()=>{var M,I;await e.nextTick(),a.value?((I=(M=document.getElementById("info-item-opened-content"))==null?void 0:M.querySelector("input"))==null||I.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,c.value!==o.close&&(a.value=!1,c.value=!c.value)},m=e.computed(()=>o.customClass===""?{width:o.width,minHeight:"40px",height:"auto",maxWidth:o.maxWidth,minWidth:o.minWidth,margin:o.baseBoxMargin}:void 0),h=e.computed(()=>a.value&&o.withOpenWindow),w=e.computed(()=>({background:o.background?o.background:void 0,zIndex:h.value?"2":"0",padding:h.value?"0":o.padding,margin:o.margin,width:h.value?o.openWidth:o.width,height:h.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:h.value?"end":"center",cursor:(o.withHover,"pointer")})),y=e.computed(()=>({height:h.value?"0":"",overflow:o.closeWindowOverflow,width:o.width})),S=e.computed(()=>({height:h.value?"auto":"0"})),B=e.computed(()=>({color:s.value?o.colorSelected:"#343E5C",fill:s.value?o.colorSelected:"#343E5C",background:o.background})),E=()=>{o.showSaveDialog?d.value=!0:a.value=!1},V=async()=>{await i("keyup-enter"),o.close&&(a.value=!1),d.value=!1},k=()=>{a.value=!1,d.value=!1};return(M,I)=>{const A=e.resolveComponent("PString"),Q=e.resolveComponent("PButton"),se=e.resolveComponent("PModal"),_e=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",xy)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(m)),onClick:I[2]||(I[2]=e.withModifiers(Ne=>f(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(w)),onMouseenter:I[0]||(I[0]=Ne=>n.withHover?s.value=!0:s.value=!1),onMouseleave:I[1]||(I[1]=Ne=>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(y))},[e.renderSlot(M.$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(S))},[e.renderSlot(M.$slots,"open-inside-content",{},void 0,!0)],4)),[[_e,E,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(B))},[e.renderSlot(M.$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(se,{show:e.unref(d),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",Ey,[e.createVNode(Q,{text:"Не сохранять",onClick:k}),e.createVNode(Q,{text:"Сохранять",onClick:V})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-e8e8f1a1"]]),Ny=z(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 d=e.resolveComponent("PString"),c=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(c,{key:f,type:"admin",color:"blue",text:f,onClick:m=>r(f)},null,8,["text","onClick"]))),128)),e.createVNode(c,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:e.withCtx(()=>[e.createVNode(d,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),$y={class:"mainblock"},Vy={class:"mainline"},Py=z(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",$y,[e.createElementVNode("div",Vy,[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"]]),sl=z(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"]]),Ty={class:"search-list"},Iy=["onClick"],al=z(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 d()}async function d(){i.searchFunc&&(s.value=await i.searchFunc(r.value))}async function c(u){r.value="",o("select",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle({width:n.width})},[e.createVNode(Je,{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(sl,{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",Ty,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>(e.openBlock(),e.createElementBlock("li",{key:m.value,onClick:h=>c(m)},e.toDisplayString(m.label),9,Iy))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),My=z(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-51bf3f08"]]),Ry={};function Dy(n,t){return e.openBlock(),e.createElementBlock(e.Fragment,null,[t[0]||(t[0]=e.createElementVNode("div",{class:"blur"},null,-1)),t[1]||(t[1]=e.createElementVNode("div",{class:"loader-container"},[e.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const zy=z(Ry,[["render",Dy],["__scopeId","data-v-0f1f2f84"]]),Ay={style:{display:"flex","justify-content":"center",width:"100%"}},_y={class:"pag-number"},Fy={class:"pag-ul"},Oy={key:2},Ly=z(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(ca),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 d=async m=>{if(m!==r.value.curPage&&(m<1&&(m=1),m>r.value.pagesCount()&&(m=r.value.pagesCount()),!t.showConfirm))return await c(m)},c=async(m,h)=>{r.value.setCurPage(m),_t.Get().p.offset=(m-1)*r.value.limit,await t.store.FTSP(),f()},u=e.computed(()=>{const m=r.value.pagesCount();return m<8?At.GenerateNumsRange(2,m-1).filter(h=>h<m&&h>1):At.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(h=>h<m&&h>1)}),f=()=>{const m=document.querySelector(".el-table__body-wrapper"),h=document.querySelector("#list");m?m.scrollTo({top:0}):h&&h.scrollTo({top:0})};return e.onBeforeUnmount(()=>{_t.Get().p.drop()}),(m,h)=>{const w=e.resolveComponent("ArrowLeft"),y=e.resolveComponent("PButton"),S=e.resolveComponent("DoubleArrowLeft"),B=e.resolveComponent("EllipsisSvg"),E=e.resolveComponent("DoubleArrowRight"),V=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",Ay,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",_y,[e.createVNode(y,{skin:"pag",type:i(e.unref(r).curPage===1),onClick:h[0]||(h[0]=k=>d(e.unref(r).curPage-1))},{default:e.withCtx(()=>[e.createVNode(w)]),_:1},8,["type"]),e.createElementVNode("ul",Fy,[e.createElementVNode("li",null,[e.createVNode(y,{skin:"pag",type:o(e.unref(r).curPage===1),text:"1",onClick:h[1]||(h[1]=k=>d(1))},null,8,["type"])]),e.unref(r).pagesCount()>8&&e.unref(r).curPage>4?(e.openBlock(),e.createElementBlock("li",{key:0,onMouseenter:h[3]||(h[3]=k=>s.value=!0),onMouseleave:h[4]||(h[4]=k=>s.value=!1)},[e.createVNode(y,{skin:"pag",type:"neutral",onClick:h[2]||(h[2]=k=>d(e.unref(r).curPage-5))},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(S,{key:0})):(e.openBlock(),e.createBlock(B,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),k=>(e.openBlock(),e.createElementBlock("li",{key:k},[e.createVNode(y,{skin:"pag",type:o(k===e.unref(r).curPage),text:k,onClick:M=>d(k)},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:h[6]||(h[6]=k=>a.value=!0),onMouseleave:h[7]||(h[7]=k=>a.value=!1)},[e.createVNode(y,{skin:"pag",type:"neutral",onClick:h[5]||(h[5]=k=>d(e.unref(r).curPage+5))},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(E,{key:0})):(e.openBlock(),e.createBlock(B,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",Oy,[e.createVNode(y,{skin:"pag",type:o(e.unref(r).pagesCount()===e.unref(r).curPage),text:e.unref(r).pagesCount(),onClick:h[8]||(h[8]=k=>d(e.unref(r).pagesCount()))},null,8,["type","text"])])):e.createCommentVNode("",!0)]),e.createVNode(y,{skin:"pag",type:i(e.unref(r).curPage===e.unref(r).pagesCount()),onClick:h[9]||(h[9]=k=>d(e.unref(r).curPage+1))},{default:e.withCtx(()=>[e.createVNode(V)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),Hy=z(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=nr.SearchModel();e.watch(()=>o.focus,()=>{o.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const d=async f=>{if(f.length<2)return;s.value.activated=!0,a=nr.SearchModel(),a.searchObjects=[],a.query=f,a.key=o.keyValue;const m=a.searchGroups.find(h=>h.key===o.keyValue);return m&&(a.searchGroup=m),await wa.Search.Search(a),a.searchObjects},c=async f=>{i("select",f),r.value=""},u=f=>{i("input",f),f.length===0&&i("input","")};return(f,m)=>(e.openBlock(),e.createBlock(al,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":m[0]||(m[0]=h=>e.isRef(r)?r.value=h:null),"max-height-result-list":n.maxHeightResultList,"z-index-result-list":n.zIndexResultList,"box-shadow-result-list":n.boxShadowResultList,width:n.width,"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:n.placeholder,"search-func":d,"trigger-on-focus":n.showSuggestions,suggestions:e.unref(a).searchObjects,onSelect:c,onInput:u},null,8,["modelValue","max-height-result-list","z-index-result-list","box-shadow-result-list","width","placeholder","trigger-on-focus","suggestions"]))}}),[["__scopeId","data-v-af0b4b1a"]]),Uy={class:"mainblock-body"},vy={class:"mainblock-footer"},jy=z(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",Uy,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",vy,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),qy={class:"right-slider-content"},Wy={class:"right-slider-content-header"},Gy={class:"right-slider-content-box"},Qy={class:"right-slider-button"},Yy=z(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,d)=>{const c=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:d[0]||(d[0]=u=>s(!e.unref(r)))},[e.unref(r)?(e.openBlock(),e.createBlock(c,{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(c,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),e.createElementVNode("div",qy,[e.createElementVNode("div",Wy,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",Gy,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",Qy,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),Xy={class:"mainblock"},Zy={class:"body-block"},Jy={class:"tab-block"},Ky=z(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=c=>{i("toggle",c)},d=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}),(c,u)=>(e.openBlock(),e.createElementBlock("div",Xy,[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=>d.value=!0),onMouseleave:u[2]||(u[2]=f=>d.value=!1)},[e.createElementVNode("div",{class:"icon-block",style:e.normalizeStyle({transform:e.unref(d)?n.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":n.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:n.isToggle?"#379FFF":"#00B5A4"})},[e.renderSlot(c.$slots,"icon",{},void 0,!0)],4)],36),e.createElementVNode("div",{class:"slider-info",style:e.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[e.renderSlot(c.$slots,"slider-body",{},void 0,!0)],4)],4),e.createElementVNode("div",Zy,[e.renderSlot(c.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",Jy,[e.renderSlot(c.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),e0=["label","value"],t0=z(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const o={[Qe.String]:"Текстовый ответ",[Qe.Text]:"Развёрнутый текстовый ответ",[Qe.Number]:"Числовой ответ",[Qe.Date]:"Ответ в виде даты",[Qe.Radio]:"Выбор одного из вариантов",[Qe.Set]:"Выбор нескольких вариантов",[Qe.File]:"Ответ в виде файла",[Qe.MatrixRadio]:"Матрица с одним выбором",[Qe.MatrixSet]:"Матрица с несколькими выборами"},i=t,r=s=>{i("select",s)};return(s,a)=>{const d=e.resolveComponent("PString"),c=e.resolveComponent("PSelect");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(d,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),e.createVNode(c,{"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,e0)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),n0=["label","value"],o0=z(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=an.GetDefault()});const s=async d=>{r.value=d??an.GetDefault(),i("load")},a=async d=>{await s(d)};return(d,c)=>{var f;const u=e.resolveComponent("PSelect");return e.unref(o)?(e.openBlock(),e.createBlock(u,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":c[0]||(c[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:c[1]||(c[1]=m=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(an).Get(),(m,h)=>(e.openBlock(),e.createElementBlock("option",{key:h,label:m.label,value:m},null,8,n0))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-982338b4"]]),i0=["label","value"],r0=z(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=an.GetDefault()});const r=async a=>{a||(i.value=an.GetDefault()),_t.Get().setSortModel(i.value),_t.Get().p.drop(),o("load")},s=async a=>{await r(a)};return(a,d)=>{var u;const c=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(c,{modelValue:e.unref(i),"onUpdate:modelValue":d[0]||(d[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(an).Get(),(f,m)=>(e.openBlock(),e.createElementBlock("option",{key:m,label:f.label,value:f},null,8,i0))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-80f413ec"]]),s0={class:"switch-container"},a0={class:"line"},l0={class:"line"},c0=z(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,d=m=>{var w;return{color:(w=u.value)!=null&&w.valueEq(m)?"#006bb4":"#B0A4C0"}},c=t,u=e.ref(void 0),f=async m=>{var h;(h=u.value)!=null&&h.valueEq(m)||(u.value=m,c("load"))};return(m,h)=>{const w=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",s0,[e.createElementVNode("div",a0,[e.createVNode(w,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(d(n.firstModel)),onClick:h[0]||(h[0]=y=>f(n.firstModel))},null,8,["string","style"]),e.createVNode(w,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(d()),onClick:h[1]||(h[1]=y=>f())},null,8,["style"]),e.createVNode(w,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(d(n.secondModel)),onClick:h[2]||(h[2]=y=>f(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",l0,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(r()),onClick:h[3]||(h[3]=y=>f(n.firstModel))},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob2",{active:!e.unref(u)}]),style:e.normalizeStyle(s()),onClick:h[4]||(h[4]=y=>f())},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(a()),onClick:h[5]||(h[5]=y=>f(n.secondModel))},null,6),h[6]||(h[6]=e.createElementVNode("div",{class:"switch-axis"},null,-1)),h[7]||(h[7]=e.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),h[8]||(h[8]=e.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),h[9]||(h[9]=e.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),d0={},u0={class:"flex"};function f0(n,t){return e.openBlock(),e.createElementBlock("div",u0,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const m0=z(d0,[["render",f0],["__scopeId","data-v-5023d414"]]),h0=z(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 d=e.resolveComponent("PString"),c=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(c,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:e.withCtx(()=>[n.content.length>0?(e.openBlock(),e.createBlock(d,{key:0,string:n.content},null,8,["string"])):(e.openBlock(),e.createBlock(d,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-0794596f"]]),p0={class:"top-slider-content"},g0={class:"center"},y0=z(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,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=e.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[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:d[3]||(d[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",p0,[e.createElementVNode("div",g0,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",{class:"click-line",style:e.normalizeStyle({height:n.sliderOffHeight}),onClick:d[2]||(d[2]=c=>s(!e.unref(r)))},[e.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function w0(n){n.component("PageNotFound",ra),n.component("AdaptiveContainer",Y1),n.component("AdaptiveContainerHorizontal",J1),n.component("CarouselImages",sy),n.component("ContextWindow",ay),n.component("DateInputRangeV2",my),n.component("DateInputRange",cy),n.component("DropList",gy),n.component("FilterCheckbox",yy),n.component("FiltersButtonsSelect",wy),n.component("FilterSelect",Sy),n.component("FTSPPanel",Cy),n.component("GeneralItem",ky),n.component("GridContainer",rl),n.component("InfoItem",By),n.component("InfoItemSelectButtons",Ny),n.component("LeftRightContainer",Py),n.component("PAutocomplete",al),n.component("PhoneForm",My),n.component("PLoader",zy),n.component("PPagination",Ly),n.component("RemoteSearch",Hy),n.component("ResearcheContainer",jy),n.component("RightSliderContainer",Yy),n.component("RightTabsContainer",Ky),n.component("SelectValueType",t0),n.component("SortList",o0),n.component("SortSelect",r0),n.component("Switch3Pos",c0),n.component("ThemeWrapper",m0),n.component("ToggleInfoItem",h0),n.component("TopSliderContainer",y0)}const b0=z(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"]]),S0=z(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"]]),C0=z(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"]]),k0=z(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"]]),ll=z(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"]]),x0=z(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"]]),E0=z(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"]]),B0=z(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"]]),N0=z(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"]]),$0=z(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"]]),V0=z(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"]]),P0=z(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"]]),T0=z(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"]]),I0=z(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"]]),M0=z(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 R0(n){n.component("IconDownload",b0),n.component("IconFilter",S0),n.component("ArrowLeft",V0),n.component("ArrowRight",P0),n.component("DoubleArrowLeft",T0),n.component("DoubleArrowRight",I0),n.component("EllipsisSvg",M0),n.component("IconArrowLeft",C0),n.component("IconCheckDefault",k0),n.component("IconClose",ll),n.component("IconEdit",x0),n.component("IconEmail",E0),n.component("IconMove",B0),n.component("IconPhone",N0),n.component("IconSearch",sl),n.component("IconSelectArrow",$0)}const D0=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 z0(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 A0=z(D0,[["render",z0]]),_0=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}}}),F0=["for"],O0={class:"inside-icon"};function L0(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",O0,[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,F0),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-c2e31ebb><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-c2e31ebb></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-c2e31ebb></path></symbol></svg>',1))],64)}const H0=z(_0,[["render",L0],["__scopeId","data-v-c2e31ebb"]]),U0={class:"tab"},v0={class:"rotate"},j0=z(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",U0,[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",v0,[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"]]),q0={class:"add-block_body"},W0=z(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",q0,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),G0=z(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"]]),Q0={class:"add-block_body"},Y0=z(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",Q0,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),X0={class:"select-dialog"},Z0={class:"select-dialog-header"},J0={class:"select-dialog-title"},K0={class:"select-dialog-content"},ew={class:"select-dialog-actions"},cl=z(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([]),d=x.Ripple,c=async()=>{await i.store.GetOptions(),a.value=i.store.Options},u=async S=>{await i.store.Get(S.value);const B=i.store.Item,E=new B.constructor(B);r("add",E),f()},f=()=>{r("close"),s.value=!1},m=S=>{S||r("close")},h=()=>{s.value&&f()},w=()=>{s.value=!s.value},y=async()=>{await e.nextTick();const S=document.querySelector(".select-dialog-content .q-item");S&&"focus"in S&&S.focus()};return t({opened:s,toggle:w}),e.onBeforeMount(c),(S,B)=>{const E=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:s.value,"onUpdate:modelValue":[B[0]||(B[0]=V=>s.value=V),m],position:"top",onKeydown:e.withKeys(h,["escape"]),onShow:y},{default:e.withCtx(()=>[e.createElementVNode("div",X0,[e.createElementVNode("div",Z0,[e.createElementVNode("div",J0,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[E]])]),e.createElementVNode("div",K0,[e.createVNode(e.unref(x.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),V=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.QItem),{key:V.value,clickable:"",class:"q-px-md q-py-sm",onClick:k=>u(V)},{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(V.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(d)]])),128))]),_:1})]),e.createElementVNode("div",ew,[e.withDirectives(e.createVNode(oe,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[E]])])])]),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-462df82a"]]),tw=["src"],nw={key:0,class:"header-row"},ow={class:"title-wrapper"},iw={key:0,class:"title-icon"},rw={class:"title-text"},sw={class:"text-subtitle1 text-weight-medium"},aw={key:0,class:"caption-row"},lw={class:"text-caption text-grey-6"},cw=["innerHTML"],dw={key:1,class:"card-footer"},dl=z(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=d=>{i.noPointer||r("click",d)};return(d,c)=>(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,tw)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QCardSection),{class:"card-content",style:e.normalizeStyle({maxHeight:n.maxHeight})},{default:e.withCtx(()=>[n.title||d.$slots.title||d.$slots.icon?(e.openBlock(),e.createElementBlock("div",nw,[e.createElementVNode("div",ow,[n.icon||d.$slots.icon?(e.openBlock(),e.createElementBlock("div",iw,[e.renderSlot(d.$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",rw,[e.renderSlot(d.$slots,"title",{},()=>[e.createElementVNode("span",sw,e.toDisplayString(n.title),1)],!0)])]),d.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",aw,[e.renderSlot(d.$slots,"caption",{},()=>[e.createElementVNode("span",lw,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||d.$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(d.$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,cw)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",dw,[e.renderSlot(d.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),uw={key:0,class:"list-title"},fw={class:"draggable-item"},mw={class:"drag-handle"},hw={class:"item-content"},pw={key:0,class:"item-actions"},gw={class:"item-content"},yw={key:0,class:"item-actions"},ww={key:4,class:"add-button-container"},bw=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:P.H.BaseStore,default:void 0},addFunc:{type:Function,required:!0},addToList:{type:Boolean,default:!0},removeFromList:{type:Boolean,default:!0},margin:{type:String,required:!0,default:"0"},background:{type:String,required:!0,default:"var(--background-color)"}},emits:["add","remove","update","sort"],setup(n,{emit:t}){e.useCssVars(c=>({v73008f9f:n.background}));const o=n,i=t,r=async()=>{const c=await o.addFunc();c.order!=="undefined"&&(c.order=o.list.length),o.addToList&&o.store&&o.store.AppendToAll(c),o.store&&await o.store.Create(c),await d(),i("add",c)},s=async c=>{o.removeFromList&&P.H.Classes.RemoveFromClassById(c,o.list),o.store&&await o.store.Remove(c),await d(),i("remove",c)},a=async c=>{o.store&&await o.store.Update(c),i("update",c)},d=async()=>{!o.sortable||o.list.length===0||typeof o.list[0].order>"u"||(P.H.Sorter.Sort(o.list),o.store&&await o.store.UpdateMany(o.list),i("sort"))};return(c,u)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(c.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(e.openBlock(),e.createElementBlock("div",uw,e.toDisplayString(n.title),1)):e.renderSlot(c.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(xi),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:d},{item:e.withCtx(({element:f,index:m})=>[e.createElementVNode("div",fw,[e.createElementVNode("div",mw,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",hw,[e.renderSlot(c.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(Je,{modelValue:f.name,"onUpdate:modelValue":h=>f.name=h,outlined:"",dense:"",class:"content-input",onBlur:h=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",pw,[e.createVNode(oe,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:h=>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",gw,[e.renderSlot(c.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(Je,{modelValue:f.name,"onUpdate:modelValue":h=>f.name=h,outlined:"",dense:"",class:"content-input",onBlur:h=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",yw,[e.createVNode(oe,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:h=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)],4))),128)),n.showAdd?(e.openBlock(),e.createElementBlock("div",ww,[e.createVNode(oe,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),ul=z(bw,[["__scopeId","data-v-27edbd1f"]]),Sw={class:"del-block_title"},Cw={class:"del-block_body"},kw=z(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",Sw,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",Cw,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),fl=z(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,d)=>{const c=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(c,{size:"20px"})])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function xw(n){n.component("CollapseContainer",A0),n.component("CollapseItem",H0),n.component("VerticalCollapseContainer",j0),n.component("PAdd",W0),n.component("PAddDialog",cl),n.component("PCard",dl),n.component("PCrudList",ul),n.component("PEditDialog",Un),n.component("PModal",fl),n.component("PContainer",G0),n.component("PContainerStickyHead",Y0),n.component("PDel",kw)}const Ew={class:"btn-group"},ml=z(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 d=>{if(!d.isSubmit){Oe.Form.SetChunk(d.GetChunk()),a();return}const c=Oe.Form.Validate();if(c.length>0){Qt.Notify.Error(c.join("<br/>"));return}o("submit")},a=()=>{if(!r.value)return;const d=r.value[0];d&&d.$refs.input.focus()};return e.onMounted(async()=>{await a()}),e.onBeforeUnmount(()=>{Oe.Form.Reset()}),(d,c)=>(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(or,{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(Je,{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",Ew,[(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(Oe).Form.IsBlock,type:f===0?e.unref(ge).Success:e.unref(ge).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"]]),Bw=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(fl,{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(ml,{margin:n.margin,padding:"0",onSubmit:i[0]||(i[0]=r=>o.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),Nw=["onClick"],$w=z(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,""))),d=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(o.tabHeight.replace(/[^+\d]/g,""))};e.onMounted(()=>window.addEventListener("resize",d)),e.onUnmounted(()=>window.removeEventListener("resize",d));const c=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,(h,w)=>(e.openBlock(),e.createElementBlock("div",{key:w},[e.createElementVNode("div",{class:e.normalizeClass({"selected-tab":w===n.menus.idx,tab:w!==n.menus.idx}),style:e.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:y=>u(w)},e.toDisplayString(h.name),15,Nw)]))),128))],4),e.createElementVNode("div",{class:"body-container",style:e.normalizeStyle({background:n.background,height:e.unref(c)})},[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"]]),Vw={class:"field"},Pw=z(e.defineComponent({__name:"PNameEdit",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(!1),s=e.ref(),a=e.ref(o.withName.name),d=e.ref(!1),c=()=>{d.value=!1},u=async()=>{a.value.trim(),o.withName.setName&&o.withName.setName(a.value),r.value=!r.value,i("submit")};return(f,m)=>{const h=e.resolveComponent("PString"),w=e.resolveComponent("PInput"),y=e.resolveComponent("InfoItem"),S=e.resolveComponent("PButton"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(B,{ref_key:"form",ref:s,style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(y,{title:"Название","show-save-dialog":d.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:c},{"open-inside-content":e.withCtx(()=>[e.createVNode(y,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:e.withCtx(()=>[e.createElementVNode("div",Vw,[e.createVNode(w,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=E=>a.value=E),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])])]),_:1}),e.createVNode(S,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:e.withCtx(()=>[a.value.length?(e.openBlock(),e.createBlock(h,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(e.openBlock(),e.createBlock(h,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-4f7966cb"]]),Tw=["id"],Iw=["for"],Mw={class:"left-field"},Rw=["href","download"],Dw={key:1,class:"text-field__input"},zw={class:"right-field"},Aw=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Ze},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=He.GUID(),s=He.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!c(f.name)){Bn.Error(`Загруженный файл должен быть в одном из форматов: ${o.formats.join(", ")}`);return}const m=new Ze;m.setFile(f),m.url=URL.createObjectURL(f),i("upload",m)},d=()=>{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 c=u=>{let f=aa.Get(u);return!!o.formats.includes(f.toLowerCase())};return(u,f)=>{const m=e.resolveComponent("PString"),h=e.resolveComponent("PFlex"),w=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,Tw),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,Iw)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",Mw,[e.createVNode(h,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,Rw),e.createVNode(w,{skin:"text",type:"del",onClick:d},{default:e.withCtx(()=>[e.createVNode(ll,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",Dw,[e.createVNode(m,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",zw,[e.createVNode(w,{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)}}}),_w=z(Aw,[["__scopeId","data-v-8b73ee22"]]);function hl(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 ce(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?hl(Object(o),!0).forEach(function(i){ht(n,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):hl(Object(o)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(o,i))})}return n}function ht(n,t,o){return t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function Fw(n,t){if(n==null)return{};var o,i,r=function(a,d){if(a==null)return{};var c,u,f={},m=Object.keys(a);for(u=0;u<m.length;u++)c=m[u],d.indexOf(c)>=0||(f[c]=a[c]);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 yn(n){return function(t){if(Array.isArray(t))return Ir(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 Ir(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 Ir(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 Ir(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 pl,Ow,di,Ie=(pl=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 i(){for(var o=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")o.push(s);else if(Array.isArray(s)){if(s.length){var d=i.apply(null,s);d&&o.push(d)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var c in s)t.call(s,c)&&s[c]&&o.push(c);else o.push(s.toString())}}return o.join(" ")}n.exports?(i.default=i,n.exports=i):window.classNames=i})()},rl(ao={path:xw,exports:{},require:function(n,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&ao.path)}},ao.exports),ao.exports),St=function(n){return function(t,i){if(!t)return n;var o;typeof t=="string"?o=t:i=t;var r=n;return o&&(r+="__"+o),r+(i?Object.keys(i).reduce(function(s,a){var d=i[a];return d&&(s+=" "+(typeof d=="boolean"?r+"--"+a:r+"--"+a+"_"+d)),s},""):"")}};function Cr(n,t,i){var o,r,s,a,d;function c(){var f=Date.now()-a;f<t&&f>=0?o=setTimeout(c,t-f):(o=null,i||(d=n.apply(s,r),s=r=null))}t==null&&(t=100);var u=function(){s=this,r=arguments,a=Date.now();var f=i&&!o;return o||(o=setTimeout(c,t)),f&&(d=n.apply(s,r),s=r=null),d};return u.clear=function(){o&&(clearTimeout(o),o=null)},u.flush=function(){o&&(d=n.apply(s,r),s=r=null,clearTimeout(o),o=null)},u}Cr.debounce=Cr;var kr=Cr,Y=function(){return Y=Object.assign||function(n){for(var t,i=1,o=arguments.length;i<o;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},Y.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 d=o.apply(null,s);d&&i.push(d)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var c in s)t.call(s,c)&&s[c]&&i.push(c);else i.push(s.toString())}}return i.join(" ")}n.exports?(o.default=o,n.exports=o):window.classNames=o})()},pl(di={path:Ow,exports:{},require:function(n,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&di.path)}},di.exports),di.exports),St=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 d=o[a];return d&&(s+=" "+(typeof d=="boolean"?r+"--"+a:r+"--"+a+"_"+d)),s},""):"")}};function Mr(n,t,o){var i,r,s,a,d;function c(){var f=Date.now()-a;f<t&&f>=0?i=setTimeout(c,t-f):(i=null,o||(d=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(c,t)),f&&(d=n.apply(s,r),s=r=null),d};return u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(d=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},u}Mr.debounce=Mr;var Rr=Mr,Y=function(){return Y=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},Y.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 sl(n,t){var i,o;return n&&t?(i=""+n+t[0].toUpperCase()+t.slice(1),o=n+"-"+t):(i=n||t,o=n||t),{name:i,classname:o}}function al(n){return/^blob:/.test(n)}function ll(n){return al(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 lo(n){return typeof n=="object"&&n!==null}function xr(n,t,i){var o={};return lo(n)?(Object.keys(t).forEach(function(r){ze(n[r])?o[r]=t[r]:lo(t[r])?lo(n[r])?o[r]=xr(n[r],t[r],i[r]):o[r]=n[r]?t[r]:i[r]:t[r]===!0||t[r]===!1?o[r]=!!n[r]:o[r]=n[r]}),o):n?t:i}function co(n){var t=Number(n);return Number.isNaN(t)?n:t}function cl(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!dl(n)}function dl(n){return n!=n}function ul(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var yi=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},Ew=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},Er=function(n){this.type="move",this.directions=n},Bw=function(){function n(t,i,o,r,s){this.type="drag",this.nativeEvent=t,this.position=o,this.previousPosition=r,this.element=i,this.anchor=s}return n.prototype.shift=function(){var t=this,i=t.element,o=t.anchor,r=t.position;if(i){var s=i.getBoundingClientRect(),a=s.left,d=s.top;return{left:r.left-a-o.left,top:r.top-d-o.top}}return{left:0,top:0}},n}(),Br={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=yn(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(t,i){return{clientX:t.clientX+i.clientX/n.touches.length,clientY:t.clientY+i.clientY/n.touches.length}},{clientX:0,clientY:0})),n.preventDefault&&n.preventDefault(),n.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(n){this.touches.length&&(this.processMove(n,n.touches),n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation())},onMouseDown:function(n){if(!this.disabled){var 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(),i=t.left,o=t.right,r=t.bottom,s=t.top;this.anchor={left:n.clientX-i,top:n.clientY-s,bottom:r-n.clientY,right:o-n.clientX}},processMove:function(n,t){var i=yn(t);if(this.touches.length){if(this.touches.length===1&&i.length===1){var o=this.$refs.draggable;this.$emit("drag",new Bw(n,o,{left:i[0].clientX,top:i[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=i}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};Br.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"draggable",class:i.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 Nr=St("vue-handler-wrapper"),fl={name:"HandlerWrapper",components:{DraggableElement:Br},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var n;if(this.horizontalPosition||this.verticalPosition){var t,i=sl(this.horizontalPosition,this.verticalPosition);n=Nr((ht(t={},i.classname,!0),ht(t,"disabled",this.disabled),t))}else n=Nr({disabled:this.disabled});return{root:n,draggable:Nr("draggable")}}},emits:["leave","enter","drag","drag-end"]};fl.render=function(n,t,i,o,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(d){return n.$emit("drag",d)}),onDragEnd:t[2]||(t[2]=function(d){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(d){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(d){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var Nw=St("vue-line-wrapper"),ml={name:"LineWrapper",components:{DraggableElement:Br},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return Nw((ht(n={},this.position,!0),ht(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};ml.render=function(n,t,i,o,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock(a,{class:s.classname,onDrag:t[1]||(t[1]=function(d){return n.$emit("drag",d)}),onDragEnd:t[2]||(t[2]=function(d){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(d){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(d){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var Vt=["left","right","top","bottom"],$w=["left","right"],Vw=["top","bottom"],Iw=["left","top"],Mw=["fill-area","fit-area","stencil","none"],hl={left:0,top:0,width:0,height:0};function pl(n,t,i){return!(i=i||["width","height","left","top"]).some(function(o){return n[o]!==t[o]})}function It(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 Ue(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function wi(n,t){var i={left:0,top:0,right:0,bottom:0};return Vt.forEach(function(o){var r=t[o],s=It(n)[o];i[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),i}function Mt(n,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 uo(n){return{left:-n.left,top:-n.top}}function tt(n,t){return Y(Y({},n),{left:n.left+t.left,top:n.top+t.top})}function pt(n,t,i,o){if(t!==1){if(i){var r=Ue(n);return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2+(i.left-r.left)*(1-t),top:n.top+n.height*(1-t)/2+(i.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 de(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 i={left:0,top:0},o=wi(n,t);return o.left&&o.left>0?i.left=o.left:o.right&&o.right>0&&(i.left=-o.right),o.top&&o.top>0?i.top=o.top:o.bottom&&o.bottom>0&&(i.top=-o.bottom),i}function $r(n,t){var i;return t.minimum&&n<t.minimum?i=t.minimum:t.maximum&&n>t.maximum&&(i=t.maximum),i}function gl(n,t){var i=de(n),o=de(t);return t.width<1/0&&t.height<1/0?i>o?{width:t.width,height:t.width/i}:{width:t.height*i,height:t.height}:t.width<1/0?{width:t.width,height:t.width/i}:t.height<1/0?{width:t.height*i,height:t.height}:n}function yl(n,t){var i=t*Math.PI/180;return{width:Math.abs(n.width*Math.cos(i))+Math.abs(n.height*Math.sin(i)),height:Math.abs(n.width*Math.sin(i))+Math.abs(n.height*Math.cos(i))}}function Xt(n,t){var i=t*Math.PI/180;return{left:n.left*Math.cos(i)-n.top*Math.sin(i),top:n.left*Math.sin(i)+n.top*Math.cos(i)}}function fo(n,t){var i=wi(qe(n,t),t);return i.left+i.right+i.top+i.bottom?i.left+i.right>i.top+i.bottom?Math.min((n.width+i.left+i.right)/n.width,qn(n,t)):Math.min((n.height+i.top+i.bottom)/n.height,qn(n,t)):1}function qe(n,t,i){i===void 0&&(i=!1);var o=jn(n,t);return tt(n,i?uo(o):o)}function Vr(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 Pw(n,t){return Y(Y({},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 wl(n,t,i){i===void 0&&(i=!0);var o={};return Vt.forEach(function(r){var s=n[r],a=t[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?i?Math.max(s,a):Math.min(s,a):i?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function mo(n,t){return wl(n,t,!0)}function bl(n){var t=n.size,i=n.aspectRatio,o=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||de(t)>=i.minimum&&de(t)<=i.maximum)&&t.height<=r.maxHeight&&t.width<=r.maxWidth&&t.width&&t.height&&(o||t.height>=r.minHeight&&t.width>=r.minWidth))}function Sl(n,t){return Math.pow(n.width-t.width,2)+Math.pow(n.height-t.height,2)}function Ot(n){var t=n.width,i=n.height,o=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,t)),height:Math.max(o.minHeight,Math.min(o.maxHeight,i))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(m,h){return bl({size:h,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:f})&&(!m||Sl(h,{width:t,height:i})<Sl(m,{width:t,height:i}))?h:m},null)}var d=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&d.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),bl({size:s,aspectRatio:r,sizeRestrictions:o})&&d.push(s);var c=a(d)||a(d,!0);return c&&{width:c.width,height:c.height}}function Ir(n){var t=n.event,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=tt(i,t.directions);return tt(s,jn(s,r))}function Tw(n){var t=n.coordinates,i=n.transform,o=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,d=n.visibleArea,c=function(f,m){return Ir({coordinates:f,positionRestrictions:s,event:new Er({left:m.left-f.left,top:m.top-f.top})})},u=Y({},t);return(Array.isArray(i)?i:[i]).forEach(function(f){var m={};ze((m=typeof f=="function"?f({coordinates:u,imageSize:o,visibleArea:d}):f).width)&&ze(m.height)||(u=function(h,w){var y=Y(Y(Y({},h),Ot({width:w.width,height:w.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return c(y,{left:h.left,top:h.top})}(u,Y(Y({},u),m))),ze(m.left)&&ze(m.top)||(u=c(u,Y(Y({},u),m)))}),u}function Rw(n){n.event;var t=n.getAreaRestrictions,i=n.boundaries,o=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,d=n.positionRestrictions;n.stencilReference;var c,u,f,m=Y({},o),h=Y({},r),w=Y({},s);c=de(w),u=de(m),f===void 0&&(f=.001),(c===0||u===0?Math.abs(u-c)<f:Math.abs(u/c)<1+f&&Math.abs(u/c)>1-f)||(m=Y(Y({},m),Ot({sizeRestrictions:a,width:m.width,height:m.height,aspectRatio:{minimum:de(w),maximum:de(w)}})));var y=fo(h=pt(h,m.width*i.width/(h.width*w.width)),t({visibleArea:h,type:"resize"}));return y!==1&&(h=pt(h,y),m=pt(m,y)),h=qe(h=tt(h,Un(Ue(m),Ue(h))),t({visibleArea:h,type:"move"})),{coordinates:m=qe(m,mo(It(h),d)),visibleArea:h}}function Dw(n){var t=n.event,i=n.getAreaRestrictions,o=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var d=Y({},r),c=Y({},s);if(r&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};c.width,o.width,de(o)>de(d)?(u.height=.8*o.height,u.width=u.height*de(d)):(u.width=.8*o.width,u.height=u.width*de(d));var f=fo(c=pt(c,d.width*o.width/(c.width*u.width)),i({visibleArea:c,type:"resize"}));c=pt(c,f),f!==1&&(u.height/=f,u.width/=f),c=qe(c=tt(c,Un(Ue(d),Ue(c))),i({visibleArea:c,type:"move"})),d=qe(d,mo(It(c),a))}return{coordinates:d,visibleArea:c}}function Aw(n){var t=n.event,i=n.coordinates,o=n.visibleArea,r=n.getAreaRestrictions,s=Y({},o),a=Y({},i);if(t.type==="setCoordinates"){var d=Math.max(0,a.width-s.width),c=Math.max(0,a.height-s.height);d>c?s=pt(s,Math.min(a.width/s.width,qn(s,r({visibleArea:s,type:"resize"})))):c>d&&(s=pt(s,Math.min(a.height/s.height,qn(s,r({visibleArea:s,type:"resize"}))))),s=qe(s=tt(s,uo(jn(a,It(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function zw(n){var t=n.imageSize,i=n.visibleArea,o=n.coordinates,r=i||t;return{left:(i?i.left:0)+r.width/2-o.width/2,top:(i?i.top:0)+r.height/2-o.height/2}}function _w(n){var t=n.imageSize,i=n.visibleArea,o=n.aspectRatio,r=n.sizeRestrictions,s=i||t,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,de(s))),d=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Ot(Y(Y({},d),{aspectRatio:o,sizeRestrictions:r}))}function Fw(n){var t,i,o=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,d=n.sizeRestrictions,c=n.stencilSize,u=r||o;return de(u)>de(s)?i=(t=c.height*u.height/s.height)*de(c):t=(i=c.width*u.width/s.width)/de(c),Ot({width:i,height:t,aspectRatio:a,sizeRestrictions:d})}function Ow(n){var t=n.getAreaRestrictions,i=n.coordinates,o=n.imageSize,r=de(n.boundaries);if(i){var s={height:Math.max(i.height,o.height),width:Math.max(i.width,o.width)},a=gl({width:de(s)>r?s.width:s.height*r,height:de(s)>r?s.width/r:s.height},Vr(t())),d={left:i.left+i.width/2-a.width/2,top:i.top+i.height/2-a.height/2,width:a.width,height:a.height},c=wi(i,It(Y({left:0,top:0},o))),u={};return!c.left&&!c.right&&d.width<=o.width&&(u.left=0,u.right=o.width),!c.top&&!c.bottom&&d.height<=o.height&&(u.top=0,u.bottom=o.height),qe(d,u)}var f=de(o);return a={height:f>r?o.height:o.width/r,width:f>r?o.height*r:o.width},{left:o.width/2-a.width/2,top:o.height/2-a.height/2,width:a.width,height:a.height}}function ho(n,t){return wl(n,It(t))}function Lw(n){var t=n.event,i=n.coordinates,o=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,d=n.adjustStencil,c=t.scale,u=t.move,f=Y({},o),m=Y({},i),h=1,w=1,y=c.factor&&Math.abs(c.factor-1)>.001;f=tt(f,{left:u.left||0,top:u.top||0});var S={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"}))}};c.factor&&y&&(c.factor<1?(w=Math.max(c.factor,S.stencil.minimum))>1&&(w=1):c.factor>1&&(w=Math.min(c.factor,Math.min(S.area.maximum,S.stencil.maximum)))<1&&(w=1)),w&&(f=pt(f,w,c.center));var E=i.left-o.left,x=o.width+o.left-(i.width+i.left),V=i.top-o.top,k=o.height+o.top-(i.height+i.top);return f=qe(f=tt(f,jn(f,{left:a.left!==void 0?a.left-E*w:void 0,top:a.top!==void 0?a.top-V*w:void 0,bottom:a.bottom!==void 0?a.bottom+k*w:void 0,right:a.right!==void 0?a.right+x*w:void 0})),s({visibleArea:f,type:"move"})),m.width=m.width*w,m.height=m.height*w,m.left=f.left+E*w,m.top=f.top+V*w,m=qe(m,mo(It(f),a)),c.factor&&y&&d&&(c.factor>1?h=Math.min(S.area.maximum,c.factor)/w:c.factor<1&&(h=Math.max(m.height/f.height,m.width/f.width,c.factor/w)),h!==1&&(f=tt(f=qe(f=pt(f,h,c.factor>1?c.center:Ue(m)),s({visibleArea:f,type:"move"})),uo(jn(m,It(f)))))),{coordinates:m,visibleArea:f}}function vw(n){var t=n.aspectRatio,i=n.getAreaRestrictions,o=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,d=n.imageSize,c=n.previousImageSize,u=n.angle,f=Y({},o),m=Y({},r),h=Xt(Ue(Y({left:0,top:0},c)),u);return(f=Y(Y({},Ot({sizeRestrictions:s,aspectRatio:t,width:f.width,height:f.height})),Xt(Ue(f),u))).left-=h.left-d.width/2+f.width/2,f.top-=h.top-d.height/2+f.height/2,m=pt(m,fo(m,i({visibleArea:m,type:"resize"}))),{coordinates:f=qe(f,a),visibleArea:m=qe(m=tt(m,Un(Ue(f),Ue(o))),i({visibleArea:m,type:"move"}))}}function Hw(n){var t=n.flip,i=n.previousFlip,o=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,d=n.imageSize,c=Y({},s),u=Y({},a),f=i.horizontal!==t.horizontal,m=i.vertical!==t.vertical;if(f||m){var h=Xt({left:d.width/2,top:d.height/2},-o),w=Xt(Ue(c),-o),y=Xt({left:f?h.left-(w.left-h.left):w.left,top:m?h.top-(w.top-h.top):w.top},o);c=tt(c,Un(y,Ue(c))),w=Xt(Ue(u),-o),u=qe(u=tt(u,Un(y=Xt({left:f?h.left-(w.left-h.left):w.left,top:m?h.top-(w.top-h.top):w.top},o),Ue(u))),r({visibleArea:u,type:"move"}))}return{coordinates:c,visibleArea:u}}function Cl(n){var t=n.directions,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=n.sizeRestrictions,a=n.preserveRatio,d=n.compensate,c=Y({},t),u=Mt(i,c).width,f=Mt(i,c).height;u<0&&(c.left<0&&c.right<0?(c.left=-(i.width-s.minWidth)/(c.left/c.right),c.right=-(i.width-s.minWidth)/(c.right/c.left)):c.left<0?c.left=-(i.width-s.minWidth):c.right<0&&(c.right=-(i.width-s.minWidth))),f<0&&(c.top<0&&c.bottom<0?(c.top=-(i.height-s.minHeight)/(c.top/c.bottom),c.bottom=-(i.height-s.minHeight)/(c.bottom/c.top)):c.top<0?c.top=-(i.height-s.minHeight):c.bottom<0&&(c.bottom=-(i.height-s.minHeight)));var m=wi(Mt(i,c),r);d&&(m.left&&m.left>0&&m.right===0?(c.right+=m.left,c.left-=m.left):m.right&&m.right>0&&m.left===0&&(c.left+=m.right,c.right-=m.right),m.top&&m.top>0&&m.bottom===0?(c.bottom+=m.top,c.top-=m.top):m.bottom&&m.bottom>0&&m.top===0&&(c.top+=m.bottom,c.bottom-=m.bottom),m=wi(Mt(i,c),r));var h={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Vt.forEach(function(S){var E=m[S];E&&c[S]&&(h[S]=Math.max(0,1-E/c[S]))}),a){var w=Math.min.apply(null,Vt.map(function(S){return h[S]}));w!==1/0&&Vt.forEach(function(S){c[S]*=w})}else Vt.forEach(function(S){h[S]!==1/0&&(c[S]*=h[S])});if(u=Mt(i,c).width,f=Mt(i,c).height,c.right+c.left&&(u>s.maxWidth?h.width=(s.maxWidth-i.width)/(c.right+c.left):u<s.minWidth&&(h.width=(s.minWidth-i.width)/(c.right+c.left))),c.bottom+c.top&&(f>s.maxHeight?h.height=(s.maxHeight-i.height)/(c.bottom+c.top):f<s.minHeight&&(h.height=(s.minHeight-i.height)/(c.bottom+c.top))),a){var y=Math.min(h.width,h.height);y!==1/0&&Vt.forEach(function(S){c[S]*=y})}else h.width!==1/0&&$w.forEach(function(S){c[S]*=h.width}),h.height!==1/0&&Vw.forEach(function(S){c[S]*=h.height});return c}function po(n,t,i){return t==0&&i==0?n/2:t==0?0:i==0?n:n*Math.abs(t/(t+i))}var Uw=St("vue-simple-handler"),qw=St("vue-simple-handler-wrapper"),Mr={name:"SimpleHandler",components:{HandlerWrapper:fl},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=(ht(n={},this.horizontalPosition,!!this.horizontalPosition),ht(n,this.verticalPosition,!!this.verticalPosition),ht(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),ht(n,"hover",this.hover),n);return{default:Pe(Uw(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Pe(qw(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"]};Mr.render=function(n,t,i,o,r,s){var a=e.resolveComponent("HandlerWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,"vertical-position":i.verticalPosition,"horizontal-position":i.horizontalPosition,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default: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 jw=St("vue-simple-line"),Ww=St("vue-simple-line-wrapper"),Pr={name:"SimpleLine",components:{LineWrapper:ml},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:Pe(jw(ht({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Pe(Ww(ht({},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"]};Pr.render=function(n,t,i,o,r,s){var a=e.resolveComponent("LineWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,position:i.position,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Tr=St("vue-bounding-box"),Gw=["east","west",null],Qw=["south","north",null],kl={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 Mr}},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 Pr}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return Gw.forEach(function(t){Qw.forEach(function(i){if(t!==i){var o=sl(t,i),r=o.name,s=o.classname;n.push({name:r,classname:s,verticalDirection:i,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,i=this.linesClasses,o=this.linesWrappersClasses;return{root:Tr(),handlers:n,handlersWrappers:t,lines:i,linesWrappers:o}},lineNodes:function(){var n=this,t=[];return this.points.forEach(function(i){i.horizontalDirection&&i.verticalDirection||!n.lines[i.name]||t.push({name:i.name,component:n.linesComponent,class:Pe(n.classes.lines.default,n.classes.lines[i.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Pe(n.classes.linesWrappers.default,n.classes.linesWrappers[i.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:i.verticalDirection,horizontalDirection:i.horizontalDirection,disabled:!n.resizable})}),t},handlerNodes:function(){var n=this,t=[],i=this.width,o=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class:Pe(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Pe(n.classes.handlersWrappers.default,n.classes.handlersWrappers[r.name]),hoverClass:n.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!n.resizable};if(i&&o){var a=r.horizontalDirection,d=r.verticalDirection,c=a==="east"?i:a==="west"?0:i/2,u=d==="south"?o:d==="north"?0:o/2;s.wrapperClass=Tr("handler"),s.wrapperStyle={transform:"translate(".concat(c,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=Tr("handler",ht({},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,i){var o,r=n.shift(),s=r.left,a=r.top,d={left:0,right:0,top:0,bottom:0};t==="west"?d.left-=s:t==="east"&&(d.right+=s),i==="north"?d.top-=a:i==="south"&&(d.bottom+=a),!i&&t?o="width":i&&!t&&(o="height"),this.resizable&&this.$emit("resize",new Ew(d,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:i==="south"||!i,top:i==="north"||!i},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};kl.render=function(n,t,i,o,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(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[1]||(t[1]=function(d){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(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[2]||(t[2]=function(d){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var Yw=St("vue-draggable-area"),xl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:Yw()}}},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=yn(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()):ul({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(),i=t.left,o=t.top;this.anchor={x:n.clientX-i,y:n.clientY-o}},processMove:function(n,t){var i=yn(t);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&i.length===1&&this.$emit("move",new Er({left:i[0].clientX-(r+this.anchor.x),top:i[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};xl.render=function(n,t,i,o,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 Rr(n){var t,i;return{rotate:n.rotate||0,flip:{horizontal:((t=n==null?void 0:n.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((i=n==null?void 0:n.flip)===null||i===void 0?void 0:i.vertical)||!1}}}function Xw(n){return new Promise(function(t,i){try{if(n)if(/^data:/i.test(n))t(function(c){c=c.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(c),f=u.length,m=new ArrayBuffer(f),h=new Uint8Array(m),w=0;w<f;w++)h[w]=u.charCodeAt(w);return m}(n));else if(/^blob:/i.test(n)){var o=new FileReader;o.onload=function(c){t(c.target.result)},s=n,a=function(c){o.readAsArrayBuffer(c)},(d=new XMLHttpRequest).open("GET",s,!0),d.responseType="blob",d.onload=function(){this.status!=200&&this.status!==0||a(this.response)},d.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?t(r.response):i("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",n,!0),r.responseType="arraybuffer",r.send(null)}else i("Error: the image is empty")}catch(c){i(c)}var s,a,d})}function El(n){var t=n.rotate,i=n.flip,o=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+t+"deg) ",s+=" scaleX("+o*(i.horizontal?-1:1)+") ",s+=" scaleY("+r*(i.vertical?-1:1)+") "}function Zw(n){try{var t,i=new DataView(n),o=void 0,r=void 0,s=void 0,a=void 0;if(i.getUint8(0)===255&&i.getUint8(1)===216)for(var d=i.byteLength,c=2;c+1<d;){if(i.getUint8(c)===255&&i.getUint8(c+1)===225){s=c;break}c++}if(s&&(o=s+10,function(w,y,S){var E,x="";for(E=y,S+=y;E<S;E++)x+=String.fromCharCode(w.getUint8(E));return x}(i,s+4,4)==="Exif")){var u=i.getUint16(o);if(((r=u===18761)||u===19789)&&i.getUint16(o+2,r)===42){var f=i.getUint32(o+4,r);f>=8&&(a=o+f)}}if(a){for(var m=i.getUint16(a,r),h=0;h<m;h++)if(c=a+12*h+2,i.getUint16(c,r)===274){c+=8,t=i.getUint16(c,r),i.setUint16(c,1,r);break}}return t}catch{return null}}function Bl(n,t){var i=t.getBoundingClientRect(),o=i.left,r=i.top,s={left:0,top:0},a=0;return n.forEach(function(d){s.left+=(d.clientX-o)/n.length,s.top+=(d.clientY-r)/n.length}),n.forEach(function(d){a+=ul({x:s.left,y:s.top},{x:d.clientX-o,y:d.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var Nl={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=kr(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 yi({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 i=Bl(t,this.$refs.container),o=this.oldGeometricProperties;o.count===i.count&&o.count>1&&this.$emit("resize",new yi({left:o.centerMass.left-i.centerMass.left,top:o.centerMass.top-i.centerMass.top},{factor:o.spread/i.spread,center:i.centerMass})),this.oldGeometricProperties=i}this.touches=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,i=t.getBoundingClientRect(),o=i.left,r=i.top,s=i.bottom,a=i.right;this.touches=yn(n.touches).filter(function(d){return d.clientX>o&&d.clientX<a&&d.clientY>r&&d.clientY<s}),this.oldGeometricProperties=Bl(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 i=yn(n.touches).filter(function(o){return!o.identifier||t.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(n)&&(this.processMove(n,i),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var 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(),i=t.left,o=t.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(d=+a)==0||dl(d)?d:d>0?1:-1),s={left:n.clientX-i,top:n.clientY-o};this.$emit("resize",new yi({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,d}},emits:["resize","move","transform-end"]};Nl.render=function(n,t,i,o,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 Dr={components:{TransformableImage:Nl},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"]};Dr.render=function(n,t,i,o,r,s){var a=e.resolveComponent("transformable-image");return e.openBlock(),e.createBlock(a,{"touch-move":i.touchMove,"touch-resize":i.touchResize,"mouse-move":i.mouseMove,"wheel-resize":i.wheelResize,onMove:t[1]||(t[1]=function(d){return n.$emit("move",d)}),onResize:t[2]||(t[2]=function(d){return n.$emit("resize",d)})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var go=St("vue-preview"),$l={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:go({fill:this.fill}),wrapper:go("wrapper"),imageWrapper:go("image-wrapper"),image:Pe(go("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=ce(ce({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),i=this.imageSize.width,o=this.imageSize.height,r=yl({width:i,height:o},t.rotate),s={width:"".concat(i,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(i-r.width)*t.scaleX/2,top:(o-r.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*i/2,top:(1-t.scaleY)*o/2}};return s.transform=`translate(
44
- `.concat(-this.coordinates.left/n-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/n-a.rotate.top-a.scale.top,"px) ")+El(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()}}};$l.render=function(n,t,i,o,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:i.image&&i.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[e.vShow,i.image&&i.image.src]])],6)],6)};var Vl={components:{Preview:$l},inheritAttrs:!1};Vl.render=function(n,t,i,o,r,s){var a=e.resolveComponent("preview");return e.openBlock(),e.createBlock(a,e.mergeProps(n.$attrs,{fill:!0}),null,16)};var Ar=St("vue-rectangle-stencil"),Il={name:"RectangleStencil",components:{StencilPreview:Vl,BoundingBox:kl,DraggableArea:xl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Mr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Pr}},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:Pe(Ar({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Pe(Ar("preview"),this.previewClass),boundingBox:Pe(Ar("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,t=n.height,i=n.width,o=n.left,r=n.top,s={width:"".concat(i,"px"),height:"".concat(t,"px"),transform:"translate(".concat(o,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(n){this.$emit("move",n),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(n){this.$emit("resize",n),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};Il.render=function(n,t,i,o,r,s){var a=e.resolveComponent("stencil-preview"),d=e.resolveComponent("draggable-area"),c=e.resolveComponent("bounding-box");return e.openBlock(),e.createBlock("div",{class:s.classes.stencil,style:s.style},[e.createVNode(c,{width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,transitions:i.transitions,class:s.classes.boundingBox,handlers:i.handlers,"handlers-component":i.handlersComponent,"handlers-classes":i.handlersClasses,"handlers-wrappers-classes":i.handlersWrappersClasses,lines:i.lines,"lines-component":i.linesComponent,"lines-classes":i.linesClasses,"lines-wrappers-classes":i.linesWrappersClasses,resizable:i.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:e.withCtx(function(){return[e.createVNode(d,{movable:i.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:e.withCtx(function(){return[e.createVNode(a,{image:i.image,coordinates:i.coordinates,width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,class:s.classes.preview,transitions:i.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var Jw=["transitions"],Lt=St("vue-advanced-cropper"),Ml={name:"Cropper",components:{BackgroundWrapper:Dr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return Il}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Dr}},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 Mw.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,i=n.coordinates,o=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=Y(Y({},i),{right:i.left+i.width,bottom:i.top+i.height}),d=t.params||{},c=Y({},t.directions),u=d.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(c.left=0,c.right=0),s.heightFrozen&&(c.top=0,c.bottom=0),Vt.forEach(function(T){u[T]||(c[T]=0)});var f=Mt(a,c=Cl({coordinates:a,directions:c,sizeRestrictions:s,positionRestrictions:r})).width,m=Mt(a,c).height,h=d.preserveRatio?de(a):$r(f/m,o);if(h){var w=d.respectDirection;if(w||(w=a.width>=a.height||h===1?"width":"height"),w==="width"){var y=f/h-a.height;if(u.top&&u.bottom){var S=c.top,E=c.bottom;c.bottom=po(y,E,S),c.top=po(y,S,E)}else u.bottom?c.bottom=y:u.top?c.top=y:u.right?c.right=0:u.left&&(c.left=0)}else if(w==="height"){var x=a.width-m*h;if(u.left&&u.right){var V=c.left,k=c.right;c.left=-po(x,V,k),c.right=-po(x,k,V)}else u.left?c.left=-x:u.right?c.right=-x:u.top?c.top=0:u.bottom&&(c.bottom=0)}c=Cl({directions:c,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:d.compensate})}return f=Mt(a,c).width,m=Mt(a,c).height,(h=d.preserveRatio?de(a):$r(f/m,o))&&Math.abs(h-f/m)>.001&&Vt.forEach(function(T){u[T]||(c[T]=0)}),Ir({event:new Er({left:-c.left,top:-c.top}),coordinates:{width:i.width+c.right+c.left,height:i.height+c.top+c.bottom,left:i.left,top:i.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Ir},initStretcher:{type:Function,default:function(n){var t=n.stretcher,i=n.imageSize,o=de(i);t.style.width=i.width+"px",t.style.height=t.clientWidth/o+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var t=n.visibleArea,i=n.coordinates,o=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=Y(Y({},i),Ot({width:i.width,height:i.height,aspectRatio:o,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=tt(a,Un(Ue(i),Ue(a))),mo(It(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,i=n.boundaries,o=n.getAreaRestrictions,r=n.coordinates,s=Y({},t);s.height=s.width/de(i),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=pt(s,Math.max(r.height/s.height,r.width/s.width)));var a=uo(jn(r,It(s=pt(s,fo(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=qe(s=tt(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.visibleArea,i=n.boundaries,o=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(de(i)>de(o)?(a={top:0,bottom:o.height},t&&s==="move"&&(t.width>o.width?(a.left=-(t.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},t&&s==="move"&&(t.height>o.height?(a.top=-(t.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(n){return{minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.imageSize,i={};return n.imageRestriction!=="none"&&(i={left:0,top:0,right:t.width,bottom:t.height}),i}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:ce({},hl)}},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=xr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:xr(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:co(this.minWidth),minHeight:ze(this.minHeight)?0:co(this.minHeight),maxWidth:ze(this.maxWidth)?1/0:co(this.maxWidth),maxHeight:ze(this.maxHeight)?1/0:co(this.maxHeight)});if(n=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,d=o.positionRestrictions,c=Y(Y({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});d.left!==void 0&&d.right!==void 0&&(c.maxWidth=Math.min(c.maxWidth,d.right-d.left)),d.bottom!==void 0&&d.top!==void 0&&(c.maxHeight=Math.min(c.maxHeight,d.bottom-d.top));var u=Vr(r),f=gl(a,u);return u.width<1/0&&(!c.maxWidth||c.maxWidth>f.width)&&(c.maxWidth=Math.min(c.maxWidth,f.width)),u.height<1/0&&(!c.maxHeight||c.maxHeight>f.height)&&(c.maxHeight=Math.min(c.maxHeight,f.height)),c.minWidth>c.maxWidth&&(c.minWidth=c.maxWidth,c.widthFrozen=!0),c.minHeight>c.maxHeight&&(c.minHeight=c.maxHeight,c.heightFrozen=!0),c}({sizeRestrictions:n,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var t=this.getStencilSize(),i=Vr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,i.width*t.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,i.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:Pe(Lt("image"),this.imageClass),stencil:Lt("stencil"),boundaries:Pe(Lt("boundaries"),this.boundariesClass),stretcher:Pe(Lt("stretcher")),background:Pe(Lt("background"),this.backgroundClass),foreground:Pe(Lt("foreground"),this.foregroundClass),imageWrapper:Pe(Lt("image-wrapper")),cropperWrapper:Pe(Lt("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,t=n.width,i=n.height,o=n.left,r=n.top;return{width:t/this.coefficient,height:i/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var n={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(n.opacity="0"),n},imageStyle:function(){var n=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},t={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},i={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},o=ce(ce({},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-i.left-this.imageTransforms.translateX,"px, ").concat(-t.top-i.top-this.imageTransforms.translateY,"px)")+El(o)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var n=this;this.$nextTick(function(){n.resetCoordinates(),n.runAutoZoom("setCoordinates"),n.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(n,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(i){return n[i]!==t[i]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=kr(this.update,this.debounce),this.debouncedDisableTransitions=kr(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(ce({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:ce({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var i=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ce({},this.visibleArea):null,imageTransforms:t,get canvas(){return i.canvas?i.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ce({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new yi({},{factor:1/n,center:t}),{normalize:!1,transitions:r})},move:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new yi({left:n||0,top:t||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.autoZoom,r=o===void 0||o,s=i.transitions,a=s===void 0||s;this.$nextTick(function(){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 i=t.coordinates,o=t.sizeRestrictions,r=t.positionRestrictions,s={width:Math.round(i.width),height:Math.round(i.height),left:Math.round(i.left),top:Math.round(i.top)};return s.width>o.maxWidth?s.width=Math.floor(i.width):s.width<o.minWidth&&(s.width=Math.ceil(i.width)),s.height>o.maxHeight?s.height=Math.floor(i.height):s.height<o.minHeight&&(s.height=Math.ceil(i.height)),qe(s,r)}(ce(ce({},this.getPublicProperties()),{},{positionRestrictions:ho(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,i,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?Rw:this.autoZoom?Dw:Aw);var s=r({event:{type:n,params:o},visibleArea:t,coordinates:i,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return ce(ce({},s),{},{changed:!pl(s.visibleArea,t)||!pl(s.coordinates,i)})},runAutoZoom:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.transitions,o=i!==void 0&&i,r=kw(t,Jw),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,d=s.coordinates,c=s.changed;o&&c&&this.enableTransitions(),this.visibleArea=a,this.coordinates=d,o&&c&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(t){var i=t.event,o=t.visibleArea,r=t.coefficient;if(i.type==="manipulateImage")return Y(Y({},i),{move:{left:i.move&&i.move.left?r*i.move.left:0,top:i.move&&i.move.top?r*i.move.top:0},scale:{factor:i.scale&&i.scale.factor?i.scale.factor:1,center:i.scale&&i.scale.center?{left:i.scale.center.left*r+o.left,top:i.scale.center.top*r+o.top}:null}});if(i.type==="resize"){var s=Y(Y({},i),{directions:Y({},i.directions)});return Vt.forEach(function(d){s.directions[d]*=r}),s}if(i.type==="move"){var a=Y(Y({},i),{directions:Y({},i.directions)});return Iw.forEach(function(d){a.directions[d]*=r}),a}return i}(ce(ce({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,t=this.$refs.image,i=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(d,c,u){var f=u.rotate,m=u.flip,h={width:c.naturalWidth,height:c.naturalHeight},w=yl(h,f),y=d.getContext("2d");d.height=w.height,d.width=w.width,y.save();var S=Xt(Ue(Y({left:0,top:0},h)),f);return y.translate(-(S.left-w.width/2),-(S.top-w.height/2)),y.rotate(f*Math.PI/180),y.translate(m.horizontal?h.width:0,m.vertical?h.height:0),y.scale(m.horizontal?-1:1,m.vertical?-1:1),y.drawImage(c,0,0,h.width,h.height),y.restore(),d}(this.$refs.sourceCanvas,t,this.imageTransforms):t,o=ce({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(d){return d.find(function(c){return u=c,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Ot({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(d,c,u,f,m){d.width=f?f.width:u.width,d.height=f?f.height:u.height;var h=d.getContext("2d");h.clearRect(0,0,d.width,d.height),m&&(m.imageSmoothingEnabled&&(h.imageSmoothingEnabled=m.imageSmoothingEnabled),m.imageSmoothingQuality&&(h.imageSmoothingQuality=m.imageSmoothingQuality),m.fillColor&&(h.fillStyle=m.fillColor,h.fillRect(0,0,d.width,d.height),h.save()));var w=u.left<0?-u.left:0,y=u.top<0?-u.top:0;h.drawImage(c,u.left+w,u.top+y,u.width,u.height,w*(d.width/u.width),y*(d.height/u.height),d.width,d.height)}(n,i,this.coordinates,s,o),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.visibleArea&&t?Pw(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&t?ho(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Tw({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:i,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?Fw:_w);var i=this.sizeRestrictions;i.minWidth,i.minHeight,i.maxWidth,i.maxHeight;var o=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||zw,s=[o,function(a){var d=a.coordinates;return ce({},Hn(r)?r({coordinates:d,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,yn(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,i=this.$refs.cropper;return this.initStretcher({cropper:i,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:i,imageSize:n.imageSize};if(Hn(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(o):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,d=s.clientHeight,c=s.clientWidth,u=d,f=a.width*d/a.height;return f>c&&(f=c,u=a.height*c/a.width),{width:f,height:u}}(o):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!n.boundaries.width||!n.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var n=this;return this.appliedImageTransforms=ce(ce({},this.defaultImageTransforms),{},{flip:ce({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var t,i,o,r,s,a,d=n.defaultVisibleArea||Ow;n.visibleArea=Hn(d)?d({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(t={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},i=t.visibleArea,o=t.boundaries,r=t.getAreaRestrictions,s=Y({},i),a=de(o),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(ll(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],d={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},c=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!d.protocol&&!d.host&&!d.port||d.protocol&&d.protocol==s.protocol&&d.host&&d.host==s.host&&d.host&&c(d)==c(s))}(this.src)){var i=ze(this.crossOrigin)?this.canvas:this.crossOrigin;i===!0&&(i="anonymous"),this.imageAttributes.crossOrigin=i||null}if(this.checkOrientation){var o=(n=this.src,new Promise(function(r){Xw(n).then(function(s){var a=Zw(s);r(s?{source:n,arrayBuffer:s,orientation:a}:{source:n,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:n,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(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,i=n.source,o=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?al(i)||!ll(i)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],d=new Uint8Array(s);d.length>0;){var c=d.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(c):c.slice())),d=d.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=i,Hn(this.defaultTransforms)?this.appliedImageTransforms=Rr(this.defaultTransforms()):lo(this.defaultTransforms)?this.appliedImageTransforms=Rr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Rr({});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=ce(ce({},this.appliedImageTransforms),{},{flip:ce({},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(ce(ce({},t.getPublicProperties()),{},{positionRestrictions:ho(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 i=t.sizeRestrictions,o=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(ce(ce({},t.getPublicProperties()),{},{positionRestrictions:ho(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(i.maxWidth,t.visibleArea.width),maxHeight:Math.min(i.maxHeight,t.visibleArea.height),minWidth:Math.max(i.minWidth,o),minHeight:Math.max(i.minHeight,o)},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 i=t.transitions,o=i!==void 0&&i,r=t.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=Lw(ce(ce({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),d=a.visibleArea,c=a.coordinates;this.visibleArea=d,this.coordinates=c,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.visibleArea,i=n.type,o=i===void 0?"move":i;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:o})},getAspectRatio:function(n){var t,i,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var d=this.$refs.stencil.aspectRatios();t=d.minimum,i=d.maximum}if(ze(t)&&(t=ze(r)?s:r),ze(i)&&(i=ze(r)?a:r),!n&&(ze(t)||ze(i))){var c=this.getStencilSize(),u=c?de(c):null;ze(t)&&(t=cl(u)?u:void 0),ze(i)&&(i=cl(u)?u:void 0)}return{minimum:t,maximum:i}},getStencilSize:function(){if(this.stencilSize)return n={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},t=n.boundaries,i=n.stencilSize,o=n.aspectRatio,$r(de(r=Hn(i)?i({boundaries:t,aspectRatio:o}):i),o)&&(r=Ot({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:o.minimum,maximum:o.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:de(r),maximum:de(r)}})),r;var n,t,i,o,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return ce({},hl)},flip:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=ce({},this.imageTransforms.flip),a=Hw({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()}),d=a.visibleArea,c=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=d,this.coordinates=c,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.transitions,o=i===void 0||i;if(!this.transitionsActive){o&&this.enableTransitions();var r=ce({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=vw({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:n,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,d=s.coordinates,c=this.processAutoZoom("rotateImage",a,d);a=c.visibleArea,d=c.coordinates,this.visibleArea=a,this.coordinates=d,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},Kw={key:0,ref:"canvas",style:{display:"none"}},eb={key:1,ref:"sourceCanvas",style:{display:"none"}};Ml.render=function(n,t,i,o,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(i.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default: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(i.stencilComponent),e.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},i.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[e.vShow,r.imageLoaded]]),i.canvas?(e.openBlock(),e.createBlock("canvas",Kw,null,512)):e.createCommentVNode("",!0),i.canvas?(e.openBlock(),e.createBlock("canvas",eb,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const tb={width:0,height:0,left:0,top:0};class zr{constructor(){l(this,"id");l(this,"ratio",0);l(this,"src","");l(this,"coordinates",tb)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,i=0,o){const r=new zr;return r.src=t,r.ratio=i,r.id=o,r}setRatio(t){this.ratio=t}getRatio(){return this.ratio}setSrc(t){this.src=t}getSrc(){return this.src}}const nb={class:"cropper-wrapper"},ib={class:"row justify-end q-mt-md"},ob=z(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 i=n,o=t,r=e.ref(i.ratio),s=e.ref(zr.Create(i.src,i.ratio));s.value.setRatio(r.value);const a=e.ref(),d=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}]),c=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(m=>{var h;o("crop",{blob:m,src:(h=f.canvas)==null?void 0:h.toDataURL()}),o("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,m)=>(e.openBlock(),e.createElementBlock("div",nb,[e.createVNode(so,{modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=h=>r.value=h),m[1]||(m[1]=h=>c(h))],clearable:!1,options:d.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),e.createVNode(e.unref(Ml),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:m[2]||(m[2]=h=>s.value.setCoordinates(h.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",ib,[e.createVNode(oe,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),rb={class:"column items-center q-my-md"},sb={class:"uploader-content"},ab={class:"uploader-icon"},lb={class:"tools-button absolute-full column items-center justify-center"},cb={class:"row q-gutter-sm"},db=z(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 i=N.ClosePopup,o=n,r=t,s=e.ref(),a=e.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),d=e.ref(!1),c=e.ref(),u=e.ref(o.ratio),f=e.ref(""),m=e.computed(()=>({width:`${o.height*u.value}px`,height:`${o.height}px`,maxWidth:"100%"})),h=e.computed(()=>({width:`${o.height*u.value}px`,height:`${o.height}px`,maxWidth:"100%"})),w=()=>{s.value=void 0,u.value=1,r("update:ratio",1),r("removeFile")},y=x=>{x.blob.src=x.src,o.fileInfo.setFile&&o.fileInfo.setFile(x.blob),o.fileInfo.fileSystemPath&&(s.value=o.fileInfo),d.value=!1,r("crop")},S=x=>{f.value=x.url,d.value=!0},E=x=>{if(x.length===0)return;const V=x[0];V.url=URL.createObjectURL(V),s.value=V,o.fileInfo.setFile&&o.fileInfo.setFile(V),o.withCrop&&S(s.value)};return e.watch(u,x=>{r("update:ratio",x)}),e.watch(()=>[o.fileInfo.description,o.fileInfo.order,o.fileInfo.fileSystemPath],()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),e.onBeforeMount(()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),(x,V)=>(e.openBlock(),e.createElementBlock("div",rb,[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"img-container relative-position",style:e.normalizeStyle(e.unref(m))},[e.createVNode(e.unref(N.QImg),{src:e.unref(s).url,ratio:e.unref(u),class:"uploaded-image","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",lb,[e.createElementVNode("div",cb,[e.createVNode(oe,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md",onClick:V[0]||(V[0]=k=>S(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...V[5]||(V[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(oe,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md",onClick:w},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...V[6]||(V[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(N.QUploader),{key:0,id:e.unref(a),ref_key:"uploader",ref:c,class:"img-uploader",style:e.normalizeStyle(e.unref(h)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:E,onRemoved:w},{header:e.withCtx(()=>[e.createElementVNode("div",sb,[e.createVNode(e.unref(N.QUploaderAddTrigger)),e.createElementVNode("div",ab,[e.createVNode(e.unref(N.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),V[4]||(V[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(cn,{modelValue:e.unref(d),"onUpdate:modelValue":V[3]||(V[3]=k=>e.isRef(d)?d.value=k:null),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCard),{class:"full-height"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QSpace)),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",round:"",dense:""},null,512),[[e.unref(i)]])]),_:1}),e.createVNode(e.unref(N.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(ob,{ratio:e.unref(u),"onUpdate:ratio":V[1]||(V[1]=k=>e.isRef(u)?u.value=k:null),src:e.unref(f),onCrop:y,onClose:V[2]||(V[2]=k=>d.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),[["__scopeId","data-v-52f912c6"]]);function ub(n){n.component("PMenuTabs",uw),n.component("PUploaderFile",Cw),n.component("PUploaderImage",db),n.component("PAuthForm",il),n.component("PAuthModal",cw),n.component("PNameEdit",mw)}const fb={install:function(n){E1(n),aw(n),f0(n),ub(n),Zy(n),La(n),pa(n)}};function mb(n,t={}){const{quasarPlugins:i=!0}=t;i&&n.use(N.Quasar,{plugins:{Notify:N.Notify,Dialog:N.Dialog}}),fb.install(n)}class hb extends Bi{constructor(){super(...arguments);l(this,"label","Логин");l(this,"name","login");l(this,"validator",new Zr);l(this,"method",xn.Login);l(this,"id","field-auth-login")}}const pb=["PF","PFM"],gb=z(e.defineComponent({__name:"ExtractCreateForm",emits:["create"],setup(n,{emit:t}){const i=t,o=ExtractsStore.Item,r=async()=>{await ExtractsStore.Create(),ExtractsStore.AppendToAll([o]),i("create")};return(s,a)=>{const d=e.resolveComponent("PInput"),c=e.resolveComponent("PButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(d,{modelValue:e.unref(o).name,"onUpdate:modelValue":a[0]||(a[0]=u=>e.unref(o).name=u)},null,8,["modelValue"]),e.createVNode(c,{text:"Создать",onClick:r})],64)}}}),[["__scopeId","data-v-acdf750a"]]),yb=Object.freeze(Object.defineProperty({__proto__:null,default:z(e.defineComponent({__name:"ExtractsList",setup(n){const t=e.ref(!1),i=e.ref(!1),o=async()=>{i.value=!0},r=async()=>{await Promise.all([o()])},s=()=>{t.value=!t.value};return P.H.Hooks.onBeforeMount(r),(a,d)=>{const c=gb,u=e.resolveComponent("PModal");return e.unref(t)?(e.openBlock(),e.createBlock(u,{key:0,show:e.unref(t)},{default:e.withCtx(()=>[e.createVNode(c,{onCreate:s})]),_:1},8,["show"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03915680"]])},Symbol.toStringTag,{value:"Module"}));L.AuthButtonLogin=ko,L.AuthButtonRefresh=Yr,L.AuthButtonRegister=xo,L.AuthButtonRestore=Ei,L.AuthChunks=Fe,L.AuthFieldsIds=At,L.AuthFormSettings=Kr,L.AuthMethods=xn,L.EmailField=Ni,L.LoginField=hb,L.PAddDialog=Ja,L.PBadge=ai,L.PButton=oe,L.PCard=Ka,L.PCheckBox=va,L.PChip=Ha,L.PContactForm=nr,L.PContactFormDeleteDialog=li,L.PContactFormEdit=ir,L.PContactFormEditDialog=ci,L.PContactFormEditEmails=or,L.PContactFormEditPhones=rr,L.PContactFormView=sr,L.PContactFormViewEmails=dn,L.PContactFormViewPhones=un,L.PCrudList=el,L.PDateInput=ro,L.PDateTimeInput=Ua,L.PDialog=cn,L.PEditDialog=tl,L.PF=P,L.PFM=Kg,L.PHint=br,L.PInput=ot,L.POptionsListSingle=qa,L.POpts=ja,L.PSelect=so,L.PTableToggle=Wa,L.PTabs=yr,L.PTabsLeft=wr,L.PToggle=Ga,L.PasswordField=$i,L.PasswordRepeatField=Jr,L.Schedule=mi,L.ScheduleDay=no,L.ScheduleDefaultLabels=gr,L.ScheduleGridEditor=Fa,L.SchedulePlace=Ln,L.ScheduleSession=On,L.ScheduleSlot=Ft,L.ScheduleTimeline=Oa,L.TabsStore=io,L.defaultContactsLabels=$t,L.installSprof=mb,L.pfName=pb,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
43
+ ***************************************************************************** */function gl(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 yl(n){return/^blob:/.test(n)}function wl(n){return yl(n)||function(t){return/^data:/.test(t)}(n)}function vn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Ae(n){return n===void 0}function ui(n){return typeof n=="object"&&n!==null}function Dr(n,t,o){var i={};return ui(n)?(Object.keys(t).forEach(function(r){Ae(n[r])?i[r]=t[r]:ui(t[r])?ui(n[r])?i[r]=Dr(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 fi(n){var t=Number(n);return Number.isNaN(t)?n:t}function bl(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!Sl(n)}function Sl(n){return n!=n}function Cl(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var So=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},Lw=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},zr=function(n){this.type="move",this.directions=n},Hw=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,d=s.top;return{left:r.left-a-i.left,top:r.top-d-i.top}}return{left:0,top:0}},n}(),Ar={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=yn(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=yn(t);if(this.touches.length){if(this.touches.length===1&&o.length===1){var i=this.$refs.draggable;this.$emit("drag",new Hw(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"]};Ar.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 _r=St("vue-handler-wrapper"),kl={name:"HandlerWrapper",components:{DraggableElement:Ar},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=gl(this.horizontalPosition,this.verticalPosition);n=_r((ht(t={},o.classname,!0),ht(t,"disabled",this.disabled),t))}else n=_r({disabled:this.disabled});return{root:n,draggable:_r("draggable")}}},emits:["leave","enter","drag","drag-end"]};kl.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(d){return n.$emit("drag",d)}),onDragEnd:t[2]||(t[2]=function(d){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(d){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(d){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var Uw=St("vue-line-wrapper"),xl={name:"LineWrapper",components:{DraggableElement:Ar},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return Uw((ht(n={},this.position,!0),ht(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};xl.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(d){return n.$emit("drag",d)}),onDragEnd:t[2]||(t[2]=function(d){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(d){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(d){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var Vt=["left","right","top","bottom"],vw=["left","right"],jw=["top","bottom"],qw=["left","top"],Ww=["fill-area","fit-area","stencil","none"],El={left:0,top:0,width:0,height:0};function Bl(n,t,o){return!(o=o||["width","height","left","top"]).some(function(i){return n[i]!==t[i]})}function Pt(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function jn(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 Co(n,t){var o={left:0,top:0,right:0,bottom:0};return Vt.forEach(function(i){var r=t[i],s=Pt(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 mi(n){return{left:-n.left,top:-n.top}}function ot(n,t){return Y(Y({},n),{left:n.left+t.left,top:n.top+t.top})}function pt(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 de(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 Wn(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 Fr(n,t){var o;return t.minimum&&n<t.minimum?o=t.minimum:t.maximum&&n>t.maximum&&(o=t.maximum),o}function Nl(n,t){var o=de(n),i=de(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 $l(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 Xt(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 hi(n,t){var o=Co(je(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 je(n,t,o){o===void 0&&(o=!1);var i=Wn(n,t);return ot(n,o?mi(i):i)}function Or(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 Gw(n,t){return Y(Y({},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 Vl(n,t,o){o===void 0&&(o=!0);var i={};return Vt.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 pi(n,t){return Vl(n,t,!0)}function Pl(n){var t=n.size,o=n.aspectRatio,i=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||de(t)>=o.minimum&&de(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 Tl(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,h){return Pl({size:h,aspectRatio:r,sizeRestrictions:i,ignoreMinimum:f})&&(!m||Tl(h,{width:t,height:o})<Tl(m,{width:t,height:o}))?h:m},null)}var d=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&d.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),Pl({size:s,aspectRatio:r,sizeRestrictions:i})&&d.push(s);var c=a(d)||a(d,!0);return c&&{width:c.width,height:c.height}}function Lr(n){var t=n.event,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=ot(o,t.directions);return ot(s,Wn(s,r))}function Qw(n){var t=n.coordinates,o=n.transform,i=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,d=n.visibleArea,c=function(f,m){return Lr({coordinates:f,positionRestrictions:s,event:new zr({left:m.left-f.left,top:m.top-f.top})})},u=Y({},t);return(Array.isArray(o)?o:[o]).forEach(function(f){var m={};Ae((m=typeof f=="function"?f({coordinates:u,imageSize:i,visibleArea:d}):f).width)&&Ae(m.height)||(u=function(h,w){var y=Y(Y(Y({},h),Ot({width:w.width,height:w.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return c(y,{left:h.left,top:h.top})}(u,Y(Y({},u),m))),Ae(m.left)&&Ae(m.top)||(u=c(u,Y(Y({},u),m)))}),u}function Yw(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,d=n.positionRestrictions;n.stencilReference;var c,u,f,m=Y({},i),h=Y({},r),w=Y({},s);c=de(w),u=de(m),f===void 0&&(f=.001),(c===0||u===0?Math.abs(u-c)<f:Math.abs(u/c)<1+f&&Math.abs(u/c)>1-f)||(m=Y(Y({},m),Ot({sizeRestrictions:a,width:m.width,height:m.height,aspectRatio:{minimum:de(w),maximum:de(w)}})));var y=hi(h=pt(h,m.width*o.width/(h.width*w.width)),t({visibleArea:h,type:"resize"}));return y!==1&&(h=pt(h,y),m=pt(m,y)),h=je(h=ot(h,jn(ve(m),ve(h))),t({visibleArea:h,type:"move"})),{coordinates:m=je(m,pi(Pt(h),d)),visibleArea:h}}function Xw(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 d=Y({},r),c=Y({},s);if(r&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};c.width,i.width,de(i)>de(d)?(u.height=.8*i.height,u.width=u.height*de(d)):(u.width=.8*i.width,u.height=u.width*de(d));var f=hi(c=pt(c,d.width*i.width/(c.width*u.width)),o({visibleArea:c,type:"resize"}));c=pt(c,f),f!==1&&(u.height/=f,u.width/=f),c=je(c=ot(c,jn(ve(d),ve(c))),o({visibleArea:c,type:"move"})),d=je(d,pi(Pt(c),a))}return{coordinates:d,visibleArea:c}}function Zw(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.getAreaRestrictions,s=Y({},i),a=Y({},o);if(t.type==="setCoordinates"){var d=Math.max(0,a.width-s.width),c=Math.max(0,a.height-s.height);d>c?s=pt(s,Math.min(a.width/s.width,qn(s,r({visibleArea:s,type:"resize"})))):c>d&&(s=pt(s,Math.min(a.height/s.height,qn(s,r({visibleArea:s,type:"resize"}))))),s=je(s=ot(s,mi(Wn(a,Pt(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function Jw(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 Kw(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,de(s))),d=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Ot(Y(Y({},d),{aspectRatio:i,sizeRestrictions:r}))}function eb(n){var t,o,i=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,d=n.sizeRestrictions,c=n.stencilSize,u=r||i;return de(u)>de(s)?o=(t=c.height*u.height/s.height)*de(c):t=(o=c.width*u.width/s.width)/de(c),Ot({width:o,height:t,aspectRatio:a,sizeRestrictions:d})}function tb(n){var t=n.getAreaRestrictions,o=n.coordinates,i=n.imageSize,r=de(n.boundaries);if(o){var s={height:Math.max(o.height,i.height),width:Math.max(o.width,i.width)},a=Nl({width:de(s)>r?s.width:s.height*r,height:de(s)>r?s.width/r:s.height},Or(t())),d={left:o.left+o.width/2-a.width/2,top:o.top+o.height/2-a.height/2,width:a.width,height:a.height},c=Co(o,Pt(Y({left:0,top:0},i))),u={};return!c.left&&!c.right&&d.width<=i.width&&(u.left=0,u.right=i.width),!c.top&&!c.bottom&&d.height<=i.height&&(u.top=0,u.bottom=i.height),je(d,u)}var f=de(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 gi(n,t){return Vl(n,Pt(t))}function nb(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,d=n.adjustStencil,c=t.scale,u=t.move,f=Y({},i),m=Y({},o),h=1,w=1,y=c.factor&&Math.abs(c.factor-1)>.001;f=ot(f,{left:u.left||0,top:u.top||0});var S={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"}))}};c.factor&&y&&(c.factor<1?(w=Math.max(c.factor,S.stencil.minimum))>1&&(w=1):c.factor>1&&(w=Math.min(c.factor,Math.min(S.area.maximum,S.stencil.maximum)))<1&&(w=1)),w&&(f=pt(f,w,c.center));var B=o.left-i.left,E=i.width+i.left-(o.width+o.left),V=o.top-i.top,k=i.height+i.top-(o.height+o.top);return f=je(f=ot(f,Wn(f,{left:a.left!==void 0?a.left-B*w:void 0,top:a.top!==void 0?a.top-V*w:void 0,bottom:a.bottom!==void 0?a.bottom+k*w:void 0,right:a.right!==void 0?a.right+E*w:void 0})),s({visibleArea:f,type:"move"})),m.width=m.width*w,m.height=m.height*w,m.left=f.left+B*w,m.top=f.top+V*w,m=je(m,pi(Pt(f),a)),c.factor&&y&&d&&(c.factor>1?h=Math.min(S.area.maximum,c.factor)/w:c.factor<1&&(h=Math.max(m.height/f.height,m.width/f.width,c.factor/w)),h!==1&&(f=ot(f=je(f=pt(f,h,c.factor>1?c.center:ve(m)),s({visibleArea:f,type:"move"})),mi(Wn(m,Pt(f)))))),{coordinates:m,visibleArea:f}}function ob(n){var t=n.aspectRatio,o=n.getAreaRestrictions,i=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,d=n.imageSize,c=n.previousImageSize,u=n.angle,f=Y({},i),m=Y({},r),h=Xt(ve(Y({left:0,top:0},c)),u);return(f=Y(Y({},Ot({sizeRestrictions:s,aspectRatio:t,width:f.width,height:f.height})),Xt(ve(f),u))).left-=h.left-d.width/2+f.width/2,f.top-=h.top-d.height/2+f.height/2,m=pt(m,hi(m,o({visibleArea:m,type:"resize"}))),{coordinates:f=je(f,a),visibleArea:m=je(m=ot(m,jn(ve(f),ve(i))),o({visibleArea:m,type:"move"}))}}function ib(n){var t=n.flip,o=n.previousFlip,i=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,d=n.imageSize,c=Y({},s),u=Y({},a),f=o.horizontal!==t.horizontal,m=o.vertical!==t.vertical;if(f||m){var h=Xt({left:d.width/2,top:d.height/2},-i),w=Xt(ve(c),-i),y=Xt({left:f?h.left-(w.left-h.left):w.left,top:m?h.top-(w.top-h.top):w.top},i);c=ot(c,jn(y,ve(c))),w=Xt(ve(u),-i),u=je(u=ot(u,jn(y=Xt({left:f?h.left-(w.left-h.left):w.left,top:m?h.top-(w.top-h.top):w.top},i),ve(u))),r({visibleArea:u,type:"move"}))}return{coordinates:c,visibleArea:u}}function Il(n){var t=n.directions,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=n.sizeRestrictions,a=n.preserveRatio,d=n.compensate,c=Y({},t),u=Tt(o,c).width,f=Tt(o,c).height;u<0&&(c.left<0&&c.right<0?(c.left=-(o.width-s.minWidth)/(c.left/c.right),c.right=-(o.width-s.minWidth)/(c.right/c.left)):c.left<0?c.left=-(o.width-s.minWidth):c.right<0&&(c.right=-(o.width-s.minWidth))),f<0&&(c.top<0&&c.bottom<0?(c.top=-(o.height-s.minHeight)/(c.top/c.bottom),c.bottom=-(o.height-s.minHeight)/(c.bottom/c.top)):c.top<0?c.top=-(o.height-s.minHeight):c.bottom<0&&(c.bottom=-(o.height-s.minHeight)));var m=Co(Tt(o,c),r);d&&(m.left&&m.left>0&&m.right===0?(c.right+=m.left,c.left-=m.left):m.right&&m.right>0&&m.left===0&&(c.left+=m.right,c.right-=m.right),m.top&&m.top>0&&m.bottom===0?(c.bottom+=m.top,c.top-=m.top):m.bottom&&m.bottom>0&&m.top===0&&(c.top+=m.bottom,c.bottom-=m.bottom),m=Co(Tt(o,c),r));var h={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Vt.forEach(function(S){var B=m[S];B&&c[S]&&(h[S]=Math.max(0,1-B/c[S]))}),a){var w=Math.min.apply(null,Vt.map(function(S){return h[S]}));w!==1/0&&Vt.forEach(function(S){c[S]*=w})}else Vt.forEach(function(S){h[S]!==1/0&&(c[S]*=h[S])});if(u=Tt(o,c).width,f=Tt(o,c).height,c.right+c.left&&(u>s.maxWidth?h.width=(s.maxWidth-o.width)/(c.right+c.left):u<s.minWidth&&(h.width=(s.minWidth-o.width)/(c.right+c.left))),c.bottom+c.top&&(f>s.maxHeight?h.height=(s.maxHeight-o.height)/(c.bottom+c.top):f<s.minHeight&&(h.height=(s.minHeight-o.height)/(c.bottom+c.top))),a){var y=Math.min(h.width,h.height);y!==1/0&&Vt.forEach(function(S){c[S]*=y})}else h.width!==1/0&&vw.forEach(function(S){c[S]*=h.width}),h.height!==1/0&&jw.forEach(function(S){c[S]*=h.height});return c}function yi(n,t,o){return t==0&&o==0?n/2:t==0?0:o==0?n:n*Math.abs(t/(t+o))}var rb=St("vue-simple-handler"),sb=St("vue-simple-handler-wrapper"),Hr={name:"SimpleHandler",components:{HandlerWrapper:kl},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=(ht(n={},this.horizontalPosition,!!this.horizontalPosition),ht(n,this.verticalPosition,!!this.verticalPosition),ht(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),ht(n,"hover",this.hover),n);return{default:Ie(rb(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ie(sb(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"]};Hr.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 ab=St("vue-simple-line"),lb=St("vue-simple-line-wrapper"),Ur={name:"SimpleLine",components:{LineWrapper:xl},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(ab(ht({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ie(lb(ht({},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"]};Ur.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 vr=St("vue-bounding-box"),cb=["east","west",null],db=["south","north",null],Ml={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 Hr}},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 Ur}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return cb.forEach(function(t){db.forEach(function(o){if(t!==o){var i=gl(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:vr(),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,d=r.verticalDirection,c=a==="east"?o:a==="west"?0:o/2,u=d==="south"?i:d==="north"?0:i/2;s.wrapperClass=vr("handler"),s.wrapperStyle={transform:"translate(".concat(c,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=vr("handler",ht({},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,d={left:0,right:0,top:0,bottom:0};t==="west"?d.left-=s:t==="east"&&(d.right+=s),o==="north"?d.top-=a:o==="south"&&(d.bottom+=a),!o&&t?i="width":o&&!t&&(i="height"),this.resizable&&this.$emit("resize",new Lw(d,{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"]};Ml.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(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[1]||(t[1]=function(d){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(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[2]||(t[2]=function(d){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var ub=St("vue-draggable-area"),Rl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:ub()}}},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=yn(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()):Cl({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=yn(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 zr({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"]};Rl.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 jr(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 fb(n){return new Promise(function(t,o){try{if(n)if(/^data:/i.test(n))t(function(c){c=c.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(c),f=u.length,m=new ArrayBuffer(f),h=new Uint8Array(m),w=0;w<f;w++)h[w]=u.charCodeAt(w);return m}(n));else if(/^blob:/i.test(n)){var i=new FileReader;i.onload=function(c){t(c.target.result)},s=n,a=function(c){i.readAsArrayBuffer(c)},(d=new XMLHttpRequest).open("GET",s,!0),d.responseType="blob",d.onload=function(){this.status!=200&&this.status!==0||a(this.response)},d.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?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(c){o(c)}var s,a,d})}function Dl(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 mb(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 d=o.byteLength,c=2;c+1<d;){if(o.getUint8(c)===255&&o.getUint8(c+1)===225){s=c;break}c++}if(s&&(i=s+10,function(w,y,S){var B,E="";for(B=y,S+=y;B<S;B++)E+=String.fromCharCode(w.getUint8(B));return E}(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),h=0;h<m;h++)if(c=a+12*h+2,o.getUint16(c,r)===274){c+=8,t=o.getUint16(c,r),o.setUint16(c,1,r);break}}return t}catch{return null}}function zl(n,t){var o=t.getBoundingClientRect(),i=o.left,r=o.top,s={left:0,top:0},a=0;return n.forEach(function(d){s.left+=(d.clientX-i)/n.length,s.top+=(d.clientY-r)/n.length}),n.forEach(function(d){a+=Cl({x:s.left,y:s.top},{x:d.clientX-i,y:d.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var Al={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=Rr(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 So({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=zl(t,this.$refs.container),i=this.oldGeometricProperties;i.count===o.count&&i.count>1&&this.$emit("resize",new So({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=yn(n.touches).filter(function(d){return d.clientX>i&&d.clientX<a&&d.clientY>r&&d.clientY<s}),this.oldGeometricProperties=zl(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=yn(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,(d=+a)==0||Sl(d)?d:d>0?1:-1),s={left:n.clientX-o,top:n.clientY-i};this.$emit("resize",new So({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,d}},emits:["resize","move","transform-end"]};Al.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 qr={components:{TransformableImage:Al},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"]};qr.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(d){return n.$emit("move",d)}),onResize:t[2]||(t[2]=function(d){return n.$emit("resize",d)})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var wi=St("vue-preview"),_l={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:wi({fill:this.fill}),wrapper:wi("wrapper"),imageWrapper:wi("image-wrapper"),image:Ie(wi("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=ce(ce({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=$l({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) ")+Dl(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()}}};_l.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 Fl={components:{Preview:_l},inheritAttrs:!1};Fl.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 Wr=St("vue-rectangle-stencil"),Ol={name:"RectangleStencil",components:{StencilPreview:Fl,BoundingBox:Ml,DraggableArea:Rl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Hr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Ur}},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(Wr({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Ie(Wr("preview"),this.previewClass),boundingBox:Ie(Wr("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"]};Ol.render=function(n,t,o,i,r,s){var a=e.resolveComponent("stencil-preview"),d=e.resolveComponent("draggable-area"),c=e.resolveComponent("bounding-box");return e.openBlock(),e.createBlock("div",{class:s.classes.stencil,style:s.style},[e.createVNode(c,{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(d,{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 hb=["transitions"],Lt=St("vue-advanced-cropper"),Ll={name:"Cropper",components:{BackgroundWrapper:qr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return Ol}},backgroundWrapperComponent:{type:[Object,String],default:function(){return qr}},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 Ww.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=Y(Y({},o),{right:o.left+o.width,bottom:o.top+o.height}),d=t.params||{},c=Y({},t.directions),u=d.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(c.left=0,c.right=0),s.heightFrozen&&(c.top=0,c.bottom=0),Vt.forEach(function(M){u[M]||(c[M]=0)});var f=Tt(a,c=Il({coordinates:a,directions:c,sizeRestrictions:s,positionRestrictions:r})).width,m=Tt(a,c).height,h=d.preserveRatio?de(a):Fr(f/m,i);if(h){var w=d.respectDirection;if(w||(w=a.width>=a.height||h===1?"width":"height"),w==="width"){var y=f/h-a.height;if(u.top&&u.bottom){var S=c.top,B=c.bottom;c.bottom=yi(y,B,S),c.top=yi(y,S,B)}else u.bottom?c.bottom=y:u.top?c.top=y:u.right?c.right=0:u.left&&(c.left=0)}else if(w==="height"){var E=a.width-m*h;if(u.left&&u.right){var V=c.left,k=c.right;c.left=-yi(E,V,k),c.right=-yi(E,k,V)}else u.left?c.left=-E:u.right?c.right=-E:u.top?c.top=0:u.bottom&&(c.bottom=0)}c=Il({directions:c,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:d.compensate})}return f=Tt(a,c).width,m=Tt(a,c).height,(h=d.preserveRatio?de(a):Fr(f/m,i))&&Math.abs(h-f/m)>.001&&Vt.forEach(function(M){u[M]||(c[M]=0)}),Lr({event:new zr({left:-c.left,top:-c.top}),coordinates:{width:o.width+c.right+c.left,height:o.height+c.top+c.bottom,left:o.left,top:o.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Lr},initStretcher:{type:Function,default:function(n){var t=n.stretcher,o=n.imageSize,i=de(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=Y(Y({},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=je(a=ot(a,jn(ve(o),ve(a))),pi(Pt(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.getAreaRestrictions,r=n.coordinates,s=Y({},t);s.height=s.width/de(o),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=pt(s,Math.max(r.height/s.height,r.width/s.width)));var a=mi(Wn(r,Pt(s=pt(s,hi(s,i({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=je(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"&&(de(o)>de(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:ce({},El)}},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=Dr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Dr(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:fi(this.minWidth),minHeight:Ae(this.minHeight)?0:fi(this.minHeight),maxWidth:Ae(this.maxWidth)?1/0:fi(this.maxWidth),maxHeight:Ae(this.maxHeight)?1/0:fi(this.maxHeight)});if(n=function(i){var r=i.areaRestrictions,s=i.sizeRestrictions,a=i.boundaries,d=i.positionRestrictions,c=Y(Y({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});d.left!==void 0&&d.right!==void 0&&(c.maxWidth=Math.min(c.maxWidth,d.right-d.left)),d.bottom!==void 0&&d.top!==void 0&&(c.maxHeight=Math.min(c.maxHeight,d.bottom-d.top));var u=Or(r),f=Nl(a,u);return u.width<1/0&&(!c.maxWidth||c.maxWidth>f.width)&&(c.maxWidth=Math.min(c.maxWidth,f.width)),u.height<1/0&&(!c.maxHeight||c.maxHeight>f.height)&&(c.maxHeight=Math.min(c.maxHeight,f.height)),c.minWidth>c.maxWidth&&(c.minWidth=c.maxWidth,c.widthFrozen=!0),c.minHeight>c.maxHeight&&(c.minHeight=c.maxHeight,c.heightFrozen=!0),c}({sizeRestrictions:n,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var t=this.getStencilSize(),o=Or(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:Ie(Lt("image"),this.imageClass),stencil:Lt("stencil"),boundaries:Ie(Lt("boundaries"),this.boundariesClass),stretcher:Ie(Lt("stretcher")),background:Ie(Lt("background"),this.backgroundClass),foreground:Ie(Lt("foreground"),this.foregroundClass),imageWrapper:Ie(Lt("image-wrapper")),cropperWrapper:Ie(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=ce(ce({},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)")+Dl(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=Rr(this.update,this.debounce),this.debouncedDisableTransitions=Rr(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(ce({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:ce({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var o=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ce({},this.visibleArea):null,imageTransforms:t,get canvas(){return o.canvas?o.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ce({},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 So({},{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 So({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)),je(s,r)}(ce(ce({},this.getPublicProperties()),{},{positionRestrictions:gi(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,o,i){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?Yw:this.autoZoom?Xw:Zw);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 ce(ce({},s),{},{changed:!Bl(s.visibleArea,t)||!Bl(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=Fw(t,hb),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,d=s.coordinates,c=s.changed;i&&c&&this.enableTransitions(),this.visibleArea=a,this.coordinates=d,i&&c&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(t){var o=t.event,i=t.visibleArea,r=t.coefficient;if(o.type==="manipulateImage")return Y(Y({},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=Y(Y({},o),{directions:Y({},o.directions)});return Vt.forEach(function(d){s.directions[d]*=r}),s}if(o.type==="move"){var a=Y(Y({},o),{directions:Y({},o.directions)});return qw.forEach(function(d){a.directions[d]*=r}),a}return o}(ce(ce({},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(d,c,u){var f=u.rotate,m=u.flip,h={width:c.naturalWidth,height:c.naturalHeight},w=$l(h,f),y=d.getContext("2d");d.height=w.height,d.width=w.width,y.save();var S=Xt(ve(Y({left:0,top:0},h)),f);return y.translate(-(S.left-w.width/2),-(S.top-w.height/2)),y.rotate(f*Math.PI/180),y.translate(m.horizontal?h.width:0,m.vertical?h.height:0),y.scale(m.horizontal?-1:1,m.vertical?-1:1),y.drawImage(c,0,0,h.width,h.height),y.restore(),d}(this.$refs.sourceCanvas,t,this.imageTransforms):t,i=ce({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(d){return d.find(function(c){return u=c,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=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(d,c,u,f,m){d.width=f?f.width:u.width,d.height=f?f.height:u.height;var h=d.getContext("2d");h.clearRect(0,0,d.width,d.height),m&&(m.imageSmoothingEnabled&&(h.imageSmoothingEnabled=m.imageSmoothingEnabled),m.imageSmoothingQuality&&(h.imageSmoothingQuality=m.imageSmoothingQuality),m.fillColor&&(h.fillStyle=m.fillColor,h.fillRect(0,0,d.width,d.height),h.save()));var w=u.left<0?-u.left:0,y=u.top<0?-u.top:0;h.drawImage(c,u.left+w,u.top+y,u.width,u.height,w*(d.width/u.width),y*(d.height/u.height),d.width,d.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?Gw(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&t?gi(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Qw({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?eb:Kw);var o=this.sizeRestrictions;o.minWidth,o.minHeight,o.maxWidth,o.maxHeight;var i=vn(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,r=this.defaultPosition||Jw,s=[i,function(a){var d=a.coordinates;return ce({},vn(r)?r({coordinates:d,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,yn(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(vn(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(i):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,d=s.clientHeight,c=s.clientWidth,u=d,f=a.width*d/a.height;return f>c&&(f=c,u=a.height*c/a.width),{width:f,height:u}}(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=ce(ce({},this.defaultImageTransforms),{},{flip:ce({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var t,o,i,r,s,a,d=n.defaultVisibleArea||tb;n.visibleArea=vn(d)?d({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(t={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},o=t.visibleArea,i=t.boundaries,r=t.getAreaRestrictions,s=Y({},o),a=de(i),s.width/s.height!==a&&(s.height=s.width/a),je(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(wl(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],d={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},c=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!d.protocol&&!d.host&&!d.port||d.protocol&&d.protocol==s.protocol&&d.host&&d.host==s.host&&d.host&&c(d)==c(s))}(this.src)){var 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){fb(n).then(function(s){var a=mb(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?yl(o)||!wl(o)?(this.imageAttributes.src=URL.createObjectURL(new Blob([i])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],d=new Uint8Array(s);d.length>0;){var c=d.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(c):c.slice())),d=d.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(i):this.imageAttributes.src=o,vn(this.defaultTransforms)?this.appliedImageTransforms=jr(this.defaultTransforms()):ui(this.defaultTransforms)?this.appliedImageTransforms=jr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=jr({});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=ce(ce({},this.appliedImageTransforms),{},{flip:ce({},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(ce(ce({},t.getPublicProperties()),{},{positionRestrictions:gi(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(ce(ce({},t.getPublicProperties()),{},{positionRestrictions:gi(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=nb(ce(ce({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),d=a.visibleArea,c=a.coordinates;this.visibleArea=d,this.coordinates=c,this.runAutoZoom("manipulateImage"),this.onChange(),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 d=this.$refs.stencil.aspectRatios();t=d.minimum,o=d.maximum}if(Ae(t)&&(t=Ae(r)?s:r),Ae(o)&&(o=Ae(r)?a:r),!n&&(Ae(t)||Ae(o))){var c=this.getStencilSize(),u=c?de(c):null;Ae(t)&&(t=bl(u)?u:void 0),Ae(o)&&(o=bl(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,Fr(de(r=vn(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:de(r),maximum:de(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 ce({},El)},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=ce({},this.imageTransforms.flip),a=ib({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()}),d=a.visibleArea,c=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=d,this.coordinates=c,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=ce({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=ob({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:n,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,d=s.coordinates,c=this.processAutoZoom("rotateImage",a,d);a=c.visibleArea,d=c.coordinates,this.visibleArea=a,this.coordinates=d,this.onChange(),i&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},pb={key:0,ref:"canvas",style:{display:"none"}},gb={key:1,ref:"sourceCanvas",style:{display:"none"}};Ll.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",pb,null,512)):e.createCommentVNode("",!0),o.canvas?(e.openBlock(),e.createBlock("canvas",gb,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const yb={width:0,height:0,left:0,top:0};class Gr{constructor(){l(this,"id");l(this,"ratio",0);l(this,"src","");l(this,"coordinates",yb)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,o=0,i){const r=new Gr;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 wb={class:"cropper-wrapper"},bb={class:"row justify-end q-mt-md"},Sb=z(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(Gr.Create(o.src,o.ratio));s.value.setRatio(r.value);const a=e.ref(),d=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}]),c=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(m=>{var h;i("crop",{blob:m,src:(h=f.canvas)==null?void 0:h.toDataURL()}),i("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,m)=>(e.openBlock(),e.createElementBlock("div",wb,[e.createVNode(bo,{modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=h=>r.value=h),m[1]||(m[1]=h=>c(h))],clearable:!1,options:d.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),e.createVNode(e.unref(Ll),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:m[2]||(m[2]=h=>s.value.setCoordinates(h.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",bb,[e.createVNode(oe,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),Cb={class:"column items-center q-my-md"},kb={class:"uploader-content"},xb={class:"uploader-icon"},Eb={class:"tools-button absolute-full column items-center justify-center"},Bb={class:"row q-gutter-sm"},Nb=z(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(`file-uploader-${Math.random().toString(36).substring(2,9)}`),d=e.ref(!1),c=e.ref(),u=e.ref(i.ratio),f=e.ref(""),m=e.computed(()=>({width:`${i.height*u.value}px`,height:`${i.height}px`,maxWidth:"100%"})),h=e.computed(()=>({width:`${i.height*u.value}px`,height:`${i.height}px`,maxWidth:"100%"})),w=()=>{s.value=void 0,u.value=1,r("update:ratio",1),r("removeFile")},y=E=>{E.blob.src=E.src,i.fileInfo.setFile&&i.fileInfo.setFile(E.blob),i.fileInfo.fileSystemPath&&(s.value=i.fileInfo),d.value=!1,r("crop")},S=E=>{f.value=E.url,d.value=!0},B=E=>{if(E.length===0)return;const V=E[0];V.url=URL.createObjectURL(V),s.value=V,i.fileInfo.setFile&&i.fileInfo.setFile(V),i.withCrop&&S(s.value)};return e.watch(u,E=>{r("update:ratio",E)}),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()))}),(E,V)=>(e.openBlock(),e.createElementBlock("div",Cb,[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"img-container relative-position",style:e.normalizeStyle(e.unref(m))},[e.createVNode(e.unref(x.QImg),{src:e.unref(s).url,ratio:e.unref(u),class:"uploaded-image","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",Eb,[e.createElementVNode("div",Bb,[e.createVNode(oe,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md",onClick:V[0]||(V[0]=k=>S(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...V[5]||(V[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(oe,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md",onClick:w},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...V[6]||(V[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(x.QUploader),{key:0,id:e.unref(a),ref_key:"uploader",ref:c,class:"img-uploader",style:e.normalizeStyle(e.unref(h)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:B,onRemoved:w},{header:e.withCtx(()=>[e.createElementVNode("div",kb,[e.createVNode(e.unref(x.QUploaderAddTrigger)),e.createElementVNode("div",xb,[e.createVNode(e.unref(x.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),V[4]||(V[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(cn,{modelValue:e.unref(d),"onUpdate:modelValue":V[3]||(V[3]=k=>e.isRef(d)?d.value=k: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:""},null,512),[[e.unref(o)]])]),_:1}),e.createVNode(e.unref(x.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(Sb,{ratio:e.unref(u),"onUpdate:ratio":V[1]||(V[1]=k=>e.isRef(u)?u.value=k:null),src:e.unref(f),onCrop:y,onClose:V[2]||(V[2]=k=>d.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),[["__scopeId","data-v-52f912c6"]]);function $b(n){n.component("PMenuTabs",$w),n.component("PUploaderFile",_w),n.component("PUploaderImage",Nb),n.component("PAuthForm",ml),n.component("PAuthModal",Bw),n.component("PNameEdit",Pw)}const Vb={install:function(n){q1(n),xw(n),R0(n),$b(n),w0(n),Ja(n),Na(n),Za(n)}};function Pb(n,t={}){const{quasarPlugins:o=!0}=t;o&&n.use(x.Quasar,{plugins:{Notify:x.Notify,Dialog:x.Dialog}}),Vb.install(n)}class Tb extends Vo{constructor(){super(...arguments);l(this,"label","Логин");l(this,"name","login");l(this,"validator",new ls);l(this,"method",xn.Login);l(this,"id","field-auth-login")}}const Ib=["PF","PFM"],Mb=z(e.defineComponent({__name:"ExtractCreateForm",emits:["create"],setup(n,{emit:t}){const o=t,i=ExtractsStore.Item,r=async()=>{await ExtractsStore.Create(),ExtractsStore.AppendToAll([i]),o("create")};return(s,a)=>{const d=e.resolveComponent("PInput"),c=e.resolveComponent("PButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(d,{modelValue:e.unref(i).name,"onUpdate:modelValue":a[0]||(a[0]=u=>e.unref(i).name=u)},null,8,["modelValue"]),e.createVNode(c,{text:"Создать",onClick:r})],64)}}}),[["__scopeId","data-v-acdf750a"]]),Rb=Object.freeze(Object.defineProperty({__proto__:null,default:z(e.defineComponent({__name:"ExtractsList",setup(n){const t=e.ref(!1),o=e.ref(!1),i=async()=>{o.value=!0},r=async()=>{await Promise.all([i()])},s=()=>{t.value=!t.value};return P.H.Hooks.onBeforeMount(r),(a,d)=>{const c=Mb,u=e.resolveComponent("PModal");return e.unref(t)?(e.openBlock(),e.createBlock(u,{key:0,show:e.unref(t)},{default:e.withCtx(()=>[e.createVNode(c,{onCreate:s})]),_:1},8,["show"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03915680"]])},Symbol.toStringTag,{value:"Module"}));F.AuthButtonLogin=Ei,F.AuthButtonRefresh=ss,F.AuthButtonRegister=Bi,F.AuthButtonRestore=$o,F.AuthChunks=Fe,F.AuthFieldsIds=zt,F.AuthFormSettings=ds,F.AuthMethods=xn,F.EmailField=Po,F.LoginField=Tb,F.PAddDialog=cl,F.PBadge=lo,F.PButton=oe,F.PCard=dl,F.PCheckBox=Ka,F.PChip=br,F.PContactForm=ir,F.PContactFormDeleteDialog=co,F.PContactFormEdit=rr,F.PContactFormEditDialog=uo,F.PContactFormEditEmails=sr,F.PContactFormEditPhones=ar,F.PContactFormView=lr,F.PContactFormViewEmails=dn,F.PContactFormViewPhones=un,F.PCrudList=ul,F.PDateInput=ci,F.PDateTimeInput=el,F.PDialog=cn,F.PEditDialog=Un,F.PF=P,F.PFM=x1,F.PHint=Tr,F.PInput=Je,F.POptionsListSingle=si,F.POpts=tl,F.PSelect=bo,F.PTable=$r,F.PTableBadge=Sr,F.PTableBadges=Cr,F.PTableCount=kr,F.PTableEdit=xr,F.PTableHtml=nl,F.PTableNumber=Er,F.PTableSelect=Br,F.PTableString=Nr,F.PTableToggle=ol,F.PTabs=Vr,F.PTabsLeft=Pr,F.PToggle=il,F.PasswordField=To,F.PasswordRepeatField=cs,F.Schedule=po,F.ScheduleDay=ri,F.ScheduleDefaultLabels=wr,F.ScheduleGridEditor=Ya,F.SchedulePlace=Ln,F.ScheduleSession=On,F.ScheduleSlot=Ft,F.ScheduleTimeline=Xa,F.TabsStore=ai,F.defaultContactsLabels=$t,F.installSprof=Pb,F.pfName=Ib,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});