@elcrm/telegram 0.0.138 → 0.0.139
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.
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2488,7 +2488,7 @@ function ao({
|
|
|
2488
2488
|
}
|
|
2489
2489
|
};
|
|
2490
2490
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
2491
|
-
d && /* @__PURE__ */ l.jsx("div", { className: st.b }),
|
|
2491
|
+
!d && /* @__PURE__ */ l.jsx("div", { className: st.b }),
|
|
2492
2492
|
/* @__PURE__ */ l.jsx(
|
|
2493
2493
|
"div",
|
|
2494
2494
|
{
|
package/dist/index.umd.js
CHANGED
|
@@ -57,4 +57,4 @@ Check the top-level render call using <`+a+">.")}return o}}function Ze(e,o){{if(
|
|
|
57
57
|
<%s {...props} />
|
|
58
58
|
React keys must be passed directly to JSX without using spread:
|
|
59
59
|
let props = %s;
|
|
60
|
-
<%s key={someKey} {...props} />`,me,L,Yt,L),et[L+me]=!0}}return e===i?Dt(E):Lt(E),E}}function Ut(e,o,a){return tt(e,o,a,!0)}function Ft(e,o,a){return tt(e,o,a,!1)}var Wt=Ft,qt=Ut;nt.Fragment=i,nt.jsx=Wt,nt.jsxs=qt}()),nt}process.env.NODE_ENV==="production"?kr():wr();const Sr="0.0.46",or={version:Sr},K={},D={module:"",v:or.version,page:"Main",auth:"Auth",STORAGE:"f",LISTENER:{},debug:!1,tab:"",id:0,dir:".",fileExtension:".tsx",prev:{page:"",module:"",tab:"",id:0}};function H(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{}}H().elcrm||(H().elcrm={}),Object.assign(H().elcrm,{router:or.version});function J(t){var r,n,i,s;const l=H();if(l.ROUTER_PARAMS){t.debug||l.ROUTER_PARAMS.debug;const d={page:(r=l.ROUTER_PARAMS)==null?void 0:r.page,module:(n=l.ROUTER_PARAMS)==null?void 0:n.module,tab:(i=l.ROUTER_PARAMS)==null?void 0:i.tab,id:(s=l.ROUTER_PARAMS)==null?void 0:s.id};l.ROUTER_PARAMS={...l.ROUTER_PARAMS,...t,prev:d}}else{t.debug||D.debug;const d={page:D==null?void 0:D.page,module:D==null?void 0:D.module,tab:D==null?void 0:D.tab,id:D==null?void 0:D.id};l.ROUTER_PARAMS={...D,...t,prev:d}}}function A(){return H().ROUTER_PARAMS||D}function ie(t){const r=H();r.ROUTER_PARAMS||(r.ROUTER_PARAMS={...D}),r.ROUTER_PARAMS.LISTENER||(r.ROUTER_PARAMS.LISTENER={}),Object.keys(t).forEach(n=>{r.ROUTER_PARAMS.LISTENER[n]||(r.ROUTER_PARAMS.LISTENER[n]=[]),Array.isArray(r.ROUTER_PARAMS.LISTENER[n])||(r.ROUTER_PARAMS.LISTENER[n]=[r.ROUTER_PARAMS.LISTENER[n]]),r.ROUTER_PARAMS.LISTENER[n].includes(t[n])||r.ROUTER_PARAMS.LISTENER[n].push(t[n])})}function q(){var t;const r=H();let n=((t=r.ROUTER_PARAMS)==null?void 0:t.LISTENER)||D.LISTENER;return n||(n={},r.ROUTER_PARAMS?r.ROUTER_PARAMS.LISTENER=n:D.LISTENER=n),new Proxy(n,{get(i,s){const l=i[s];return Array.isArray(l)&&l.length>0?(...d)=>{l.forEach(p=>{if(typeof p=="function")try{p(...d)}catch{}})}:l==null?()=>{}:typeof l=="function"?l:()=>{}}})}function nr(t,r){const n=t.replace(/^\.\//,"").replace(/\.(tsx|ts|jsx|js)$/,"");for(const[i,s]of Object.entries(r))if(i.replace(/^\.\//,"").replace(/\.(tsx|ts|jsx|js)$/,"")===n)return s;return null}function ft(t){const{basePath:r=".",devExtensions:n=[".tsx",".ts",".jsx",".js"],prodExtension:i=".js"}=t||{};return s=>{const l=s.replace(/\.(tsx|ts|jsx|js)$/,"");if(r===".")return import(`./${l.replace(/^\.\//,"").replace(/\/+/g,"/")}.js`);{const d=r.replace(/^\.\//,"").replace(/\/+$/,""),p=l.replace(/^\.\//,"").replace(/\/+/g,"/");return import(`./${d}/${p}.js`)}}}function Er(t){const{basePath:r=".",modules:n,pages:i}=t||{};return s=>{if(n){const d=nr(s,n);if(d)return d()}if(i){const d=nr(s,i);if(d)return d()}const l=s.replace(/\.(tsx|ts|jsx|js)$/,"");if(r===".")return import(`./${l.replace(/^\.\//,"").replace(/\/+/g,"/")}.js`);{const d=r.replace(/^\.\//,"").replace(/\/+$/,""),p=l.replace(/^\.\//,"").replace(/\/+/g,"/");return import(`./${d}/${p}.js`)}}}function ar(t=".",r,n){return r||n?Er({basePath:t,modules:r,pages:n}):ft({basePath:t})}function jr(){var t;let r=sessionStorage.getItem("f");if(r){if(r=re.deCode(r),!r)return!1;J({id:r.id,tab:r.tab,page:r.page,module:r.module,time:r.time,payment:{active:!0},module_admin:r.module_admin})}else J({id:0,tab:"",page:(t=localStorage.getItem("d"))!=null&&t.length?A().page:A().auth,module:A().module});return!0}function ir(){return A().page}function sr(){return A().module||""}function dt(){return A().tab}function lr(){return A().id}function Rr(t){let r=s=>(J({page:s}),s);const[n,i]=w.useState(ir()||t&&r(t)||A().page);return w.useEffect(()=>{const s=l=>{i(l)};return ie({page:s}),()=>{var l,d;const p=H();if((d=(l=p.ROUTER_PARAMS)==null?void 0:l.LISTENER)!=null&&d.page){const f=p.ROUTER_PARAMS.LISTENER.page;if(Array.isArray(f)){const m=f.indexOf(s);m>-1&&f.splice(m,1)}}}},[]),n}function Ar(t,r=!0,n={}){J({page:t,...n}),sessionStorage.setItem(A().STORAGE,re.enCode(A())),r&&q().page(t)}function Or(t){return A().page===t}function $r(){return A().prev}function Pr(t,r){const[n,i]=w.useState(sr()||t||A().module);return w.useEffect(()=>(ie({module:i}),()=>{const s=q();s.module===i&&delete s.module}),[]),n}function Cr(t,r=!0){J({module:t}),sessionStorage.setItem(A().STORAGE,re.enCode(A())),r&&q().module(t)}function Tr(t){return A().module===t}function Mr(t,r){if(typeof t!="function"){const[n,i]=w.useState(!r),[s,l]=w.useState(t||dt());return ie({tabs:l}),r&&w.useEffect(()=>{i(!0)},[]),[s,n]}else ie({tabs:t})}function Nr(t){let r=s=>(J({tab:s}),s);const[n,i]=w.useState(dt()||t&&r(t)||A().tab);return w.useEffect(()=>{const s=l=>{i(l)};return ie({tabs:s}),()=>{var l,d;const p=H();if((d=(l=p.ROUTER_PARAMS)==null?void 0:l.LISTENER)!=null&&d.tabs){const f=p.ROUTER_PARAMS.LISTENER.tabs;if(Array.isArray(f)){const m=f.indexOf(s);m>-1&&f.splice(m,1)}}}},[]),n}async function Br(t,r=!0){J({tab:t}),sessionStorage.setItem(A().STORAGE,re.enCode(A())),r&&(q().tabs&&q().tabs(t))}function Ir(t){return A().tab===t}function zr(t){if(typeof t!="function"){const[r,n]=w.useState(t||lr());return w.useEffect(()=>{const i=s=>{n(s)};return ie({id:i}),()=>{const s=q();s.id===i&&delete s.id}},[]),r}else w.useEffect(()=>(ie({id:t}),()=>{var r,n;const i=H();if((n=(r=i.ROUTER_PARAMS)==null?void 0:r.LISTENER)!=null&&n.id){const s=i.ROUTER_PARAMS.LISTENER.id;if(Array.isArray(s)){const l=s.indexOf(t);l>-1&&s.splice(l,1)}}}),[t])}function Lr(t){}async function Dr(t,r=!0){J({id:t}),sessionStorage.setItem(A().STORAGE,re.enCode(A())),r&&q().id(t)}function Ur(t){return Number(A().id)===t}async function Fr(t){var r,n,i,s,l,d,p,f;const{page:m,module:_,tab:x,id:k}=t;m!==void 0&&(K.page=m),_!==void 0&&(K.module=_),x!==void 0&&(K.tab=x),k!==void 0&&(K.id=k),J({...K}),k!==void 0&&((n=(r=q()).id)==null||n.call(r,k)),x!==void 0&&((s=(i=q()).tabs)==null||s.call(i,x)),_!==void 0&&((d=(l=q()).module)==null||d.call(l,_)),m!==void 0&&((f=(p=q()).page)==null||f.call(p,m)),sessionStorage.setItem(A().STORAGE,re.enCode(A()))}const ve={Reset(){K.id=0,K.tab="",K.page=A().page,K.module=A().module},Default({module:t=A().module,page:r=A().page,auth:n=A().auth,debug:i=A().debug,dir:s=A().dir||".",importModules:l,modules:d,pages:p,glob:f}){let m=l,_=d,x=p;f?(_=typeof d=="object"?d:f,x=typeof p=="object"?p:f):(_=_||f,x=x||f),!m&&(_||x)?!f&&(typeof _=="string"||typeof x=="string")?m=ft({basePath:s}):m=ar(s,_,x):m||(m=ft({basePath:s})),J({page:r,module:t,auth:n,debug:i,dir:s,importModules:m}),jr()},createImportModules:ar,getImportModules:()=>A().importModules,usePage:Rr,setPage:Ar,getPage:ir,isPage:Or,getBack:$r,useModule:Pr,setModule:Cr,getModule:sr,isModule:Tr,useTabs:Mr,useTab:Nr,setTabs:Br,getTabs:dt,isTabs:Ir,useId:zr,subId:Lr,setId:Dr,getId:lr,isId:Ur,navigate:Fr},se={n:"_n_zlj3m_1",i:"_i_zlj3m_10",t:"_t_zlj3m_28",e:"_e_zlj3m_32",s:"_s_zlj3m_35",w:"_w_zlj3m_38",h:"_h_zlj3m_41"};let at={};function Wr(){const[t,r]=w.useState([]);return at.set=n=>{r([...t,n])},at.del=n=>{t.forEach((i,s)=>{i.key===n&&t.splice(s,1)}),r(t)},t.length===0?c.jsx(c.Fragment,{}):c.jsx("div",{className:se.n,children:t.map(n=>n.item)})}function qr(t){let r=new Date().getTime();t.key=r,at.set({item:c.jsx(Yr,{data:t},r),key:r})}function Yr(t){const r=t.data;let[n]=w.useState("show"),[i,s]=w.useState(!1);w.useEffect(()=>{setTimeout(function(){s(!0),at.del(r.key)},5e3)},[r.key]);let l;switch(r.type){case"error":l=c.jsx("path",{d:"M12 2.25c-5.376 0-9.75 4.374-9.75 9.75s4.374 9.75 9.75 9.75 9.75-4.374 9.75-9.75S17.376 2.25 12 2.25Zm3.53 12.22a.75.75 0 1 1-1.06 1.06L12 13.06l-2.47 2.47a.75.75 0 0 1-1.06-1.06L10.94 12 8.47 9.53a.75.75 0 0 1 1.06-1.06L12 10.94l2.47-2.47a.75.75 0 0 1 1.06 1.06L13.06 12l2.47 2.47Z"});break;case"success":l=c.jsx("path",{d:"M12 2.25c-5.376 0-9.75 4.374-9.75 9.75s4.374 9.75 9.75 9.75 9.75-4.374 9.75-9.75S17.376 2.25 12 2.25Zm5.074 6.482-6.3 7.5a.748.748 0 0 1-.562.268h-.013a.75.75 0 0 1-.557-.248l-2.7-3a.751.751 0 0 1 .88-1.186c.09.045.17.107.234.182l2.123 2.36 5.747-6.84a.75.75 0 0 1 1.148.964Z"});break;case"warning":l=c.jsx("path",{d:"M12 2.625c-5.17 0-9.375 4.206-9.375 9.375 0 5.17 4.206 9.375 9.375 9.375 5.17 0 9.375-4.206 9.375-9.375 0-5.17-4.206-9.375-9.375-9.375Zm0 3.844a1.219 1.219 0 1 1 0 2.437 1.219 1.219 0 0 1 0-2.437Zm2.25 10.593h-4.125a.75.75 0 1 1 0-1.5h1.313v-4.124h-.75a.75.75 0 1 1 0-1.5h1.5a.75.75 0 0 1 .75.75v4.874h1.312a.75.75 0 1 1 0 1.5Z"});break;default:l="icon fa fa-exclamation-circle";break}const d={error:se.e,success:se.s,warning:se.w};return c.jsx(c.Fragment,{children:i?c.jsx(c.Fragment,{}):c.jsxs("div",{className:se.i+d[r.type]+` ${r.thema!==void 0?se.h:""}`,"data-status":n,children:[c.jsx("svg",{type:"solid",fill:"currentColor",stroke:"none",strokeWidth:"0",width:"24",height:"24",viewBox:"0 0 24 24",children:l}),c.jsx("span",{className:se.t,children:r.text})]})})}let le={Send:qr,Init:Wr};const oe={d:"_d_1u25q_1",b:"_b_1u25q_21",o:"_o_1u25q_25",m:"_m_1u25q_30",t:"_t_1u25q_41",a:"_a_1u25q_108",v:"_v_1u25q_118"},ne={is:!1,MainButton:{},BackButton:{}};let M={};M.dark={"--tg-color-scheme":"dark","--tg-theme-subtitle-text-color":"#98989e","--tg-theme-destructive-text-color":"#e53935","--tg-theme-section-separator-color":"#545458","--tg-theme-link-color":"#3e88f7","--tg-theme-accent-text-color":"#3e88f7","--tg-theme-bg-color":"#000000","--tg-theme-secondary-bg-color":"#1c1c1d","--tg-theme-button-color":"#3e88f7","--tg-theme-button-text-color":"#ffffff","--tg-theme-bottom-bar-bg-color":"#1d1d1d","--tg-theme-section-header-text-color":"#8d8e93","--tg-theme-header-bg-color":"#1a1a1a","--tg-theme-hint-color":"#98989e","--tg-theme-text-color":"#ffffff","--tg-theme-section-bg-color":"#2c2c2e"},M.light={"--tg-color-scheme":"light","--tg-theme-subtitle-text-color":"#8e8e93","--tg-theme-destructive-text-color":"#ff3b30","--tg-theme-section-separator-color":"#c8c7cc","--tg-theme-link-color":"#007aff","--tg-theme-accent-text-color":"#007aff","--tg-theme-bg-color":"#ffffff","--tg-theme-secondary-bg-color":"#efeff4","--tg-theme-button-color":"#007aff","--tg-theme-button-text-color":"#ffffff","--tg-theme-bottom-bar-bg-color":"#f2f2f2","--tg-theme-section-header-text-color":"#6d6d72","--tg-theme-header-bg-color":"#f8f8f8","--tg-theme-hint-color":"#8e8e93","--tg-theme-text-color":"#000000","--tg-theme-section-bg-color":"#f8f8f8"},M.users={"--tg-color-scheme":"users","--tg-theme-bg-color":"#000000","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#98989e","--tg-theme-link-color":"#ffffff","--tg-theme-button-color":"#ffffff","--tg-theme-button-text-color":"#000000","--tg-theme-secondary-bg-color":"#000000"};const Vr=()=>{if(location.hostname==="localhost"){let[t,r]=w.useState(!1),[n,i]=w.useState(!1),[s,l]=w.useState("dark"),[d,p]=w.useState(!1),[f,m]=w.useState(!1);ne.is=!0,ne.MainButton.set=r,ne.BackButton.set=i,w.useEffect(()=>{var k;M[s]["--tg-theme-bg-color-alpha"]=M[s]["--tg-theme-bg-color"]+"b3",M[s]["--tg-theme-secondary-bg-color-alpha"]=M[s]["--tg-theme-secondary-bg-color"]+"d3",M[s]["--tg-theme-bg-color-alpha-25"]=M[s]["--tg-theme-bg-color"]+"40",M[s]["--tg-theme-secondary-bg-color-alpha-25"]=M[s]["--tg-theme-secondary-bg-color"]+"40";for(let R in M[s])document.documentElement.style.setProperty(R,M[s][R]);((k=X.safeAreaInset)==null?void 0:k.bottom)===0?document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px"):X.safeAreaInset||document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px")},[]);let _=k=>{for(let R in M[k])document.documentElement.style.setProperty(R,M[k][R]),document.documentElement.setAttribute("data-color-scheme",k);l(k),p(!1)},x=()=>{p(!1),m(!0)};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:oe.d,children:[n===!1?c.jsx("div",{className:oe.b,children:"Отмена"}):c.jsx("div",{onClick:()=>{var k;n.page===void 0?(k=n.callback)==null||k.call(n):ve.setPage(n.page)},className:oe.b,children:"Назад"}),c.jsx("div",{className:oe.o,onClick:()=>p(!d),children:"Меню"})]}),c.jsx(le.Init,{}),t&&c.jsx("div",{className:oe.m,children:c.jsx("button",{onClick:()=>{t.page&&ve.setPage(t.page),t.callback&&t.callback()},children:t.text})}),d?c.jsxs("div",{className:oe.t,children:[c.jsxs("ul",{children:[c.jsx("li",{children:c.jsx("button",{onClick:x,children:"Authorization"})}),c.jsx("li",{})]}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx("button",{children:"Thema"}),c.jsxs("ol",{children:[c.jsx("li",{children:c.jsx("button",{onClick:()=>_("dark"),children:"Dark"})}),c.jsx("li",{children:c.jsx("button",{onClick:()=>_("light"),children:"Light"})}),c.jsx("li",{children:c.jsx("button",{onClick:()=>_("users"),children:"Users"})})]})]}),c.jsx("li",{children:c.jsx("button",{onClick:()=>p(!d),children:"Closed"})})]})]}):"",f?c.jsx(Hr,{setAuthorization:m}):""]})}else return w.useEffect(()=>{var t;document.documentElement.style.setProperty("--tg-theme-secondary-bg-color-alpha",X.themeParams.secondary_bg_color+"d3"),document.documentElement.style.setProperty("--tg-theme-bg-color-alpha",X.themeParams.bg_color+"b3"),((t=X.safeAreaInset)==null?void 0:t.bottom)===0?document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px"):X.safeAreaInset||document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px")},[]),c.jsx(c.Fragment,{children:c.jsx(le.Init,{})})},Hr=({setAuthorization:t})=>{let r={},n=()=>{localStorage.setItem("auth",r)};return c.jsx("div",{className:oe.a,children:c.jsxs("div",{className:oe.v,children:[c.jsx("fieldset",{}),c.jsx("div",{onClick:n,children:" Сохранить "})]})})},cr={p:"_p_1axqy_1",s:"_s_1axqy_17"},Jr=({className:t,children:r,isScroll:n=!0})=>c.jsx("div",{className:[cr.p,n&&cr.s,t].filter(i=>i!==void 0).join(" "),children:r}),Kr={l:"_l_gfyud_1"},Gr=({children:t,className:r})=>c.jsx("div",{className:[Kr.l,r].filter(n=>n!==void 0).join(" "),children:t}),ce={m:"_m_ppm7n_2",g:"_g_ppm7n_10",i:"_i_ppm7n_18",c:"_c_ppm7n_35",l:"_l_ppm7n_42",a:"_a_ppm7n_57",n:"_n_ppm7n_62"},Xr=({items:t})=>{const r=i=>{ve.setPage(i)},n=i=>{X.openTelegramLink(i)};return c.jsx("div",{className:ce.m,children:t.map(i=>c.jsx("div",{className:ce.g,children:i.items.map((s,l)=>c.jsxs("div",{className:ce.i,onClick:()=>{s.link&&n(s.link),s.page&&r(s.page),s.callback&&s.callback()},children:[c.jsxs("div",{className:ce.c,children:[c.jsx("span",{className:ce.l,style:{background:s.color},children:s.icon}),s.title,s.count&&c.jsx("span",{className:ce.n,children:s.count})]}),c.jsx("span",{className:ce.a,children:"›"})]},l))},i.id))})},G={o:"_o_8ho2f_3",m:"_m_8ho2f_14",l:"_l_8ho2f_28",r:"_r_8ho2f_33",x:"_x_8ho2f_38",h:"_h_8ho2f_42",c:"_c_8ho2f_57",u:"_u_8ho2f_72"},it={};function Zr({children:t,icon:r,iconBadge:n=0,title:i,className:s,view:l="list",position:d="left",name:p="default"}){const[f,m]=w.useState(!1),[_,x]=w.useState(null);w.useEffect(()=>{let R=document.querySelector(".p_sb");return R||(R=document.createElement("div"),R.className="_p_sb",document.body.appendChild(R)),x(R),it[p]=C=>m(C),()=>{R&&R.parentNode&&R.parentNode.removeChild(R)}},[]);const k=c.jsxs(c.Fragment,{children:[f&&c.jsx("div",{className:G.o,onClick:()=>m(!1)}),c.jsxs("div",{className:ae(G.m,d==="left"?G.l:G.r,f&&G.x,s),children:[c.jsxs("div",{className:G.h,children:[i&&c.jsx("h3",{className:G.t,children:i}),c.jsxs("svg",{onClick:()=>m(!1),fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"24",height:"24","data-pointer":"true",style:{cursor:"pointer"},children:[c.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),c.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})]}),c.jsx("div",{className:G.c,children:l==="list"?c.jsx("ul",{className:G.u,children:t}):t})]})]});return c.jsxs(c.Fragment,{children:[r&&c.jsx("div",{onClick:()=>m(!0),className:"bage","data-count":n,children:r}),_&&pr.createPortal(k,_)]})}const Qr=(t,r)=>{var n;(n=it[t])==null||n.call(it,r)};let $e=()=>{};const ur=({children:t,title:r,isOverlay:n=!0,footer:i=!0,className:s,onOpen:l})=>{const[d,p]=w.useState(!1);return $e=()=>{p(!0),setTimeout(()=>{var f;l==null||l(!1),(f=xe==null?void 0:xe.onClose)==null||f.call(xe)},300)},c.jsx("div",{className:`footer-menu-overlay ${n?"is-overlay":""} ${d?"closing":""} `,onClick:$e,children:c.jsxs("div",{className:`footer-menu-popup-book ${d?"closing":""} ${s||""} ${i?"footer":""}`,onClick:f=>f.stopPropagation(),children:[c.jsxs("div",{className:"footer-menu-header",children:[c.jsx("h3",{children:r}),c.jsx("button",{className:"footer-menu-close-btn",onClick:$e,children:"✕"})]}),t]})})},ye={h:"_h_xfork_1",r:"_r_xfork_53",c:"_c_xfork_56",x:"_x_xfork_59",b:"_b_xfork_63",a:"_a_xfork_99",draw:"_draw_xfork_1"},eo={b:"_b_r6m8n_1"},to=({className:t,value:r})=>c.jsx("div",{className:[eo.b,t].filter(n=>n!==void 0).join(" "),children:r}),xe=[],fr=(t,r)=>t.findIndex(n=>(n==null?void 0:n.page)===r),ro=({actions:t,children:r,className:n,actual:i,toHide:s=!1,page:l,style:d="default",onPageChange:p,direction:f="row"})=>{const[m,_]=w.useState(null),[x,k]=w.useState(l?fr(t||[],l):0);xe.onClose=()=>{_(null),k(l?fr(t||[],l):0)},w.useEffect(()=>{if(!s)return;const Se=document.querySelectorAll("[contenteditable]"),Ee=()=>{const I=document.querySelector("footer");I&&I.classList.remove(ye.x)},je=()=>{const I=document.querySelector("footer");I&&I.classList.add(ye.x)};return Se.forEach(I=>{I.addEventListener("focus",je,!0),I.addEventListener("blur",Ee,!0)}),()=>{Se.forEach(I=>{I.removeEventListener("focus",je,!0),I.removeEventListener("blur",Ee,!0)})}},[]);const[R,C]=w.useState(!1),ke=()=>{C(!0)},we=()=>{C(!1)},B=()=>{C(!1)},j={};return d==="liquid-glass"&&(j.onMouseDown=ke,j.onMouseUp=we,j.onMouseLeave=B,j.onTouchStart=ke,j.onTouchEnd=we),c.jsxs(c.Fragment,{children:[m,c.jsxs("footer",{"data-style":d,"data-scale":R?"true":"false",...j,className:ae(ye.h,ye[f==="row"?"r":"c"],n),children:[r,t&&c.jsx(oo,{actions:t,activeIndex:x,setActiveIndex:k,onPageChange:p,setComponent:_,actual:i})]})]})},oo=({actions:t,activeIndex:r,setActiveIndex:n,onPageChange:i,setComponent:s,actual:l})=>c.jsxs("div",{className:ye.b,children:[t.map((d,p)=>c.jsxs("div",{"data-active":r===p?"true":"false",onClick:()=>{d.page&&(n(p),i==null||i(d.page)),d.onClick&&d.onClick(()=>n(p)),d.component&&(r===p?$e():(s(d.component),n(p)))},children:[d.icon,d.title&&c.jsx("span",{children:d.title}),d.badge&&c.jsx(to,{value:d.badge})]},p)),l&&c.jsx("div",{className:ye.a,style:{"--count-options":t.length,"--tab-bar-actual-index":r}})]}),st={w:"_w_yx04q_3",v:"_v_yx04q_24",s:"_s_yx04q_34",n:"_n_yx04q_38"},pt={};function no({children:t,name:r,onClose:n,isOpen:i,isScroll:s=!0,nextBackButton:l}){const[d,p]=w.useState(!1);return w.useEffect(()=>{if(!i)return;const f=l===void 0?dr().pop():l,m=()=>{p(!1),setTimeout(()=>{ht(f||!1),n==null||n()},300)};pt[r]={onClose:m,onOpen:()=>{p(!0)}},ht({callback:m});const _=setTimeout(()=>{p(!0)},10);return()=>{clearTimeout(_)}},[i]),i?c.jsxs("div",{className:ae(st.w,d&&st.v,s&&st.s),children:[c.jsx("div",{className:st.n}),t]}):""}const ao=(t,r)=>{var n,i;r?(n=pt[t])==null||n.onOpen():(i=pt[t])==null||i.onClose()},lt={s:"_s_l7xl0_3",n:"_n_l7xl0_14",b:"_b_l7xl0_19",f:"_f_l7xl0_29"};function io({className:t,children:r,onScrollEnd:n,offset:i=100,isLoading:s,fullscreen:l=!1,isScrollBar:d=!1}){const[p,f]=w.useState(s||!1);w.useEffect(()=>{f(s||!1)},[s]);let m={onScroll:_=>{const{scrollTop:x,scrollHeight:k,clientHeight:R}=_.currentTarget;x+R>=k-i&&!p&&(f(!0),n==null||n())}};return c.jsxs(c.Fragment,{children:[d&&c.jsx("div",{className:lt.b}),c.jsx("div",{...m,className:ae(lt.s,!d&<.n,l&<.f,t),children:r})]})}const gt={a:"_a_ohhaz_1",l:"_l_ohhaz_12",r:"_r_ohhaz_15"};function so({children:t,className:r,position:n="center",title:i}){let s="";return n==="left"?s=gt.l:n==="right"&&(s=gt.r),c.jsxs("div",{className:ae(gt.a,s,r),children:[t,i&&c.jsx("b",{children:i})]})}const N={state:[!1],listen:[],prev:{},router:t=>{t===!1?(v.default.WebApp.BackButton.isVisible=!1,v.default.WebApp.BackButton.offClick(N.listen[0]),N.listen.shift(),N.state.length!==1&&N.state.pop()):(v.default.WebApp.BackButton.isVisible=!0,v.default.WebApp.BackButton.offClick(N.listen[0]),N.listen.shift(),N.listen.push(()=>{var n;let r=N.state.pop();N.prev=ve.getPage(),r.page!==void 0?ve.setPage(r.page):(n=r.callback)==null||n.call(r)}),X.BackButton.onClick(N.listen[0]))}},ae=(...t)=>t.filter(r=>r!==void 0&&r!==!1&&r!==null&&r!=="").join(" ");v.default=void 0,(t=>{var r;t.WebApp=typeof window<"u"&&((r=window.Telegram)==null?void 0:r.WebApp)||{},t.getUser=()=>{var n;return((n=t.WebApp.initDataUnsafe)==null?void 0:n.user)===void 0?{}:t.WebApp.initDataUnsafe},t.Location=n=>{if(ne.is)return n({latitude:55.752555,longitude:37.623123});let i=()=>{t.WebApp.LocationManager.getLocation(async s=>{if(!s){t.WebApp.LocationManager.isAccessRequested||t.WebApp.LocationManager.openSettings();return}n(s)})};!t.WebApp.LocationManager||!t.WebApp.LocationManager.isInited?t.WebApp.LocationManager.init(()=>{i()}):i()},t.Notice={Send:(n,i,s)=>{var l,d;i!==void 0?(le.Send({type:n,text:i,thema:s}),(l=t.WebApp.HapticFeedback)==null||l.notificationOccurred(n)):(le.Send(n),(d=t.WebApp.HapticFeedback)==null||d.notificationOccurred(n.type))},Error:n=>{var i;le.Send({type:"error",text:n}),(i=t.WebApp.HapticFeedback)==null||i.notificationOccurred("error")},Success:n=>{var i;le.Send({type:"success",text:n}),(i=t.WebApp.HapticFeedback)==null||i.notificationOccurred("success")},Warning:n=>{var i;le.Send({type:"warning",text:n}),(i=t.WebApp.HapticFeedback)==null||i.notificationOccurred("warning")}},t.Header=Vr,t.TabBar=ro,t.BottomSheet=ur,t.toggleBottomSheet=$e,t.SafeArea=Jr,t.Loading=Gr,t.Sidebar=Zr,t.SidePanel=no,t.AppBar=so,t.SideBarController=Qr,t.SidePanelController=ao,t.Scroll=io,t.Modal=ut,t.Menu=Xr,t.MainButton={callback:[],set:n=>{ne.is?ne.MainButton.set(n):(t.WebApp.MainButton.callback.forEach(i=>{t.WebApp.MainButton.offClick(i)}),t.WebApp.MainButton.callback=[],typeof n=="boolean"?t.WebApp.MainButton.isVisible=!1:(t.WebApp.MainButton.text=n.text,n.color&&(t.WebApp.MainButton.color=n.color),n.textColor&&(t.WebApp.MainButton.textColor=n.textColor),t.WebApp.MainButton.isVisible=!0,t.WebApp.MainButton.isActive=n.isActive===void 0?!0:n.isActive,t.WebApp.MainButton.callback.push(()=>{var i;n.page===void 0?(i=n.callback)==null||i.call(n):ve.setPage(n.page)}),t.WebApp.MainButton.onClick(t.WebApp.MainButton.callback[0])))}},t.BackButtonPrev=()=>{N.prev&&(0,t.BackButton)(N.prev)},t.BackButtonState=()=>N.state,t.BackButton=n=>{ne.is?ne.BackButton.set(n):(N.state.push(n),N.router(n))}})(v.default||(v.default={}));const lo=v.default.TabBar,co=ur,ht=v.default.BackButton,uo=v.default.BackButtonPrev,dr=v.default.BackButtonState,fo=v.default.Notice,po=v.default.SafeArea,go=v.default.Loading,ho=v.default.Menu,_o=v.default.SidePanel,mo=v.default.Scroll,bo=v.default.AppBar,vo=v.default.Sidebar,yo=v.default.Location,xo=v.default.SidePanelController,ko=v.default.SideBarController,{Header:wo,toggleBottomSheet:So,Modal:Eo,MainButton:jo,WebApp:X,getUser:Ro}=v.default;v.AppBar=bo,v.BackButton=ht,v.BackButtonPrev=uo,v.BackButtonState=dr,v.BottomSheet=co,v.Header=wo,v.Loading=go,v.Location=yo,v.MainButton=jo,v.Menu=ho,v.Modal=Eo,v.Notice=fo,v.SafeArea=po,v.Scroll=mo,v.SideBarController=ko,v.SidePanel=_o,v.SidePanelController=xo,v.Sidebar=vo,v.TabBar=lo,v.WebApp=X,v.clsx=ae,v.getUser=Ro,v.toggleBottomSheet=So,Object.defineProperties(v,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
60
|
+
<%s key={someKey} {...props} />`,me,L,Yt,L),et[L+me]=!0}}return e===i?Dt(E):Lt(E),E}}function Ut(e,o,a){return tt(e,o,a,!0)}function Ft(e,o,a){return tt(e,o,a,!1)}var Wt=Ft,qt=Ut;nt.Fragment=i,nt.jsx=Wt,nt.jsxs=qt}()),nt}process.env.NODE_ENV==="production"?kr():wr();const Sr="0.0.46",or={version:Sr},K={},D={module:"",v:or.version,page:"Main",auth:"Auth",STORAGE:"f",LISTENER:{},debug:!1,tab:"",id:0,dir:".",fileExtension:".tsx",prev:{page:"",module:"",tab:"",id:0}};function H(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{}}H().elcrm||(H().elcrm={}),Object.assign(H().elcrm,{router:or.version});function J(t){var r,n,i,s;const l=H();if(l.ROUTER_PARAMS){t.debug||l.ROUTER_PARAMS.debug;const d={page:(r=l.ROUTER_PARAMS)==null?void 0:r.page,module:(n=l.ROUTER_PARAMS)==null?void 0:n.module,tab:(i=l.ROUTER_PARAMS)==null?void 0:i.tab,id:(s=l.ROUTER_PARAMS)==null?void 0:s.id};l.ROUTER_PARAMS={...l.ROUTER_PARAMS,...t,prev:d}}else{t.debug||D.debug;const d={page:D==null?void 0:D.page,module:D==null?void 0:D.module,tab:D==null?void 0:D.tab,id:D==null?void 0:D.id};l.ROUTER_PARAMS={...D,...t,prev:d}}}function A(){return H().ROUTER_PARAMS||D}function ie(t){const r=H();r.ROUTER_PARAMS||(r.ROUTER_PARAMS={...D}),r.ROUTER_PARAMS.LISTENER||(r.ROUTER_PARAMS.LISTENER={}),Object.keys(t).forEach(n=>{r.ROUTER_PARAMS.LISTENER[n]||(r.ROUTER_PARAMS.LISTENER[n]=[]),Array.isArray(r.ROUTER_PARAMS.LISTENER[n])||(r.ROUTER_PARAMS.LISTENER[n]=[r.ROUTER_PARAMS.LISTENER[n]]),r.ROUTER_PARAMS.LISTENER[n].includes(t[n])||r.ROUTER_PARAMS.LISTENER[n].push(t[n])})}function q(){var t;const r=H();let n=((t=r.ROUTER_PARAMS)==null?void 0:t.LISTENER)||D.LISTENER;return n||(n={},r.ROUTER_PARAMS?r.ROUTER_PARAMS.LISTENER=n:D.LISTENER=n),new Proxy(n,{get(i,s){const l=i[s];return Array.isArray(l)&&l.length>0?(...d)=>{l.forEach(p=>{if(typeof p=="function")try{p(...d)}catch{}})}:l==null?()=>{}:typeof l=="function"?l:()=>{}}})}function nr(t,r){const n=t.replace(/^\.\//,"").replace(/\.(tsx|ts|jsx|js)$/,"");for(const[i,s]of Object.entries(r))if(i.replace(/^\.\//,"").replace(/\.(tsx|ts|jsx|js)$/,"")===n)return s;return null}function ft(t){const{basePath:r=".",devExtensions:n=[".tsx",".ts",".jsx",".js"],prodExtension:i=".js"}=t||{};return s=>{const l=s.replace(/\.(tsx|ts|jsx|js)$/,"");if(r===".")return import(`./${l.replace(/^\.\//,"").replace(/\/+/g,"/")}.js`);{const d=r.replace(/^\.\//,"").replace(/\/+$/,""),p=l.replace(/^\.\//,"").replace(/\/+/g,"/");return import(`./${d}/${p}.js`)}}}function Er(t){const{basePath:r=".",modules:n,pages:i}=t||{};return s=>{if(n){const d=nr(s,n);if(d)return d()}if(i){const d=nr(s,i);if(d)return d()}const l=s.replace(/\.(tsx|ts|jsx|js)$/,"");if(r===".")return import(`./${l.replace(/^\.\//,"").replace(/\/+/g,"/")}.js`);{const d=r.replace(/^\.\//,"").replace(/\/+$/,""),p=l.replace(/^\.\//,"").replace(/\/+/g,"/");return import(`./${d}/${p}.js`)}}}function ar(t=".",r,n){return r||n?Er({basePath:t,modules:r,pages:n}):ft({basePath:t})}function jr(){var t;let r=sessionStorage.getItem("f");if(r){if(r=re.deCode(r),!r)return!1;J({id:r.id,tab:r.tab,page:r.page,module:r.module,time:r.time,payment:{active:!0},module_admin:r.module_admin})}else J({id:0,tab:"",page:(t=localStorage.getItem("d"))!=null&&t.length?A().page:A().auth,module:A().module});return!0}function ir(){return A().page}function sr(){return A().module||""}function dt(){return A().tab}function lr(){return A().id}function Rr(t){let r=s=>(J({page:s}),s);const[n,i]=w.useState(ir()||t&&r(t)||A().page);return w.useEffect(()=>{const s=l=>{i(l)};return ie({page:s}),()=>{var l,d;const p=H();if((d=(l=p.ROUTER_PARAMS)==null?void 0:l.LISTENER)!=null&&d.page){const f=p.ROUTER_PARAMS.LISTENER.page;if(Array.isArray(f)){const m=f.indexOf(s);m>-1&&f.splice(m,1)}}}},[]),n}function Ar(t,r=!0,n={}){J({page:t,...n}),sessionStorage.setItem(A().STORAGE,re.enCode(A())),r&&q().page(t)}function Or(t){return A().page===t}function $r(){return A().prev}function Pr(t,r){const[n,i]=w.useState(sr()||t||A().module);return w.useEffect(()=>(ie({module:i}),()=>{const s=q();s.module===i&&delete s.module}),[]),n}function Cr(t,r=!0){J({module:t}),sessionStorage.setItem(A().STORAGE,re.enCode(A())),r&&q().module(t)}function Tr(t){return A().module===t}function Mr(t,r){if(typeof t!="function"){const[n,i]=w.useState(!r),[s,l]=w.useState(t||dt());return ie({tabs:l}),r&&w.useEffect(()=>{i(!0)},[]),[s,n]}else ie({tabs:t})}function Nr(t){let r=s=>(J({tab:s}),s);const[n,i]=w.useState(dt()||t&&r(t)||A().tab);return w.useEffect(()=>{const s=l=>{i(l)};return ie({tabs:s}),()=>{var l,d;const p=H();if((d=(l=p.ROUTER_PARAMS)==null?void 0:l.LISTENER)!=null&&d.tabs){const f=p.ROUTER_PARAMS.LISTENER.tabs;if(Array.isArray(f)){const m=f.indexOf(s);m>-1&&f.splice(m,1)}}}},[]),n}async function Br(t,r=!0){J({tab:t}),sessionStorage.setItem(A().STORAGE,re.enCode(A())),r&&(q().tabs&&q().tabs(t))}function Ir(t){return A().tab===t}function zr(t){if(typeof t!="function"){const[r,n]=w.useState(t||lr());return w.useEffect(()=>{const i=s=>{n(s)};return ie({id:i}),()=>{const s=q();s.id===i&&delete s.id}},[]),r}else w.useEffect(()=>(ie({id:t}),()=>{var r,n;const i=H();if((n=(r=i.ROUTER_PARAMS)==null?void 0:r.LISTENER)!=null&&n.id){const s=i.ROUTER_PARAMS.LISTENER.id;if(Array.isArray(s)){const l=s.indexOf(t);l>-1&&s.splice(l,1)}}}),[t])}function Lr(t){}async function Dr(t,r=!0){J({id:t}),sessionStorage.setItem(A().STORAGE,re.enCode(A())),r&&q().id(t)}function Ur(t){return Number(A().id)===t}async function Fr(t){var r,n,i,s,l,d,p,f;const{page:m,module:_,tab:x,id:k}=t;m!==void 0&&(K.page=m),_!==void 0&&(K.module=_),x!==void 0&&(K.tab=x),k!==void 0&&(K.id=k),J({...K}),k!==void 0&&((n=(r=q()).id)==null||n.call(r,k)),x!==void 0&&((s=(i=q()).tabs)==null||s.call(i,x)),_!==void 0&&((d=(l=q()).module)==null||d.call(l,_)),m!==void 0&&((f=(p=q()).page)==null||f.call(p,m)),sessionStorage.setItem(A().STORAGE,re.enCode(A()))}const ve={Reset(){K.id=0,K.tab="",K.page=A().page,K.module=A().module},Default({module:t=A().module,page:r=A().page,auth:n=A().auth,debug:i=A().debug,dir:s=A().dir||".",importModules:l,modules:d,pages:p,glob:f}){let m=l,_=d,x=p;f?(_=typeof d=="object"?d:f,x=typeof p=="object"?p:f):(_=_||f,x=x||f),!m&&(_||x)?!f&&(typeof _=="string"||typeof x=="string")?m=ft({basePath:s}):m=ar(s,_,x):m||(m=ft({basePath:s})),J({page:r,module:t,auth:n,debug:i,dir:s,importModules:m}),jr()},createImportModules:ar,getImportModules:()=>A().importModules,usePage:Rr,setPage:Ar,getPage:ir,isPage:Or,getBack:$r,useModule:Pr,setModule:Cr,getModule:sr,isModule:Tr,useTabs:Mr,useTab:Nr,setTabs:Br,getTabs:dt,isTabs:Ir,useId:zr,subId:Lr,setId:Dr,getId:lr,isId:Ur,navigate:Fr},se={n:"_n_zlj3m_1",i:"_i_zlj3m_10",t:"_t_zlj3m_28",e:"_e_zlj3m_32",s:"_s_zlj3m_35",w:"_w_zlj3m_38",h:"_h_zlj3m_41"};let at={};function Wr(){const[t,r]=w.useState([]);return at.set=n=>{r([...t,n])},at.del=n=>{t.forEach((i,s)=>{i.key===n&&t.splice(s,1)}),r(t)},t.length===0?c.jsx(c.Fragment,{}):c.jsx("div",{className:se.n,children:t.map(n=>n.item)})}function qr(t){let r=new Date().getTime();t.key=r,at.set({item:c.jsx(Yr,{data:t},r),key:r})}function Yr(t){const r=t.data;let[n]=w.useState("show"),[i,s]=w.useState(!1);w.useEffect(()=>{setTimeout(function(){s(!0),at.del(r.key)},5e3)},[r.key]);let l;switch(r.type){case"error":l=c.jsx("path",{d:"M12 2.25c-5.376 0-9.75 4.374-9.75 9.75s4.374 9.75 9.75 9.75 9.75-4.374 9.75-9.75S17.376 2.25 12 2.25Zm3.53 12.22a.75.75 0 1 1-1.06 1.06L12 13.06l-2.47 2.47a.75.75 0 0 1-1.06-1.06L10.94 12 8.47 9.53a.75.75 0 0 1 1.06-1.06L12 10.94l2.47-2.47a.75.75 0 0 1 1.06 1.06L13.06 12l2.47 2.47Z"});break;case"success":l=c.jsx("path",{d:"M12 2.25c-5.376 0-9.75 4.374-9.75 9.75s4.374 9.75 9.75 9.75 9.75-4.374 9.75-9.75S17.376 2.25 12 2.25Zm5.074 6.482-6.3 7.5a.748.748 0 0 1-.562.268h-.013a.75.75 0 0 1-.557-.248l-2.7-3a.751.751 0 0 1 .88-1.186c.09.045.17.107.234.182l2.123 2.36 5.747-6.84a.75.75 0 0 1 1.148.964Z"});break;case"warning":l=c.jsx("path",{d:"M12 2.625c-5.17 0-9.375 4.206-9.375 9.375 0 5.17 4.206 9.375 9.375 9.375 5.17 0 9.375-4.206 9.375-9.375 0-5.17-4.206-9.375-9.375-9.375Zm0 3.844a1.219 1.219 0 1 1 0 2.437 1.219 1.219 0 0 1 0-2.437Zm2.25 10.593h-4.125a.75.75 0 1 1 0-1.5h1.313v-4.124h-.75a.75.75 0 1 1 0-1.5h1.5a.75.75 0 0 1 .75.75v4.874h1.312a.75.75 0 1 1 0 1.5Z"});break;default:l="icon fa fa-exclamation-circle";break}const d={error:se.e,success:se.s,warning:se.w};return c.jsx(c.Fragment,{children:i?c.jsx(c.Fragment,{}):c.jsxs("div",{className:se.i+d[r.type]+` ${r.thema!==void 0?se.h:""}`,"data-status":n,children:[c.jsx("svg",{type:"solid",fill:"currentColor",stroke:"none",strokeWidth:"0",width:"24",height:"24",viewBox:"0 0 24 24",children:l}),c.jsx("span",{className:se.t,children:r.text})]})})}let le={Send:qr,Init:Wr};const oe={d:"_d_1u25q_1",b:"_b_1u25q_21",o:"_o_1u25q_25",m:"_m_1u25q_30",t:"_t_1u25q_41",a:"_a_1u25q_108",v:"_v_1u25q_118"},ne={is:!1,MainButton:{},BackButton:{}};let M={};M.dark={"--tg-color-scheme":"dark","--tg-theme-subtitle-text-color":"#98989e","--tg-theme-destructive-text-color":"#e53935","--tg-theme-section-separator-color":"#545458","--tg-theme-link-color":"#3e88f7","--tg-theme-accent-text-color":"#3e88f7","--tg-theme-bg-color":"#000000","--tg-theme-secondary-bg-color":"#1c1c1d","--tg-theme-button-color":"#3e88f7","--tg-theme-button-text-color":"#ffffff","--tg-theme-bottom-bar-bg-color":"#1d1d1d","--tg-theme-section-header-text-color":"#8d8e93","--tg-theme-header-bg-color":"#1a1a1a","--tg-theme-hint-color":"#98989e","--tg-theme-text-color":"#ffffff","--tg-theme-section-bg-color":"#2c2c2e"},M.light={"--tg-color-scheme":"light","--tg-theme-subtitle-text-color":"#8e8e93","--tg-theme-destructive-text-color":"#ff3b30","--tg-theme-section-separator-color":"#c8c7cc","--tg-theme-link-color":"#007aff","--tg-theme-accent-text-color":"#007aff","--tg-theme-bg-color":"#ffffff","--tg-theme-secondary-bg-color":"#efeff4","--tg-theme-button-color":"#007aff","--tg-theme-button-text-color":"#ffffff","--tg-theme-bottom-bar-bg-color":"#f2f2f2","--tg-theme-section-header-text-color":"#6d6d72","--tg-theme-header-bg-color":"#f8f8f8","--tg-theme-hint-color":"#8e8e93","--tg-theme-text-color":"#000000","--tg-theme-section-bg-color":"#f8f8f8"},M.users={"--tg-color-scheme":"users","--tg-theme-bg-color":"#000000","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#98989e","--tg-theme-link-color":"#ffffff","--tg-theme-button-color":"#ffffff","--tg-theme-button-text-color":"#000000","--tg-theme-secondary-bg-color":"#000000"};const Vr=()=>{if(location.hostname==="localhost"){let[t,r]=w.useState(!1),[n,i]=w.useState(!1),[s,l]=w.useState("dark"),[d,p]=w.useState(!1),[f,m]=w.useState(!1);ne.is=!0,ne.MainButton.set=r,ne.BackButton.set=i,w.useEffect(()=>{var k;M[s]["--tg-theme-bg-color-alpha"]=M[s]["--tg-theme-bg-color"]+"b3",M[s]["--tg-theme-secondary-bg-color-alpha"]=M[s]["--tg-theme-secondary-bg-color"]+"d3",M[s]["--tg-theme-bg-color-alpha-25"]=M[s]["--tg-theme-bg-color"]+"40",M[s]["--tg-theme-secondary-bg-color-alpha-25"]=M[s]["--tg-theme-secondary-bg-color"]+"40";for(let R in M[s])document.documentElement.style.setProperty(R,M[s][R]);((k=X.safeAreaInset)==null?void 0:k.bottom)===0?document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px"):X.safeAreaInset||document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px")},[]);let _=k=>{for(let R in M[k])document.documentElement.style.setProperty(R,M[k][R]),document.documentElement.setAttribute("data-color-scheme",k);l(k),p(!1)},x=()=>{p(!1),m(!0)};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:oe.d,children:[n===!1?c.jsx("div",{className:oe.b,children:"Отмена"}):c.jsx("div",{onClick:()=>{var k;n.page===void 0?(k=n.callback)==null||k.call(n):ve.setPage(n.page)},className:oe.b,children:"Назад"}),c.jsx("div",{className:oe.o,onClick:()=>p(!d),children:"Меню"})]}),c.jsx(le.Init,{}),t&&c.jsx("div",{className:oe.m,children:c.jsx("button",{onClick:()=>{t.page&&ve.setPage(t.page),t.callback&&t.callback()},children:t.text})}),d?c.jsxs("div",{className:oe.t,children:[c.jsxs("ul",{children:[c.jsx("li",{children:c.jsx("button",{onClick:x,children:"Authorization"})}),c.jsx("li",{})]}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx("button",{children:"Thema"}),c.jsxs("ol",{children:[c.jsx("li",{children:c.jsx("button",{onClick:()=>_("dark"),children:"Dark"})}),c.jsx("li",{children:c.jsx("button",{onClick:()=>_("light"),children:"Light"})}),c.jsx("li",{children:c.jsx("button",{onClick:()=>_("users"),children:"Users"})})]})]}),c.jsx("li",{children:c.jsx("button",{onClick:()=>p(!d),children:"Closed"})})]})]}):"",f?c.jsx(Hr,{setAuthorization:m}):""]})}else return w.useEffect(()=>{var t;document.documentElement.style.setProperty("--tg-theme-secondary-bg-color-alpha",X.themeParams.secondary_bg_color+"d3"),document.documentElement.style.setProperty("--tg-theme-bg-color-alpha",X.themeParams.bg_color+"b3"),((t=X.safeAreaInset)==null?void 0:t.bottom)===0?document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px"):X.safeAreaInset||document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px")},[]),c.jsx(c.Fragment,{children:c.jsx(le.Init,{})})},Hr=({setAuthorization:t})=>{let r={},n=()=>{localStorage.setItem("auth",r)};return c.jsx("div",{className:oe.a,children:c.jsxs("div",{className:oe.v,children:[c.jsx("fieldset",{}),c.jsx("div",{onClick:n,children:" Сохранить "})]})})},cr={p:"_p_1axqy_1",s:"_s_1axqy_17"},Jr=({className:t,children:r,isScroll:n=!0})=>c.jsx("div",{className:[cr.p,n&&cr.s,t].filter(i=>i!==void 0).join(" "),children:r}),Kr={l:"_l_gfyud_1"},Gr=({children:t,className:r})=>c.jsx("div",{className:[Kr.l,r].filter(n=>n!==void 0).join(" "),children:t}),ce={m:"_m_ppm7n_2",g:"_g_ppm7n_10",i:"_i_ppm7n_18",c:"_c_ppm7n_35",l:"_l_ppm7n_42",a:"_a_ppm7n_57",n:"_n_ppm7n_62"},Xr=({items:t})=>{const r=i=>{ve.setPage(i)},n=i=>{X.openTelegramLink(i)};return c.jsx("div",{className:ce.m,children:t.map(i=>c.jsx("div",{className:ce.g,children:i.items.map((s,l)=>c.jsxs("div",{className:ce.i,onClick:()=>{s.link&&n(s.link),s.page&&r(s.page),s.callback&&s.callback()},children:[c.jsxs("div",{className:ce.c,children:[c.jsx("span",{className:ce.l,style:{background:s.color},children:s.icon}),s.title,s.count&&c.jsx("span",{className:ce.n,children:s.count})]}),c.jsx("span",{className:ce.a,children:"›"})]},l))},i.id))})},G={o:"_o_8ho2f_3",m:"_m_8ho2f_14",l:"_l_8ho2f_28",r:"_r_8ho2f_33",x:"_x_8ho2f_38",h:"_h_8ho2f_42",c:"_c_8ho2f_57",u:"_u_8ho2f_72"},it={};function Zr({children:t,icon:r,iconBadge:n=0,title:i,className:s,view:l="list",position:d="left",name:p="default"}){const[f,m]=w.useState(!1),[_,x]=w.useState(null);w.useEffect(()=>{let R=document.querySelector(".p_sb");return R||(R=document.createElement("div"),R.className="_p_sb",document.body.appendChild(R)),x(R),it[p]=C=>m(C),()=>{R&&R.parentNode&&R.parentNode.removeChild(R)}},[]);const k=c.jsxs(c.Fragment,{children:[f&&c.jsx("div",{className:G.o,onClick:()=>m(!1)}),c.jsxs("div",{className:ae(G.m,d==="left"?G.l:G.r,f&&G.x,s),children:[c.jsxs("div",{className:G.h,children:[i&&c.jsx("h3",{className:G.t,children:i}),c.jsxs("svg",{onClick:()=>m(!1),fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"24",height:"24","data-pointer":"true",style:{cursor:"pointer"},children:[c.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),c.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})]}),c.jsx("div",{className:G.c,children:l==="list"?c.jsx("ul",{className:G.u,children:t}):t})]})]});return c.jsxs(c.Fragment,{children:[r&&c.jsx("div",{onClick:()=>m(!0),className:"bage","data-count":n,children:r}),_&&pr.createPortal(k,_)]})}const Qr=(t,r)=>{var n;(n=it[t])==null||n.call(it,r)};let $e=()=>{};const ur=({children:t,title:r,isOverlay:n=!0,footer:i=!0,className:s,onOpen:l})=>{const[d,p]=w.useState(!1);return $e=()=>{p(!0),setTimeout(()=>{var f;l==null||l(!1),(f=xe==null?void 0:xe.onClose)==null||f.call(xe)},300)},c.jsx("div",{className:`footer-menu-overlay ${n?"is-overlay":""} ${d?"closing":""} `,onClick:$e,children:c.jsxs("div",{className:`footer-menu-popup-book ${d?"closing":""} ${s||""} ${i?"footer":""}`,onClick:f=>f.stopPropagation(),children:[c.jsxs("div",{className:"footer-menu-header",children:[c.jsx("h3",{children:r}),c.jsx("button",{className:"footer-menu-close-btn",onClick:$e,children:"✕"})]}),t]})})},ye={h:"_h_xfork_1",r:"_r_xfork_53",c:"_c_xfork_56",x:"_x_xfork_59",b:"_b_xfork_63",a:"_a_xfork_99",draw:"_draw_xfork_1"},eo={b:"_b_r6m8n_1"},to=({className:t,value:r})=>c.jsx("div",{className:[eo.b,t].filter(n=>n!==void 0).join(" "),children:r}),xe=[],fr=(t,r)=>t.findIndex(n=>(n==null?void 0:n.page)===r),ro=({actions:t,children:r,className:n,actual:i,toHide:s=!1,page:l,style:d="default",onPageChange:p,direction:f="row"})=>{const[m,_]=w.useState(null),[x,k]=w.useState(l?fr(t||[],l):0);xe.onClose=()=>{_(null),k(l?fr(t||[],l):0)},w.useEffect(()=>{if(!s)return;const Se=document.querySelectorAll("[contenteditable]"),Ee=()=>{const I=document.querySelector("footer");I&&I.classList.remove(ye.x)},je=()=>{const I=document.querySelector("footer");I&&I.classList.add(ye.x)};return Se.forEach(I=>{I.addEventListener("focus",je,!0),I.addEventListener("blur",Ee,!0)}),()=>{Se.forEach(I=>{I.removeEventListener("focus",je,!0),I.removeEventListener("blur",Ee,!0)})}},[]);const[R,C]=w.useState(!1),ke=()=>{C(!0)},we=()=>{C(!1)},B=()=>{C(!1)},j={};return d==="liquid-glass"&&(j.onMouseDown=ke,j.onMouseUp=we,j.onMouseLeave=B,j.onTouchStart=ke,j.onTouchEnd=we),c.jsxs(c.Fragment,{children:[m,c.jsxs("footer",{"data-style":d,"data-scale":R?"true":"false",...j,className:ae(ye.h,ye[f==="row"?"r":"c"],n),children:[r,t&&c.jsx(oo,{actions:t,activeIndex:x,setActiveIndex:k,onPageChange:p,setComponent:_,actual:i})]})]})},oo=({actions:t,activeIndex:r,setActiveIndex:n,onPageChange:i,setComponent:s,actual:l})=>c.jsxs("div",{className:ye.b,children:[t.map((d,p)=>c.jsxs("div",{"data-active":r===p?"true":"false",onClick:()=>{d.page&&(n(p),i==null||i(d.page)),d.onClick&&d.onClick(()=>n(p)),d.component&&(r===p?$e():(s(d.component),n(p)))},children:[d.icon,d.title&&c.jsx("span",{children:d.title}),d.badge&&c.jsx(to,{value:d.badge})]},p)),l&&c.jsx("div",{className:ye.a,style:{"--count-options":t.length,"--tab-bar-actual-index":r}})]}),st={w:"_w_yx04q_3",v:"_v_yx04q_24",s:"_s_yx04q_34",n:"_n_yx04q_38"},pt={};function no({children:t,name:r,onClose:n,isOpen:i,isScroll:s=!0,nextBackButton:l}){const[d,p]=w.useState(!1);return w.useEffect(()=>{if(!i)return;const f=l===void 0?dr().pop():l,m=()=>{p(!1),setTimeout(()=>{ht(f||!1),n==null||n()},300)};pt[r]={onClose:m,onOpen:()=>{p(!0)}},ht({callback:m});const _=setTimeout(()=>{p(!0)},10);return()=>{clearTimeout(_)}},[i]),i?c.jsxs("div",{className:ae(st.w,d&&st.v,s&&st.s),children:[c.jsx("div",{className:st.n}),t]}):""}const ao=(t,r)=>{var n,i;r?(n=pt[t])==null||n.onOpen():(i=pt[t])==null||i.onClose()},lt={s:"_s_l7xl0_3",n:"_n_l7xl0_14",b:"_b_l7xl0_19",f:"_f_l7xl0_29"};function io({className:t,children:r,onScrollEnd:n,offset:i=100,isLoading:s,fullscreen:l=!1,isScrollBar:d=!1}){const[p,f]=w.useState(s||!1);w.useEffect(()=>{f(s||!1)},[s]);let m={onScroll:_=>{const{scrollTop:x,scrollHeight:k,clientHeight:R}=_.currentTarget;x+R>=k-i&&!p&&(f(!0),n==null||n())}};return c.jsxs(c.Fragment,{children:[!d&&c.jsx("div",{className:lt.b}),c.jsx("div",{...m,className:ae(lt.s,!d&<.n,l&<.f,t),children:r})]})}const gt={a:"_a_ohhaz_1",l:"_l_ohhaz_12",r:"_r_ohhaz_15"};function so({children:t,className:r,position:n="center",title:i}){let s="";return n==="left"?s=gt.l:n==="right"&&(s=gt.r),c.jsxs("div",{className:ae(gt.a,s,r),children:[t,i&&c.jsx("b",{children:i})]})}const N={state:[!1],listen:[],prev:{},router:t=>{t===!1?(v.default.WebApp.BackButton.isVisible=!1,v.default.WebApp.BackButton.offClick(N.listen[0]),N.listen.shift(),N.state.length!==1&&N.state.pop()):(v.default.WebApp.BackButton.isVisible=!0,v.default.WebApp.BackButton.offClick(N.listen[0]),N.listen.shift(),N.listen.push(()=>{var n;let r=N.state.pop();N.prev=ve.getPage(),r.page!==void 0?ve.setPage(r.page):(n=r.callback)==null||n.call(r)}),X.BackButton.onClick(N.listen[0]))}},ae=(...t)=>t.filter(r=>r!==void 0&&r!==!1&&r!==null&&r!=="").join(" ");v.default=void 0,(t=>{var r;t.WebApp=typeof window<"u"&&((r=window.Telegram)==null?void 0:r.WebApp)||{},t.getUser=()=>{var n;return((n=t.WebApp.initDataUnsafe)==null?void 0:n.user)===void 0?{}:t.WebApp.initDataUnsafe},t.Location=n=>{if(ne.is)return n({latitude:55.752555,longitude:37.623123});let i=()=>{t.WebApp.LocationManager.getLocation(async s=>{if(!s){t.WebApp.LocationManager.isAccessRequested||t.WebApp.LocationManager.openSettings();return}n(s)})};!t.WebApp.LocationManager||!t.WebApp.LocationManager.isInited?t.WebApp.LocationManager.init(()=>{i()}):i()},t.Notice={Send:(n,i,s)=>{var l,d;i!==void 0?(le.Send({type:n,text:i,thema:s}),(l=t.WebApp.HapticFeedback)==null||l.notificationOccurred(n)):(le.Send(n),(d=t.WebApp.HapticFeedback)==null||d.notificationOccurred(n.type))},Error:n=>{var i;le.Send({type:"error",text:n}),(i=t.WebApp.HapticFeedback)==null||i.notificationOccurred("error")},Success:n=>{var i;le.Send({type:"success",text:n}),(i=t.WebApp.HapticFeedback)==null||i.notificationOccurred("success")},Warning:n=>{var i;le.Send({type:"warning",text:n}),(i=t.WebApp.HapticFeedback)==null||i.notificationOccurred("warning")}},t.Header=Vr,t.TabBar=ro,t.BottomSheet=ur,t.toggleBottomSheet=$e,t.SafeArea=Jr,t.Loading=Gr,t.Sidebar=Zr,t.SidePanel=no,t.AppBar=so,t.SideBarController=Qr,t.SidePanelController=ao,t.Scroll=io,t.Modal=ut,t.Menu=Xr,t.MainButton={callback:[],set:n=>{ne.is?ne.MainButton.set(n):(t.WebApp.MainButton.callback.forEach(i=>{t.WebApp.MainButton.offClick(i)}),t.WebApp.MainButton.callback=[],typeof n=="boolean"?t.WebApp.MainButton.isVisible=!1:(t.WebApp.MainButton.text=n.text,n.color&&(t.WebApp.MainButton.color=n.color),n.textColor&&(t.WebApp.MainButton.textColor=n.textColor),t.WebApp.MainButton.isVisible=!0,t.WebApp.MainButton.isActive=n.isActive===void 0?!0:n.isActive,t.WebApp.MainButton.callback.push(()=>{var i;n.page===void 0?(i=n.callback)==null||i.call(n):ve.setPage(n.page)}),t.WebApp.MainButton.onClick(t.WebApp.MainButton.callback[0])))}},t.BackButtonPrev=()=>{N.prev&&(0,t.BackButton)(N.prev)},t.BackButtonState=()=>N.state,t.BackButton=n=>{ne.is?ne.BackButton.set(n):(N.state.push(n),N.router(n))}})(v.default||(v.default={}));const lo=v.default.TabBar,co=ur,ht=v.default.BackButton,uo=v.default.BackButtonPrev,dr=v.default.BackButtonState,fo=v.default.Notice,po=v.default.SafeArea,go=v.default.Loading,ho=v.default.Menu,_o=v.default.SidePanel,mo=v.default.Scroll,bo=v.default.AppBar,vo=v.default.Sidebar,yo=v.default.Location,xo=v.default.SidePanelController,ko=v.default.SideBarController,{Header:wo,toggleBottomSheet:So,Modal:Eo,MainButton:jo,WebApp:X,getUser:Ro}=v.default;v.AppBar=bo,v.BackButton=ht,v.BackButtonPrev=uo,v.BackButtonState=dr,v.BottomSheet=co,v.Header=wo,v.Loading=go,v.Location=yo,v.MainButton=jo,v.Menu=ho,v.Modal=Eo,v.Notice=fo,v.SafeArea=po,v.Scroll=mo,v.SideBarController=ko,v.SidePanel=_o,v.SidePanelController=xo,v.Sidebar=vo,v.TabBar=lo,v.WebApp=X,v.clsx=ae,v.getUser=Ro,v.toggleBottomSheet=So,Object.defineProperties(v,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|