PageSourceSearch

https://bit24.cash/__nuxt/DhlPNn7K.js

js bit24.cash collected 2026-10-07 17:46:52 UTC 63,923 bytes, 1 lines download raw bytes

1import{d as ke,ao as wn,o as E,h as V,m as $,i as A,k as h,n as we,l as J,_ as Le,E as Tt,y as Z,e as Qn,x as Ht,V as Cn,A as Xe,W as _e,$ as Jn,F as ge,r as be,C as He,D as nt,b as ce,t as Pt,q as jt,M as wt,j as ee,O as En,P as Be,Q as Tn,p as mt,a7 as xn,Z as Zn,ax as Kn,aA as Xt,a6 as eo,aw as to,B as no,S as oo,R as xt,L as ao,J as ro,f as lo,g as io,ac as so,ap as co}from"./QJre-PsH.js";import{B as uo}from"./BSK884cQ.js";import{B as Qt}from"./CHps-Mb2.js";import{B as $e}from"./CWXXeE93.js";import{A as ho}from"./BDJFKRVi.js";import{u as fo}from"./BKGXCE4B.js";import{S as Jt,u as vo}from"./IwZF-NmK.js";import{B as ot}from"./BakViL5O.js";import{B as Ut}from"./BcO3dFct.js";import{_ as mo}from"./DJqzH-Dy.js";import{B as Zt}from"./CQ-H9pXJ.js";import"./CgDj6rrw.js";import"./HDGNBR0W.js";import"./BdX34IEx.js";import"./szOyFUc7.js";class po extends ho{constructor(n,t){super(n,t)}async getShortcutsCatalog(){return await this.get("/v1/shortcut/catalog")}}const go={class:"services-header__section"},bo={class:"services-header__item"},_o={class:"services-header__item"},yo=ke({__name:"ServicesHeader",emits:["back","search"],setup(e,{emit:n}){const t=n,o=wn(),a=J(()=>o.getTheme==="dark"?"icon-sun":"icon-moon"),r=()=>{t("back")},l=()=>{t("search")},s=()=>{document.documentElement.classList.add("preparing-theme"),o.toggleTheme(),setTimeout(()=>{document.documentElement.classList.remove("preparing-theme")},300)};return(i,c)=>(E(),V("div",go,[$("div",bo,[A(h(we),{emphasis:"low",type:"icon",color:"neutral",rounded:"",icon:"icon-right-1",size:"40","aria-label":"بازگشت",onClick:r}),c[0]||(c[0]=$("h1",{class:"services-header__title"},"خدمات بیت۲۴",-1))]),$("div",_o,[A(h(we),{emphasis:"low",type:"icon",color:"neutral",rounded:"",icon:"icon-search",size:"40","aria-label":"جست و جو",onClick:l}),A(h(we),{emphasis:"low",type:"icon",color:"neutral",rounded:"",icon:a.value,size:"40","aria-label":"theme switcher button",onClick:s},null,8,["icon"])])]))}}),So=Object.assign(Le(yo,[["__scopeId","data-v-3f786543"]]),{__name:"ServicesHeader"}),wo=e=>({...e}),Co=(e=[])=>[...e].sort((n,t)=>n.order-t.order).map(n=>({...n,shortcuts:n.shortcuts??[]}));function Dn(){const e=Qn(),{options:n}=fo(),t=Tt("services-catalog",()=>[]),o=Z(0),a=Tt("services-catalog-loading",()=>!1),r=Tt("services-catalog-fetched",()=>!1),l=J(()=>!r.value||a.value),s=()=>new po(e,n),i=async()=>{try{a.value=!0;const{success:f,data:p}=await s().getShortcutsCatalog();f&&(t.value=Co(p?.categories))}catch(f){console.error("error in get shortcut catalog api",f)}finally{a.value=!1,r.value=!0}},c=J(()=>t.value.map(f=>({id:f.id,label:f.name})));return{categories:t,selectedTab:o,tabsList:c,isLoading:l,fetchCatalog:i,getAllCatalogItems:()=>{const f=new Map;return t.value.forEach(p=>{p.shortcuts.forEach(v=>{f.has(v.id)||f.set(v.id,wo(v))})}),Array.from(f.values())}}}const Eo="services-catalog-section-",Kt=5,To=5,xo=900,en=20,Do=16,tn=e=>`${Eo}${e}`;function Ao(e,n,t,o){const a=Z(!1),r=Z(null),l=Z(0),s=Z([]);let i=null,c=null,u=null,f=null;const p=()=>l.value+Do,v=()=>Math.max(document.documentElement.scrollHeight-window.innerHeight,0),D=x=>Math.max(x-p(),0),S=x=>D(x)<=v()+Kt,F=x=>Math.abs(window.scrollY-x)<=Kt,M=x=>{r.value={tabId:x,initialScrollY:window.scrollY},e.value=x},T=()=>{r.value=null},B=()=>{i&&(clearTimeout(i),i=null)},I=()=>{l.value=t.value?.offsetHeight??0},N=x=>document.getElementById(tn(x)),W=x=>{const P=N(x);return P?P.querySelector(".services-catalog__category-title"):null},j=x=>{const P=s.value.find(xe=>xe.id===x);if(P)return P.top;const ae=W(x);return ae?ae.getBoundingClientRect().top+window.scrollY:null},le=()=>{s.value=n.value.map(x=>{const P=W(x.id);return P?{id:x.id,top:P.getBoundingClientRect().top+window.scrollY}:null}).filter(x=>!!x)},X=()=>{I(),le()},g=async()=>{if(!o.value)return;await _e();const x=o.value.querySelector(".b-tab--scrollable"),P=o.value.querySelector(".b-tab__item--active");if(!x||!P)return;const ae=x.getBoundingClientRect(),xe=P.getBoundingClientRect();if(xe.left>=ae.left+en&&xe.right<=ae.right-en)return;const ne=xe.left-ae.left-(ae.width-xe.width)/2;x.scrollBy({left:ne,behavior:"smooth"})},O=()=>{if(a.value||r.value||!s.value.length)return;const x=window.scrollY+p();let P=s.value[0].id;s.value.forEach(ae=>{x>=ae.top&&(P=ae.id)}),e.value!==P&&(e.value=P,g())},L=()=>{!r.value||Math.abs(window.scrollY-r.value.initialScrollY)<=To||T()},U=()=>{L(),O()},m=()=>{u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{u=null,X(),U()})},y=()=>{c===null&&(c=window.requestAnimationFrame(()=>{c=null,U()}))},Y=(x,P)=>{a.value=!1,F(P)?(T(),e.value=x,m()):(M(x),X()),g()},C=async x=>{await _e();const P=j(x);if(P===null)return;B();const ae=D(P);if(!S(P)){a.value=!1,M(x),g();return}a.value=!0,T(),window.scrollTo({top:ae,behavior:"smooth"}),i=setTimeout(()=>{i=null,Y(x,ae)},xo)},ie=async()=>{await _e(),C(e.value)},ve=()=>{f?.disconnect(),f=new ResizeObserver(()=>{m()}),[t.value,o.value,...n.value.map(P=>W(P.id))].filter(P=>!!P).forEach(P=>{f?.observe(P)})},Me=()=>{window.addEventListener("scroll",y,{passive:!0}),window.addEventListener("resize",m,{passive:!0}),window.addEventListener("orientationchange",m,{passive:!0}),_e(()=>{ve(),m()})},Et=()=>{f?.disconnect(),f=null,window.removeEventListener("scroll",y),window.removeEventListener("resize",m),window.removeEventListener("orientationchange",m),B(),c!==null&&(window.cancelAnimationFrame(c),c=null),u!==null&&(window.cancelAnimationFrame(u),u=null),T(),a.value=!1};return Ht(()=>{Me()}),Cn(()=>{Et()}),Xe(n,()=>{_e(()=>{ve(),m()})},{deep:!0}),{handleTabsClick:ie,scheduleMeasureLayout:m,getServicesCatalogSectionId:tn}}const Oo={class:"services-catalog"},ko={key:0,class:"services-catalog__tabs-inner services-catalog__tabs-skeleton"},Mo={key:1,class:"services-catalog__tabs-inner"},Io={class:"services-catalog__content"},No={key:0,class:"services-catalog__search-results"},Ro={key:0,class:"services-catalog__grid"},Bo={class:"services-catalog__grid"},Lo=["id"],Po={class:"services-catalog__category-title"},Vo={class:"services-catalog__grid"},Yo=3,$o=3,Fo=3,zo=ke({__name:"ServicesCatalog",props:{editable:{type:Boolean,default:!1},selectedIds:{default:()=>[]},canAdd:{type:Boolean,default:!0},isSearchActive:{type:Boolean,default:!1},searchQuery:{default:""},searchResults:{default:()=>[]},showSearchEmptyState:{type:Boolean,default:!1}},emits:["add"],setup(e,{emit:n}){const t=e,o=n,{categories:a,selectedTab:r,tabsList:l,isLoading:s}=Dn(),i=Z(null),c=Z(null),{handleTabsClick:u,scheduleMeasureLayout:f,getServicesCatalogSectionId:p}=Ao(r,a,i,c),v=J(()=>new Set(t.selectedIds)),D=T=>t.isSearchActive?!1:t.editable&&t.canAdd&&!v.value.has(T.id),S=T=>T.badge_active?T.badge_text:"",F=T=>{o("add",T)},M=T=>{T.link&&jt(T.link,{external:!0})};return Xe(()=>[t.editable,t.isSearchActive],()=>{f()}),(T,B)=>(E(),V("section",Oo,[$("div",{ref_key:"pinRef",ref:i,class:"services-catalog__pin"},[Jn(T.$slots,"pin",{},void 0,!0),!e.isSearchActive&&(h(s)||h(l).length)?(E(),V("div",{key:0,ref_key:"tabsRef",ref:c,class:"services-catalog__tabs",onClick:B[1]||(B[
11]=I=>!h(s)&&h(u)())},[h(s)?(E(),V("div",ko,[(E(),V(ge,null,be(Fo,I=>A(h($e),{key:`tab-skeleton-${I}`,class:"services-catalog__skeleton-tab"})),64))])):(E(),V("div",Mo,[A(h(uo),{modelValue:h(r),"onUpdate:modelValue":B[0]||(B[0]=I=>He(r)?r.value=I:null),grow:!1,list:h(l),type:"bar",size:"14",wide:!0,scrollable:!0,"custom-class":"scrollbar-hide"},null,8,["modelValue","list"])]))],512)):nt("",!0)],512),$("div",Io,[e.isSearchActive&&e.searchQuery.trim()?(E(),V("div",No,[e.searchResults.length?(E(),V("div",Ro,[(E(!0),V(ge,null,be(e.searchResults,I=>(E(),ce(Jt,{key:I.id,item:I,"show-add":!1,"badge-text":S(I),onNavigate:M},null,8,["item","badge-text"]))),128))])):e.showSearchEmptyState?(E(),ce(h(Qt),{key:1,title:"",description:"موردی یافت نشد.",class:"services-catalog__empty-state"})):nt("",!0)])):h(s)?(E(),V(ge,{key:1},be(Yo,I=>$("section",{key:`category-skeleton-${I}`,class:"services-catalog__section"},[A(h($e),{class:"services-catalog__skeleton-title"}),$("div",Bo,[(E(),V(ge,null,be($o,N=>$("div",{key:`item-skeleton-${I}-${N}`,class:"services-catalog__skeleton-item"},[A(h($e),{class:"services-catalog__skeleton-icon"}),A(h($e),{class:"services-catalog__skeleton-text"})])),64))])])),64)):h(a).length?(E(!0),V(ge,{key:3},be(h(a),I=>(E(),V("section",{id:h(p)(I.id),key:I.id,class:"services-catalog__section"},[$("h2",Po,Pt(I.name),1),$("div",Vo,[(E(!0),V(ge,null,be(I.shortcuts,N=>(E(),ce(Jt,{key:N.id,item:N,"show-add":D(N),"badge-text":S(N),onAdd:F,onNavigate:M},null,8,["item","show-add","badge-text"]))),128))])],8,Lo))),128)):(E(),ce(h(Qt),{key:2,title:"",description:"خدمتی یافت نشد.",class:"services-catalog__empty-state"}))])]))}}),Ho=Object.assign(Le(zo,[["__scopeId","data-v-4ac5d41b"]]),{__name:"ServicesCatalog"}),nn=e=>e.trim().toLowerCase().replace(/\s+/g," "),jo=(e,n)=>{const t=nn(n);return t?nn(e).includes(t):!1};function Xo(e){const n=Z(!1),t=Z(""),o=J(()=>{const i=t.value.trim();return i?e().filter(c=>jo(c.name,i)):[]}),a=J(()=>n.value&&!!t.value.trim()&&o.value.length===0),r=J(()=>!!t.value.trim());return{isSearchActive:n,searchQuery:t,filteredItems:o,showSearchEmptyState:a,hasSearchQuery:r,openSearch:()=>{n.value=!0},closeSearch:()=>{n.value=!1,t.value=""}}}const Uo=e=>e.map(n=>n.id).join(",");function qo(e){const n=Z(!1),t=Z(null);let o=null;const a=J(()=>!e.isEditMode.value||!e.savedShortcutIdsAtEditStart.value?!1:Uo(e.liveShortcuts.value)!==e.savedShortcutIdsAtEditStart.value),r=J(()=>e.liveShortcuts.value.length>=e.minCount),l=()=>{_e(()=>{n.value=!0})},s=async()=>{if(await _e(),o){const v=o;o=null,v();return}if(!t.value)return;const p=t.value;t.value=null,await jt(p.fullPath)};return{showSaveModal:n,hasUnsavedChanges:a,canSave:r,requestLeave:p=>{if(!a.value){p();return}o=p,l()},tryLeaveRoute:p=>a.value?(t.value=p,l(),!1):!0,handleSaveConfirm:async()=>{!r.value||!await e.onSave(e.liveShortcuts.value.map(v=>({...v})))||(e.isEditMode.value=!1,n.value=!1,await s())},handleSaveCancel:async()=>{e.isEditMode.value=!1,n.value=!1,await s()}}}const Wo={class:"save-shortcuts-modal__content"},Go=ke({__name:"SaveShortCutsModal",props:Be({canSave:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:Be(["confirm","cancel"],["update:modelValue"]),setup(e,{emit:n}){const t=e,o=wt(e,"modelValue"),a=n,r=()=>{t.loading||(a("cancel"),o.value=!1)},l=()=>{a("confirm")};return(s,i)=>(E(),ce(h(En),{modelValue:o.value,"onUpdate:modelValue":i[0]||(i[0]=c=>o.value=c),"content-class":"px-0 w-full !max-w-[414px] !w-[calc(100%-40px)]",mode:"modal"},{default:ee(()=>[A(h(Tn),{"trailing-icon2":"icon-close",class:"!ps-5 !pe-3 !py-2",onSecondTrailingBtn:r}),$("div",Wo,[i[3]||(i[3]=$("p",{class:"save-shortcuts-modal__message"},"تغییرات ذخیره شود؟",-1)),A(h(Ut),{class:"save-shortcuts-modal__actions"},{default:ee(()=>[A(h(ot),{xs:"6/12",class:"!pe-2 !ps-0"},{default:ee(()=>[A(h(we),{emphasis:"high",size:"40",color:"primary",wide:"",loading:e.loading,disabled:!e.canSave||e.loading,onClick:l},{default:ee(()=>[...i[1]||(i[1]=[mt(" ذخیره ",-1)])]),_:1},8,["loading","disabled"])]),_:1}),A(h(ot),{xs:"6/12",class:"!ps-2 !pe-0"},{default:ee(()=>[A(h(we),{emphasis:"medium-outline",size:"40",color:"neutral",wide:"",disabled:e.loading,onClick:r},{default:ee(()=>[...i[2]||(i[2]=[mt(" انصراف ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})])]),_:1},8,["modelValue"]))}}),Qo=Object.assign(Le(Go,[["__scopeId","data-v-23453c06"]]),{__name:"SaveShortCutsModal"}),Jo={class:"services-search-header"},Zo=ke({__name:"ServicesSearchHeader",props:{modelValue:{default:""},modelModifiers:{}},emits:Be(["cancel"],["update:modelValue"]),setup(e,{emit:n}){const t=wt(e,"modelValue"),o=n,a=()=>{o("cancel")};return(r,l)=>(E(),V("div",Jo,[A(h(mo),{modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=s=>t.value=s),class:"services-search-header__field",size:"40",placeholder:"جستجو در خدمات، مثلا: واریز",fill:!1,"input-border":"border-brand--oln"},null,8,["modelValue"]),A(h(xn),{tag:"button",title:"لغو",size:"14",class:"services-search-header__cancel",onClick:a})]))}}),Ko=Object.assign(Le(Zo,[["__scopeId","data-v-a97324c4"]]),{__name:"ServicesSearchHeader"});var ea=Object.defineProperty,pt=Object.getOwnPropertySymbols,An=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable,on=(e,n,t)=>n in e?ea(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Fe=(e,n)=>{for(var t in n||(n={}))An.call(n,t)&&on(e,t,n[t]);if(pt)for(var t of pt(n))On.call(n,t)&&on(e,t,n[t]);return e},kn=(e,n)=>{var t={};for(var o in e)An.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&pt)for(var o of pt(e))n.indexOf(o)<0&&On.call(e,o)&&(t[o]=e[o]);return t};const Mn="[vue-draggable-plus]: ";function ta(e){console.warn(Mn+e)}function na(e){console.error(Mn+e)}function an(e,n,t){return t>=0&&t<e.length&&e.splice(t,0,e.splice(n,1)[0]),e}function oa(e){return e.replace(/-(\w)/g,(n,t)=>t?t.toUpperCase():"")}function aa(e){return Object.keys(e).reduce((n,t)=>(typeof e[t]<"u"&&(n[oa(t)]=e[t]),n),{})}function rn(e,n){return Array.isArray(e)&&e.splice(n,1),e}function ln(e,n,t){return Array.isArray(e)&&e.splice(n,0,t),e}function ra(e){return typeof e>"u"}function la(e){return typeof e=="string"}function sn(e,n,t){const o=e.children[t];e.insertBefore(n,o)}function Dt(e){e.parentNode&&e.parentNode.removeChild(e)}function ia(e,n=document){var t;let o=null;return typeof n?.querySelector=="function"?o=(t=n?.querySelector)==null?void 0:t.call(n,e):o=document.querySelector(e),o||ta(`Element not found: ${e}`),o}function sa(e,n,t=null){return function(...o){return e.apply(t,o),n.apply(t,o)}}function ca(e,n){const t=Fe({},e);
vendor: 4,358 bytes, line 1
1return Object.keys(n).forEach(o=>{t[o]?t[o]=sa(e[o],n[o]):t[o]=n[o]}),t}function ua(e){return e instanceof HTMLElement}function cn(e,n){Object.keys(e).forEach(t=>{n(t,e[t])})}function da(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}const ha=Object.assign;function un(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,o)}return t}function Se(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?un(Object(t),!0).forEach(function(o){fa(e,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):un(Object(t)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))})}return e}function ut(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ut=function(n){return typeof n}:ut=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ut(e)}function fa(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ee(){return Ee=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ee.apply(this,arguments)}function va(e,n){if(e==null)return{};var t={},o=Object.keys(e),a,r;for(r=0;r<o.length;r++)a=o[r],!(n.indexOf(a)>=0)&&(t[a]=e[a]);return t}function ma(e,n){if(e==null)return{};var t=va(e,n),o,a;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)o=r[a],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}return t}var pa="1.15.2";function Ce(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Te=Ce(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),at=Ce(/Edge/i),dn=Ce(/firefox/i),Je=Ce(/safari/i)&&!Ce(/chrome/i)&&!Ce(/android/i),In=Ce(/iP(ad|od|hone)/i),Nn=Ce(/chrome/i)&&Ce(/android/i),Rn={capture:!1,passive:!1};function R(e,n,t){e.addEventListener(n,t,!Te&&Rn)}function k(e,n,t){e.removeEventListener(n,t,!Te&&Rn)}function gt(e,n){if(n){if(n[0]===">"&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch{return!1}return!1}}function ga(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function pe(e,n,t,o){if(e){t=t||document;do{if(n!=null&&(n[0]===">"?e.parentNode===t&&gt(e,n):gt(e,n))||o&&e===t)return e;if(e===t)break}while(e=ga(e))}return null}var hn=/\s+/g;function ue(e,n,t){if(e&&n)if(e.classList)e.classList[t?"add":"remove"](n);else{var o=(" "+e.className+" ").replace(hn," ").replace(" "+n+" "," ");e.className=(o+(t?" "+n:"")).replace(hn," ")}}function b(e,n,t){var o=e&&e.style;if(o){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),n===void 0?t:t[n];!(n in o)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),o[n]=t+(typeof t=="string"?"":"px")}}function je(e,n){var t="";if(typeof e=="string")t=e;else do{var o=b(e,"transform");o&&o!=="none"&&(t=o+" "+t)}while(!n&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(t)}function Bn(e,n,t){if(e){var o=e.getElementsByTagName(n),a=0,r=o.length;if(t)for(;a<r;a++)t(o[a],a);return o}return[]}function ye(){var e=document.scrollingElement;return e||document.documentElement}function Q(e,n,t,o,a){if(!(!e.getBoundingClientRect&&e!==window)){var r,l,s,i,c,u,f;if(e!==window&&e.parentNode&&e!==ye()?(r=e.getBoundingClientRect(),l=r.top,s=r.left,i=r.bottom,c=r.right,u=r.height,f=r.width):(l=0,s=0,i=window.innerHeight,c=window.innerWidth,u=window.innerHeight,f=window.innerWidth),(n||t)&&e!==window&&(a=a||e.parentNode,!Te))do if(a&&a.getBoundingClientRect&&(b(a,"transform")!=="none"||t&&b(a,"position")!=="static")){var p=a.getBoundingClientRect();l-=p.top+parseInt(b(a,"border-top-width")),s-=p.left+parseInt(b(a,"border-left-width")),i=l+r.height,c=s+r.width;break}while(a=a.parentNode);
vendor: 4,348 bytes, line 1
1if(o&&e!==window){var v=je(a||e),D=v&&v.a,S=v&&v.d;v&&(l/=S,s/=D,f/=D,u/=S,i=l+u,c=s+f)}return{top:l,left:s,bottom:i,right:c,width:f,height:u}}}function fn(e,n,t){for(var o=Oe(e,!0),a=Q(e)[n];o;){var r=Q(o)[t],l=void 0;if(l=a>=r,!l)return o;if(o===ye())break;o=Oe(o,!1)}return!1}function Ue(e,n,t,o){for(var a=0,r=0,l=e.children;r<l.length;){if(l[r].style.display!=="none"&&l[r]!==_.ghost&&(o||l[r]!==_.dragged)&&pe(l[r],t.draggable,e,!1)){if(a===n)return l[r];a++}r++}return null}function qt(e,n){for(var t=e.lastElementChild;t&&(t===_.ghost||b(t,"display")==="none"||n&&!gt(t,n));)t=t.previousElementSibling;return t||null}function fe(e,n){var t=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==_.clone&&(!n||gt(e,n))&&t++;return t}function vn(e){var n=0,t=0,o=ye();if(e)do{var a=je(e),r=a.a,l=a.d;n+=e.scrollLeft*r,t+=e.scrollTop*l}while(e!==o&&(e=e.parentNode));return[n,t]}function ba(e,n){for(var t in e)if(e.hasOwnProperty(t)){for(var o in n)if(n.hasOwnProperty(o)&&n[o]===e[t][o])return Number(t)}return-1}function Oe(e,n){if(!e||!e.getBoundingClientRect)return ye();var t=e,o=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var a=b(t);if(t.clientWidth<t.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return ye();if(o||n)return t;o=!0}}while(t=t.parentNode);return ye()}function _a(e,n){if(e&&n)for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function At(e,n){return Math.round(e.top)===Math.round(n.top)&&Math.round(e.left)===Math.round(n.left)&&Math.round(e.height)===Math.round(n.height)&&Math.round(e.width)===Math.round(n.width)}var Ze;function Ln(e,n){return function(){if(!Ze){var t=arguments,o=this;t.length===1?e.call(o,t[0]):e.apply(o,t),Ze=setTimeout(function(){Ze=void 0},n)}}}function ya(){clearTimeout(Ze),Ze=void 0}function Pn(e,n,t){e.scrollLeft+=n,e.scrollTop+=t}function Vn(e){var n=window.Polymer,t=window.jQuery||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):t?t(e).clone(!0)[0]:e.cloneNode(!0)}function Yn(e,n,t){var o={};return Array.from(e.children).forEach(function(a){var r,l,s,i;if(!(!pe(a,n.draggable,e,!1)||a.animated||a===t)){var c=Q(a);o.left=Math.min((r=o.left)!==null&&r!==void 0?r:1/0,c.left),o.top=Math.min((l=o.top)!==null&&l!==void 0?l:1/0,c.top),o.right=Math.max((s=o.right)!==null&&s!==void 0?s:-1/0,c.right),o.bottom=Math.max((i=o.bottom)!==null&&i!==void 0?i:-1/0,c.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var he="Sortable"+new Date().getTime();function Sa(){var e=[],n;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(o){if(!(b(o,"display")==="none"||o===_.ghost)){e.push({target:o,rect:Q(o)});var a=Se({},e[e.length-1].rect);if(o.thisAnimationDuration){var r=je(o,!0);r&&(a.top-=r.f,a.left-=r.e)}o.fromRect=a}})}},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(ba(e,{target:t}),1)},animateAll:function(t){var o=this;if(!this.options.animation){clearTimeout(n),typeof t=="function"&&t();return}var a=!1,r=0;e.forEach(function(l){var s=0,i=l.target,c=i.fromRect,u=Q(i),f=i.prevFromRect,p=i.prevToRect,v=l.rect,D=je(i,!0);D&&(u.top-=D.f,u.left-=D.e),i.toRect=u,i.thisAnimationDuration&&At(f,u)&&!At(c,u)&&(v.top-u.top)/(v.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(s=Ca(v,f,p,o.options)),At(u,c)||(i.prevFromRect=c,i.prevToRect=u,s||(s=o.options.animation),o.animate(i,v,u,s)),s&&(a=!0,r=Math.max(r,s),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout(function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null},s),i.thisAnimationDuration=s)}),clearTimeout(n),a?n=setTimeout(function(){typeof t=="function"&&t()},r):typeof t=="function"&&t(),e=[]},animate:function(t,o,a,r){if(r){b(t,"transition",""),b(t,"transform","");var l=je(this.el),s=l&&l.a,i=l&&l.d,c=(o.left-a.left)/(s||1),u=(o.top-a.top)/(i||1);t.animatingX=!!c,t.animatingY=!!u,b(t,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=wa(t),b(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),b(t,"transform","translate3d(0,
10,0)"),typeof t.animated=="number"&&clearTimeout(t.animated),t.animated=setTimeout(function(){b(t,"transition",""),b(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},r)}}}}function wa(e){return e.offsetWidth}function Ca(e,n,t,o){return Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))/Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))*o.animation}var Pe=[],Ot={initializeByDefault:!0},rt={mount:function(e){for(var n in Ot)Ot.hasOwnProperty(n)&&!(n in e)&&(e[n]=Ot[n]);Pe.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Pe.push(e)},pluginEvent:function(e,n,t){var o=this;this.eventCanceled=!1,t.cancel=function(){o.eventCanceled=!0};var a=e+"Global";Pe.forEach(function(r){n[r.pluginName]&&(n[r.pluginName][a]&&n[r.pluginName][a](Se({sortable:n},t)),n.options[r.pluginName]&&n[r.pluginName][e]&&n[r.pluginName][e](Se({sortable:n},t)))})},initializePlugins:function(e,n,t,o){Pe.forEach(function(l){var s=l.pluginName;if(!(!e.options[s]&&!l.initializeByDefault)){var i=new l(e,n,e.options);i.sortable=e,i.options=e.options,e[s]=i,Ee(t,i.defaults)}});for(var a in e.options)if(e.options.hasOwnProperty(a)){var r=this.modifyOption(e,a,e.options[a]);typeof r<"u"&&(e.options[a]=r)}},getEventProperties:function(e,n){var t={};return Pe.forEach(function(o){typeof o.eventProperties=="function"&&Ee(t,o.eventProperties.call(n[o.pluginName],e))}),t},modifyOption:function(e,n,t){var o;return Pe.forEach(function(a){e[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[n]=="function"&&(o=a.optionListeners[n].call(e[a.pluginName],t))}),o}};function Ea(e){var n=e.sortable,t=e.rootEl,o=e.name,a=e.targetEl,r=e.cloneEl,l=e.toEl,s=e.fromEl,i=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,f=e.newDraggableIndex,p=e.originalEvent,v=e.putSortable,D=e.extraEventProperties;if(n=n||t&&t[he],!!n){var S,F=n.options,M="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!Te&&!at?S=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(S=document.createEvent("Event"),S.initEvent(o,!0,!0)),S.to=l||t,S.from=s||t,S.item=a||t,S.clone=r,S.oldIndex=i,S.newIndex=c,S.oldDraggableIndex=u,S.newDraggableIndex=f,S.originalEvent=p,S.pullMode=v?v.lastPutMode:void 0;var T=Se(Se({},D),rt.getEventProperties(o,n));for(var B in T)S[B]=T[B];t&&t.dispatchEvent(S),F[M]&&F[M].call(n,S)}}var Ta=["evt"],se=function(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=t.evt,a=ma(t,Ta);rt.pluginEvent.bind(_)(e,n,Se({dragEl:d,parentEl:q,ghostEl:w,rootEl:z,nextEl:Re,lastDownEl:dt,cloneEl:H,cloneHidden:Ae,dragStarted:We,putSortable:te,activeSortable:_.active,originalEvent:o,oldIndex:ze,oldDraggableIndex:Ke,newIndex:de,newDraggableIndex:De,hideGhostForTarget:Hn,unhideGhostForTarget:jn,cloneNowHidden:function(){Ae=!0},cloneNowShown:function(){Ae=!1},dispatchSortableEvent:function(r){re({sortable:n,name:r,originalEvent:o})}},a))};function re(e){Ea(Se({putSortable:te,cloneEl:H,targetEl:d,rootEl:z,oldIndex:ze,oldDraggableIndex:Ke,newIndex:de,newDraggableIndex:De},e))}var d,q,w,z,Re,dt,H,Ae,ze,de,Ke,De,lt,te,Ye=!1,bt=!1,_t=[],Ie,me,kt,Mt,mn,pn,We,Ve,et,tt=!1,it=!1,ht,oe,It=[],Vt=!1,yt=[],Ct=typeof document<"u",st=In,gn=at||Te?"cssFloat":"float",xa=Ct&&!Nn&&!In&&"draggable"in document.createElement("div"),$n=(function(){if(Ct){if(Te)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}})(),Fn=function(e,n){var t=b(e),o=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),a=Ue(e,0,n),r=Ue(e,1,n),l=a&&b(a),s=r&&b(r),i=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Q(a).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Q(r).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return r&&(s.clear==="both"||s.clear===u)?"vertical":"horizontal"}return a&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||i>
vendor: 12,714 bytes, line 1
1=o&&t[gn]==="none"||r&&t[gn]==="none"&&i+c>o)?"vertical":"horizontal"},Da=function(e,n,t){var o=t?e.left:e.top,a=t?e.right:e.bottom,r=t?e.width:e.height,l=t?n.left:n.top,s=t?n.right:n.bottom,i=t?n.width:n.height;return o===l||a===s||o+r/2===l+i/2},Aa=function(e,n){var t;return _t.some(function(o){var a=o[he].options.emptyInsertThreshold;if(!(!a||qt(o))){var r=Q(o),l=e>=r.left-a&&e<=r.right+a,s=n>=r.top-a&&n<=r.bottom+a;if(l&&s)return t=o}}),t},zn=function(e){function n(a,r){return function(l,s,i,c){var u=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(a==null&&(r||u))return!0;if(a==null||a===!1)return!1;if(r&&a==="clone")return a;if(typeof a=="function")return n(a(l,s,i,c),r)(l,s,i,c);var f=(r?l:s).options.group.name;return a===!0||typeof a=="string"&&a===f||a.join&&a.indexOf(f)>-1}}var t={},o=e.group;(!o||ut(o)!="object")&&(o={name:o}),t.name=o.name,t.checkPull=n(o.pull,!0),t.checkPut=n(o.put),t.revertClone=o.revertClone,e.group=t},Hn=function(){!$n&&w&&b(w,"display","none")},jn=function(){!$n&&w&&b(w,"display","")};Ct&&!Nn&&document.addEventListener("click",function(e){if(bt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),bt=!1,!1},!0);var Ne=function(e){if(d){e=e.touches?e.touches[0]:e;var n=Aa(e.clientX,e.clientY);if(n){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.target=t.rootEl=n,t.preventDefault=void 0,t.stopPropagation=void 0,n[he]._onDragOver(t)}}},Oa=function(e){d&&d.parentNode[he]._isOutsideThisEl(e.target)};function _(e,n){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=Ee({},n),e[he]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fn(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,l){r.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:_.supportPointer!==!1&&"PointerEvent"in window&&!Je,emptyInsertThreshold:5};rt.initializePlugins(this,e,t);for(var o in t)!(o in n)&&(n[o]=t[o]);zn(n);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=n.forceFallback?!1:xa,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?R(e,"pointerdown",this._onTapStart):(R(e,"mousedown",this._onTapStart),R(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(R(e,"dragover",this),R(e,"dragenter",this)),_t.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Ee(this,Sa())}_.prototype={constructor:_,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ve=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,d):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,t=this.el,o=this.options,a=o.preventOnFilter,r=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(l||e).target,i=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=o.filter;if(Pa(t),!d&&!(/mousedown|pointerdown/.test(r)&&e.button!==0||o.disabled)&&!i.isContentEditable&&!(!this.nativeDraggable&&Je&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=pe(s,o.draggable,t,!1),!(s&&s.animated)&&dt!==s)){if(ze=fe(s),Ke=fe(s,o.draggable),typeof c=="function"){if(c.call(this,e,s,this)){re({sortable:n,rootEl:i,name:"filter",targetEl:s,toEl:t,fromEl:t}),se("filter",n,{evt:e}),a&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=pe(i,u.trim(),t,!1),u)return re({sortable:n,rootEl:u,name:"filter",targetEl:s,fromEl:t,toEl:t}),se("filter",n,{evt:e}),!0}),c)){a&&e.cancelable&&e.preventDefault();return}o.handle&&!pe(i,o.handle,t,!1)||this._prepareDragStart(e,l,s)}}},_prepareDragStart:function(e,n,t){var o=this,a=o.el,r=o.options,l=a.ownerDocument,s;if(t&&!d&&t.parentNode===a){var i=Q(t);if(z=a,d=t,q=d.parentNode,Re=d.nextSibling,dt=t,lt=r.group,_.dragged=d,Ie={target:d,clientX:(n||e).clientX,clientY:(n||e).clientY},mn=Ie.clientX-i.left,pn=Ie.clientY-i.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,d.style["will-change"]="all",s=function(){if(se("delayEnded",o,{evt:e}),_.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!dn&&o.nativeDraggable&&(d.draggable=!0),o._triggerDragStart(e,n),re({sortable:o,name:"choose",originalEvent:e}),ue(d,r.chosenClass,!0)},r.ignore.split(",").forEach(function(c){Bn(d,c.trim(),Nt)}),R(l,"dragover",Ne),R(l,"mousemove",Ne),R(l,"touchmove",Ne),R(l,"mouseup",o._onDrop),R(l,"touchend",o._onDrop),R(l,"touchcancel",o._onDrop),dn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),se("delayStart",this,{evt:e}),r.delay&&(!r.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(at||Te))){if(_.eventCanceled){this._onDrop();return}R(l,"mouseup",o._disableDelayedDrag),R(l,"touchend",o._disableDelayedDrag),R(l,"touchcancel",o._disableDelayedDrag),R(l,"mousemove",o._delayedDragTouchMoveHandler),R(l,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&R(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(s,r.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){d&&Nt(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;k(e,"mouseup",this._disableDelayedDrag),k(e,"touchend",this._disableDelayedDrag),k(e,"touchcancel",this._disableDelayedDrag),k(e,"mousemove",this._delayedDragTouchMoveHandler),k(e,"touchmove",this._delayedDragTouchMoveHandler),k(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?R(document,"pointermove",this._onTouchMove):n?R(document,"touchmove",this._onTouchMove):R(document,"mousemove",this._onTouchMove):(R(d,"dragend",this),R(z,"dragstart",this._onDragStart));try{document.selection?ft(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Ye=!1,z&&d){se("dragStarted",this,{evt:n}),this.nativeDraggable&&R(document,"dragover",Oa);var t=this.options;!e&&ue(d,t.dragClass,!1),ue(d,t.ghostClass,!0),_.active=this,e&&this._appendGhost(),re({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(me){this._lastX=me.clientX,this._lastY=me.clientY,Hn();for(var e=document.elementFromPoint(me.clientX,me.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(me.clientX,me.clientY),e!==n);)n=e;if(d.parentNode[he]._isOutsideThisEl(e),n)do{if(n[he]){var t=void 0;if(t=n[he]._onDragOver({clientX:me.clientX,clientY:me.clientY,target:e,rootEl:n}),t&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);jn()}},_onTouchMove:function(e){if(Ie){var n=this.options,t=n.fallbackTolerance,o=n.fallbackOffset,a=e.touches?e.touches[0]:e,r=w&&je(w,!0),l=w&&r&&r.a,s=w&&r&&r.d,i=st&&oe&&vn(oe),c=(a.clientX-Ie.clientX+o.x)/(l||1)+(i?i[0]-It[0]:0)/(l||1),u=(a.clientY-Ie.clientY+o.y)/(s||1)+(i?i[1]-It[1]:0)/(s||1);if(!_.active&&!Ye){if(t&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<t)return;this._onDragStart(e,!0)}if(w){r?(r.e+=c-(kt||0),r.f+=u-(Mt||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var f="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");b(w,"webkitTransform",f),b(w,"mozTransform",f),b(w,"msTransform",f),b(w,"transform",f),kt=c,Mt=u,me=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!w){var e=this.options.fallbackOnBody?document.body:z,n=Q(d,!0,st,!0,e),t=this.options;if(st){for(oe=e;b(oe,"position")==="static"&&b(oe,"transform")==="none"&&oe!==document;)oe=oe.parentNode;oe!==document.body&&oe!==document.documentElement?(oe===document&&(oe=ye()),n.top+=oe.scrollTop,n.left+=oe.scrollLeft):oe=ye(),It=vn(oe)}w=d.cloneNode(!0),ue(w,t.ghostClass,!1),ue(w,t.fallbackClass,!0),ue(w,t.dragClass,!0),b(w,"transition",""),b(w,"transform",""),b(w,"box-sizing","border-box"),b(w,"margin",0),b(w,"top",n.top),b(w,"left",n.left),b(w,"width",n.width),b(w,"height",n.height),b(w,"opacity","0.8"),b(w,"position",st?"absolute":"fixed"),b(w,"zIndex","100000"),b(w,"pointerEvents","none"),_.ghost=w,e.appendChild(w),b(w,"transform-origin",mn/parseInt(w.style.width)*100+"% "+pn/parseInt(w.style.height)*100+"%")}},_onDragStart:function(e,n){var t=this,o=e.dataTransfer,a=t.options;if(se("dragStart",this,{evt:e}),_.eventCanceled){this._onDrop();return}se("setupClone",this),_.eventCanceled||(H=Vn(d),H.removeAttribute("id"),H.draggable=!1,H.style["will-change"]="",this._hideClone(),ue(H,this.options.chosenClass,!1),_.clone=H),t.cloneId=ft(function(){se("clone",t),!_.eventCanceled&&(t.options.removeCloneOnHide||z.insertBefore(H,d),t._hideClone(),re({sortable:t,name:"clone"}))}),!n&&ue(d,a.dragClass,!0),n?(bt=!0,t._loopId=setInterval(t._emulateDragOver,50)):(k(document,"mouseup",t._onDrop),k(document,"touchend",t._onDrop),k(document,"touchcancel",t._onDrop),o&&(o.effectAllowed="move",a.setData&&a.setData.call(t,o,d)),R(document,"drop",t),b(d,"transform","translateZ(0)")),Ye=!0,t._dragStartId=ft(t._dragStarted.bind(t,n,e)),R(document,"selectstart",t),We=!0,Je&&b(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,t=e.target,o,a,r,l=this.options,s=l.group,i=_.active,c=lt===s,u=l.sort,f=te||i,p,v=this,D=!1;if(Vt)return;function S(C,ie){se(C,v,Se({evt:e,isOwner:c,axis:p?"vertical":"horizontal",revert:r,dragRect:o,targetRect:a,canSort:u,fromSortable:f,target:t,completed:M,onMove:function(ve,Me){return ct(z,n,d,o,ve,Q(ve),e,Me)},changed:T},ie))}function F(){S("dragOverAnimationCapture"),v.captureAnimationState(),v!==f&&f.captureAnimationState()}function M(C){return S("dragOverCompleted",{insertion:C}),C&&(c?i._hideClone():i._showClone(v),v!==f&&(ue(d,te?te.options.ghostClass:i.options.ghostClass,!1),ue(d,l.ghostClass,!0)),te!==v&&v!==_.active?te=v:v===_.active&&te&&(te=null),f===v&&(v._ignoreWhileAnimating=t),v.animateAll(function(){S("dragOverAnimationComplete"),v._ignoreWhileAnimating=null}),v!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(t===d&&!d.animated||t===n&&!t.animated)&&(Ve=null),!l.dragoverBubble&&!e.rootEl&&t!==document&&(d.parentNode[he]._isOutsideThisEl(e.target),!C&&Ne(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),D=!0}function T(){de=fe(d),De=fe(d,l.draggable),re({sortable:v,name:"change",toEl:n,newIndex:de,newDraggableIndex:De,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),t=pe(t,l.draggable,n,!0),S("dragOver"),_.eventCanceled)return D;if(d.contains(e.target)||t.animated&&t.animatingX&&t.animatingY||v._ignoreWhileAnimating===t)return M(!1);if(bt=!1,i&&!l.disabled&&(c?u||(r=q!==z):te===this||(this.lastPutMode=lt.checkPull(this,i,d,e))&&s.checkPut(this,i,d,e))){if(p=this._getDirection(e,t)==="vertical",o=Q(d),S("dragOverValid"),_.eventCanceled)return D;if(r)return q=z,F(),this._hideClone(),S("revert"),_.eventCanceled||(Re?z.insertBefore(d,Re):z.appendChild(d)),M(!0);var B=qt(n,l.draggable);if(!B||Na(e,p,this)&&!B.animated){if(B===d)return M(!1);if(B&&n===e.target&&(t=B),t&&(a=Q(t)),ct(z,n,d,o,t,a,e,!!t)!==!1)return F(),B&&B.nextSibling?n.insertBefore(d,B.nextSibling):n.appendChild(d),q=n,T(),M(!0)}else if(B&&Ia(e,p,this)){var I=Ue(n,0,l,!0);if(I===d)return M(!1);if(t=I,a=Q(t),ct(z,n,d,o,t,a,e,!1)!==!1)return F(),n.insertBefore(d,I),q=n,T(),M(!0)}else if(t.parentNode===n){a=Q(t);var N=0,W,j=d.parentNode!==n,le=!Da(d.animated&&d.toRect||o,t.animated&&t.toRect||a,p),X=p?"top":"left",g=fn(t,"top","top")||fn(d,"top","top"),O=g?g.scrollTop:void 0;Ve!==t&&(W=a[X],tt=!1,it=!le&&l.invertSwap||j),N=Ra(e,t,a,p,le?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,it,Ve===t);var L;if(N!==0){var U=fe(d);do U-=N,L=q.children[U];
vendor: 2,465 bytes, line 1
1while(L&&(b(L,"display")==="none"||L===w))}if(N===0||L===t)return M(!1);Ve=t,et=N;var m=t.nextElementSibling,y=!1;y=N===1;var Y=ct(z,n,d,o,t,a,e,y);if(Y!==!1)return(Y===1||Y===-1)&&(y=Y===1),Vt=!0,setTimeout(Ma,30),F(),y&&!m?n.appendChild(d):t.parentNode.insertBefore(d,y?m:t),g&&Pn(g,0,O-g.scrollTop),q=d.parentNode,W!==void 0&&!it&&(ht=Math.abs(W-Q(t)[X])),T(),M(!0)}if(n.contains(d))return M(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){k(document,"mousemove",this._onTouchMove),k(document,"touchmove",this._onTouchMove),k(document,"pointermove",this._onTouchMove),k(document,"dragover",Ne),k(document,"mousemove",Ne),k(document,"touchmove",Ne)},_offUpEvents:function(){var e=this.el.ownerDocument;k(e,"mouseup",this._onDrop),k(e,"touchend",this._onDrop),k(e,"pointerup",this._onDrop),k(e,"touchcancel",this._onDrop),k(document,"selectstart",this)},_onDrop:function(e){var n=this.el,t=this.options;if(de=fe(d),De=fe(d,t.draggable),se("drop",this,{evt:e}),q=d&&d.parentNode,de=fe(d),De=fe(d,t.draggable),_.eventCanceled){this._nulling();return}Ye=!1,it=!1,tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Yt(this.cloneId),Yt(this._dragStartId),this.nativeDraggable&&(k(document,"drop",this),k(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Je&&b(document.body,"user-select",""),b(d,"transform",""),e&&(We&&(e.cancelable&&e.preventDefault(),!t.dropBubble&&e.stopPropagation()),w&&w.parentNode&&w.parentNode.removeChild(w),(z===q||te&&te.lastPutMode!=="clone")&&H&&H.parentNode&&H.parentNode.removeChild(H),d&&(this.nativeDraggable&&k(d,"dragend",this),Nt(d),d.style["will-change"]="",We&&!Ye&&ue(d,te?te.options.ghostClass:this.options.ghostClass,!1),ue(d,this.options.chosenClass,!1),re({sortable:this,name:"unchoose",toEl:q,newIndex:null,newDraggableIndex:null,originalEvent:e}),z!==q?(de>=0&&(re({rootEl:q,name:"add",toEl:q,fromEl:z,originalEvent:e}),re({sortable:this,name:"remove",toEl:q,originalEvent:e}),re({rootEl:q,name:"sort",toEl:q,fromEl:z,originalEvent:e}),re({sortable:this,name:"sort",toEl:q,originalEvent:e})),te&&te.save()):de!==ze&&de>=0&&(re({sortable:this,name:"update",toEl:q,originalEvent:e}),re({sortable:this,name:"sort",toEl:q,originalEvent:e})),_.active&&((de==null||de===-1)&&(de=ze,De=Ke),re({sortable:this,name:"end",toEl:q,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){se("nulling",this),z=d=q=w=Re=H=dt=Ae=Ie=me=We=de=De=ze=Ke=Ve=et=te=lt
vendor: 5,820 bytes, line 1
1=_.dragged=_.ghost=_.clone=_.active=null,yt.forEach(function(e){e.checked=!0}),yt.length=kt=Mt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":d&&(this._onDragOver(e),ka(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,t=this.el.children,o=0,a=t.length,r=this.options;o<a;o++)n=t[o],pe(n,r.draggable,this.el,!1)&&e.push(n.getAttribute(r.dataIdAttr)||La(n));return e},sort:function(e,n){var t={},o=this.el;this.toArray().forEach(function(a,r){var l=o.children[r];pe(l,this.options.draggable,o,!1)&&(t[a]=l)},this),n&&this.captureAnimationState(),e.forEach(function(a){t[a]&&(o.removeChild(t[a]),o.appendChild(t[a]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return pe(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var t=this.options;if(n===void 0)return t[e];var o=rt.modifyOption(this,e,n);typeof o<"u"?t[e]=o:t[e]=n,e==="group"&&zn(t)},destroy:function(){se("destroy",this);var e=this.el;e[he]=null,k(e,"mousedown",this._onTapStart),k(e,"touchstart",this._onTapStart),k(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(k(e,"dragover",this),k(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),_t.splice(_t.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Ae){if(se("hideClone",this),_.eventCanceled)return;b(H,"display","none"),this.options.removeCloneOnHide&&H.parentNode&&H.parentNode.removeChild(H),Ae=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Ae){if(se("showClone",this),_.eventCanceled)return;d.parentNode==z&&!this.options.group.revertClone?z.insertBefore(H,d):Re?z.insertBefore(H,Re):z.appendChild(H),this.options.group.revertClone&&this.animate(d,H),b(H,"display",""),Ae=!1}}};function ka(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function ct(e,n,t,o,a,r,l,s){var i,c=e[he],u=c.options.onMove,f;return window.CustomEvent&&!Te&&!at?i=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(i=document.createEvent("Event"),i.initEvent("move",!0,!0)),i.to=n,i.from=e,i.dragged=t,i.draggedRect=o,i.related=a||n,i.relatedRect=r||Q(n),i.willInsertAfter=s,i.originalEvent=l,e.dispatchEvent(i),u&&(f=u.call(c,i,l)),f}function Nt(e){e.draggable=!1}function Ma(){Vt=!1}function Ia(e,n,t){var o=Q(Ue(t.el,0,t.options,!0)),a=Yn(t.el,t.options,w),r=10;return n?e.clientX<a.left-r||e.clientY<o.top&&e.clientX<o.right:e.clientY<a.top-r||e.clientY<o.bottom&&e.clientX<o.left}function Na(e,n,t){var o=Q(qt(t.el,t.options.draggable)),a=Yn(t.el,t.options,w),r=10;return n?e.clientX>a.right+r||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>a.bottom+r||e.clientX>o.right&&e.clientY>o.top}function Ra(e,n,t,o,a,r,l,s){var i=o?e.clientY:e.clientX,c=o?t.height:t.width,u=o?t.top:t.left,f=o?t.bottom:t.right,p=!1;if(!l){if(s&&ht<c*a){if(!tt&&(et===1?i>u+c*r/2:i<f-c*r/2)&&(tt=!0),tt)p=!0;else if(et===1?i<u+ht:i>f-ht)return-et}else if(i>u+c*(1-a)/2&&i<f-c*(1-a)/2)return Ba(n)}return p=p||l,p&&(i<u+c*r/2||i>f-c*r/2)?i>u+c/2?1:-1:0}function Ba(e){return fe(d)<fe(e)?1:-1}function La(e){for(var n=e.tagName+e.className+e.src+e.href+e.textContent,t=n.length,o=0;t--;)o+=n.charCodeAt(t);return o.toString(36)}function Pa(e){yt.length=0;for(var n=e.getElementsByTagName("input"),t=n.length;t--;){var o=n[t];o.checked&&yt.push(o)}}function ft(e){return setTimeout(e,0)}function Yt(e){return clearTimeout(e)}Ct&&R(document,"touchmove",function(e){(_.active||Ye)&&e.cancelable&&e.preventDefault()});_.utils={on:R,off:k,css:b,find:Bn,is:function(e,n){return!!pe(e,n,e,!1)},extend:_a,throttle:Ln,closest:pe,toggleClass:ue,clone:Vn,index:fe,nextTick:ft,cancelNextTick:Yt,detectDirection:Fn,getChild:Ue};_.get=function(e){return e[he]};_.mount=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];n[0].constructor===Array&&(n=n[0]),n.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(_.utils=Se(Se({},_.utils),o.utils)),rt.mount(o)})};_.create=function(e,n){return new _(e,n)};_.version=pa;var G=[],Ge,$t,Ft=!1,Rt,Bt,St,Qe;function Va(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return e.prototype={dragStarted:function(n){var t=n.originalEvent;this.sortable.nativeDraggable?R(document,"dragover",this._handleAutoScroll):this.options.supportPointer?R(document,"pointermove",this._handleFallbackAutoScroll):t.touches?R(document,"touchmove",this._handleFallbackAutoScroll):R(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var t=n.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?k(document,"dragover",this._handleAutoScroll):(k(document,"pointermove",this._handleFallbackAutoScroll),k(document,"touchmove",this._handleFallbackAutoScroll),k(document,"mousemove",this._handleFallbackAutoScroll)),bn(),vt(),ya()},nulling:function(){St=$t=Ge=Ft=Qe=Rt=Bt=null,G.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,t){var o=this,a=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(a,r);if(St=n,t||this.options.forceAutoScrollFallback||at||Te||Je){Lt(n,this.options,l,t);var s=Oe(l,!0);Ft&&(!Qe||a!==Rt||r!==Bt)&&(Qe&&bn(),Qe=setInterval(function(){var i=Oe(document.elementFromPoint(a,r),
1!0);i!==s&&(s=i,vt()),Lt(n,o.options,i,t)},10),Rt=a,Bt=r)}else{if(!this.options.bubbleScroll||Oe(l,!0)===ye()){vt();return}Lt(n,this.options,Oe(l,!1),!1)}}},Ee(e,{pluginName:"scroll",initializeByDefault:!0})}function vt(){G.forEach(function(e){clearInterval(e.pid)}),G=[]}function bn(){clearInterval(Qe)}var Lt=Ln(function(e,n,t,o){if(n.scroll){var a=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,l=n.scrollSensitivity,s=n.scrollSpeed,i=ye(),c=!1,u;$t!==t&&($t=t,vt(),Ge=n.scroll,u=n.scrollFn,Ge===!0&&(Ge=Oe(t,!0)));var f=0,p=Ge;do{var v=p,D=Q(v),S=D.top,F=D.bottom,M=D.left,T=D.right,B=D.width,I=D.height,N=void 0,W=void 0,j=v.scrollWidth,le=v.scrollHeight,X=b(v),g=v.scrollLeft,O=v.scrollTop;v===i?(N=B<j&&(X.overflowX==="auto"||X.overflowX==="scroll"||X.overflowX==="visible"),W=I<le&&(X.overflowY==="auto"||X.overflowY==="scroll"||X.overflowY==="visible")):(N=B<j&&(X.overflowX==="auto"||X.overflowX==="scroll"),W=I<le&&(X.overflowY==="auto"||X.overflowY==="scroll"));var L=N&&(Math.abs(T-a)<=l&&g+B<j)-(Math.abs(M-a)<=l&&!!g),U=W&&(Math.abs(F-r)<=l&&O+I<le)-(Math.abs(S-r)<=l&&!!O);if(!G[f])for(var m=0;m<=f;m++)G[m]||(G[m]={});(G[f].vx!=L||G[f].vy!=U||G[f].el!==v)&&(G[f].el=v,G[f].vx=L,G[f].vy=U,clearInterval(G[f].pid),(L!=0||U!=0)&&(c=!0,G[f].pid=setInterval((function(){o&&this.layer===0&&_.active._onTouchMove(St);var y=G[this.layer].vy?G[this.layer].vy*s:0,Y=G[this.layer].vx?G[this.layer].vx*s:0;typeof u=="function"&&u.call(_.dragged.parentNode[he],Y,y,e,St,G[this.layer].el)!=="continue"||Pn(G[this.layer].el,Y,y)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&p!==i&&(p=Oe(p,!1)));Ft=c}},30),Xn=function(e){var n=e.originalEvent,t=e.putSortable,o=e.dragEl,a=e.activeSortable,r=e.dispatchSortableEvent,l=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(n){var i=t||a;l();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,u=document.elementFromPoint(c.clientX,c.clientY);s(),i&&!i.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:t}))}};function Wt(){}Wt.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,t=e.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var o=Ue(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),t&&t.animateAll()},drop:Xn};Ee(Wt,{pluginName:"revertOnSpill"});function Gt(){}Gt.prototype={onSpill:function(e){var n=e.dragEl,t=e.putSortable,o=t||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:Xn};Ee(Gt,{pluginName:"removeOnSpill"});_.mount(new Va);_.mount(Gt,Wt);function Ya(e){return e==null?e:JSON.parse(JSON.stringify(e))}function $a(e){Xt()&&eo(e)}function Fa(e){Xt()?Ht(e):_e(e)}let Un=null,qn=null;function _n(e=null,n=null){Un=e,qn=n}function za(){return{data:Un,clonedData:qn}}const yn=Symbol("cloneElement");function Ha(...e){var n,t;const o=(n=Xt())==null?void 0:n.proxy;let a=null;const r=e[0];let[,l,s]=e;Array.isArray(h(l))||(s=l,l=null);let i=null;const{immediate:c=!0,clone:u=Ya,forceFallback:f,fallbackOnBody:p,customUpdate:v}=(t=h(s))!=null?t:{};function D(g){var O;const{from:L,oldIndex:U,item:m}=g,y=Array.from(L.childNodes);a=f&&!p?y.slice(0,-1):y;const Y=h((O=h(l))==null?void 0:O[U]),C=u(Y);_n(Y,C),m[yn]=C}function S(g){const O=g.item[yn];if(!ra(O)){if(Dt(g.item),He(l)){const L=[...h(l)];l.value=ln(L,g.newDraggableIndex,O);return}ln(h(l),g.newDraggableIndex,O)}}function F(g){const{from:O,item:L,oldIndex:U,oldDraggableIndex:m,pullMode:y,clone:Y}=g;if(sn(O,L,U),y==="clone"){Dt(Y);return}if(He(l)){const C=[...h(l)];l.value=rn(C,m);return}rn(h(l),m)}function M(g){if(v){v(g);return}const{from:O,item:L,oldIndex:U,oldDraggableIndex:m,newDraggableIndex:y}=g;if(Dt(L),sn(O,L,U),He(l)){const Y=[...h(l)];l.value=an(Y,m,y);return}an(h(l),m,y)}function T(g){const{newIndex:O,oldIndex:L,from:U,to:m}=g;let y=null;const Y=O===L&&U===m;try{if(Y){let C=null;a?.some((ie,ve)=>{if(C&&a?.length!==m.childNodes.length)return U.insertBefore(C,ie.nextSibling),!0;const Me=m.childNodes[ve];C=m?.replaceChild(ie,Me)})}}catch(C){y=C}finally{a=null}_e(()=>{if(_n(),y)throw y})}const B={onUpdate:M,onStart:D,onAdd:S,onRemove:F,onEnd:T};function I(g){const O=h(r);return g||(g=la(O)?ia(O,o?.$el):O),g&&!ua(g)&&(g=g.$el),g||na("Root element not found"),g}function N(){var g;const O=(g=h(s))!=null?g:{},{immediate:L,clone:U}=O,m=kn(O,["immediate","clone"]);return cn(m,(y,Y)=>{da(y)&&(m[y]=(C,...ie)=>{const ve=za();return ha(C,ve),Y(C,...ie)})}),ca(l===null?{}:B,m)}const W=g=>{g=I(g),i&&j.destroy(),i=new _(g,N())};Xe(()=>s,()=>{i&&cn(N(),(g,O)=>{i?.option(g,O)})},{deep:!0});const j={option:(g,O)=>i?.option(g,O),destroy:()=>{i?.destroy(),i=null},save:()=>i?.save(),toArray:()=>i?.toArray(),closest:(...g)=>i?.closest(...g)},le=()=>j?.option("disabled",!0),X=()=>j?.option("disabled",!1);return Fa(()=>{c&&W()}),$a(j.destroy),Fe({start:W,pause:le,resume:X},j)}const zt=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],ja=["clone","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target","customUpdate",...zt.map(e=>`on${e.replace(/^\S/,n=>n.toUpperCase())}`)],Xa=ke({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:ja,emits:["update:modelValue",...zt],setup(e,{slots:n,emit:t,expose:o,attrs:a}){const r=zt.reduce((u,f)=>{const p=`on${f.replace(/^\S/,v=>v.toUpperCase())}`;return u[p]=(...v)=>t(f,...v),u},{}),l=J(()=>{const u=to(e),{modelValue:f}=u,p=kn(u,["modelValue"]),v=Object.entries(p).reduce((D,[S,F])=>{const M=h(F);return M!==void 0&&(D[S]=M),D},{});return Fe(Fe({},r),aa(Fe(Fe({},a),v)))}),s=J({get:()=>e.modelValue,set:u=>t("update:modelValue",u)}),i=Z(),c=Zn(Ha(e.target||i,s,l));return o(c),()=>{var u;return Kn(e.tag||"div",{ref:i},(u=n?.default)==null?void 0:u.call(n,c))}}}),Ua={class:"reset-shortcuts-modal__content"},qa=ke({__name:"ResetShortcutsConfirmModal",props:Be({loading:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:Be(["confirm"],["update:modelValue"]),setup(e,{emit:n}){const t=wt(e,"modelValue"),o=n,a=()=>{t.value=!1},r=()=>{o("confirm")};return(l,s)=>(E(),ce(h(En),{modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=i=>t.value=i),mode:"modal"},{default:ee(()=>[A(h(Tn),{"trailing-icon2":"icon-close",class:"!ps-5 !pe-3 !py-2",onSecondTrailingBtn:a}),$("div",Ua,[s[3]||(s[3]=$("p",{class:"reset-shortcuts-modal__message"}," آیا می‌خواهید به حالت پیش‌فرض بیت۲۴ تنظیم شود؟ ",-1)),A(h(Ut),{class:"reset-shortcuts-modal__actions"},{default:ee(()=>[A(h(ot),{xs:"6/12",class:"!pe-2 !ps-0"},{default:ee(()=>[A(h(we),{emphasis:"high",size:"40",color:"primary",wide:"",loading:e.loading,disabled:e.loading,onClick:r},{default:ee(()=>[...s[1]||(s[1]=[mt(" حالت پیش‌فرض ",-1)])]),_:1},8,["loading","disabled"])]),_:1}),A(h(ot),{xs:"6/12",class:"!ps-2 !pe-0"},{default:ee(()=>[A(h(we),{emphasis:"medium-outline",size:"40",color:"neutral",wide:"",disabled:e.loading,onClick:a},{default:ee(()=>[...s[2]||(s[2]=[mt(" انصراف ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})])]),_:1},8,["modelValue"]))}}),Wa=Object.assign(Le(qa,[["__scopeId","data-v-2bb3e0af"]]),{__name:"ResetShortcutsConfirmModal"}),Ga={class:"services-shortcut__section"},Qa={class:"services-shortcut__wrapper"},Ja={class:"services-shortcut__header"},Za={key:1,class:"services-shortcut__save-action"},Ka={key:0,class:"services-shortcut__box"}
1,er={key:1,class:"services-shortcut__box"},tr={key:2,class:"services-shortcut__box services-shortcut__card"},nr={class:"services-shortcut__option"},or={class:"services-shortcut__hint"},ar={class:"flex items-center"},rr={class:"services-shortcut__grid"},lr={class:"services-shortcut__drag-handle"},ir={class:"services-shortcut__grid-item services-shortcut__grid-item--static"},sr={key:0,class:"services-shortcut__banner"},cr={class:"services-banner__title"},ur=7,dr=7,hr=ke({__name:"ServicesShortcut",props:Be({shortcuts:{},maxCount:{default:7},minCount:{default:3},isSaving:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},isCustom:{type:Boolean,default:!1}},{editMode:{type:Boolean,default:!1},editModeModifiers:{}}),emits:Be(["save","order-change","reset"],["update:editMode"]),setup(e,{expose:n,emit:t}){const o=e,a=t,r=wt(e,"editMode"),l=Z([]),s=Z(!1),i=Z(!1),c={title:"پیش‌فرض",icon:"icon-rotate-restart"},u=J(()=>Math.max(0,ur-l.value.length)),f=J(()=>l.value.length>o.minCount),p=J(()=>l.value.length>=o.maxCount),v=J(()=>l.value.length<o.minCount),D=J(()=>l.value.length<=o.minCount),S=J(()=>p.value?"برای اضافه کردن، میانبرهای فعلی را حذف کنید."
1:D.value?`حداقل ${o.minCount} خدمت باید انتخاب کنید.`:null),F=m=>m.map(y=>({...y})),M=()=>{l.value=F(o.shortcuts)},T=()=>{a("order-change",F(l.value))};Xe(r,async m=>{m&&(M(),await _e())}),Xe(()=>o.shortcuts,()=>{r.value&&M()});const B=()=>{r.value=!0},I=()=>{v.value||o.isSaving||a("save",F(l.value))},N=()=>{o.isSaving||a("reset")},W=()=>{i.value=!1},j=m=>{!f.value||o.isSaving||(l.value=l.value.filter(y=>y.id!==m).map(y=>({...y})),T())},le=m=>{m.link&&jt(m.link,{external:!0})},X=m=>{s.value||f.value&&j(m.id)},g=()=>{if(!(s.value||o.isSaving)){if(o.isCustom){i.value=!0;return}r.value=!1}},O=m=>{s.value=!0;const Y=(m.item.querySelector(".b-icon-text-btn")??m.item).getBoundingClientRect();requestAnimationFrame(()=>{document.querySelectorAll(".services-shortcut__fallback").forEach(C=>{const ie=C;ie.style.width=`${Y.width}px`})})},L=()=>{setTimeout(()=>{s.value=!1},100),T()};return n({addItem:m=>{!r.value||o.isSaving||p.value||l.value.some(y=>y.id===m.id)||(l.value=[...l.value,{...m}],T())},closeResetModal:W}),(m,y)=>{const Y=ao;return E(),V("section",Ga,[A(h(no),null,{default:ee(()=>[A(h(Ut),null,{default:ee(()=>[A(h(ot),{xs:"full"},{default:ee(()=>[$("div",Qa,[$("div",Ja,[y[2]||(y[2]=$("span",{class:"services-shortcut__title"}," میانبر‌های خانه ",-1)),e.isLoading?(E(),ce(h($e),{key:0,class:"services-shortcut__skeleton-edit-btn"})):r.value?(E(),V("div",Za,[e.isSaving?(E(),ce(h(oo),{key:0,width:20,height:20,color:"var(--b-brand--icn)"})):(E(),ce(h(xn),{key:1,tag:"button",title:"ذخیره",size:"14",disabled:v.value,onClick:I},null,8,["disabled"]))])):e.isLoading?nt("",!0):(E(),ce(h(we),{key:2,emphasis:"low",type:"icon",color:"primary",rounded:"",icon:"icon-edit",size:"40","aria-label":"ویرایش میانبرها",onClick:B}))]),e.isLoading&&!r.value?(E(),V("div",Ka,[(E(),V(ge,null,be(dr,C=>$("div",{key:`shortcut-skeleton-${C}`,class:"services-shortcut__skeleton-item"},[A(h($e),{class:"services-shortcut__skeleton-circle"})])),64))])):r.value?(E(),V("div",tr,[$("div",nr,[$("p",or," تا "+Pt(e.maxCount)+" خدمت می‌توانید به میانبرها اضافه کنید. ",1),$("div",ar,[A(h(xt),{name:"icon-right",size:"20",color:"text-de-tertiary--icn"}),A(h(xt),{name:"icon-hand-click",size:"20",color:"text-de-tertiary--icn"}),A(h(xt),{name:"icon-left",size:"20",color:"text-de-tertiary--icn"})])]),$("div",rr,[A(Y,null,{default:ee(()=>[A(h(Xa),{modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=C=>l.value=C),class:"services-shortcut__sortable",disabled:e.isSaving,animation:200,easing:"cubic-bezier(0.2, 0, 0.2, 1)","force-fallback":!0,"support-pointer":!0,delay:200,"delay-on-touch-only":!1,"fallback-on-body":!0,"fallback-class":"services-shortcut__fallback",handle:".services-shortcut__drag-handle","fallback-tolerance":3,"ghost-class":"services-shortcut__ghost","chosen-class":"services-shortcut__chosen","drag-class":"services-shortcut__drag",onStart:O,onEnd:L},{default:ee(()=>[(E(!0),V(ge,null,be(l.value,C=>(E(),V("div",{key:C.id,class:ro(["services-shortcut__grid-item services-shortcut__grid-item--draggable",{"services-shortcut__grid-item--no-remove":!f.value}])},[$("div",lr,[A(h(Zt),{tag:"button",text:C.name,icon:C.icon,"child-icon":"icon-negative","font-size":"12","child-icon-background":"bg-brand-a--bg",onClick:ie=>X(C)},null,8,["text","icon","onClick"])])],2))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),(E(!0),V(ge,null,be(u.value,C=>(E(),V("div",{key:`empty-${C}`,class:"services-shortcut__grid-item services-shortcut__grid-item--empty"},[...y[3]||(y[3]=[$("span",{class:"services-shortcut__empty-circle"},null,-1)])]))),128)),$("div",ir,[A(h(Zt),{tag:"button",text:c.title,icon:c.icon,"font-size":"12",onClick:g},null,8,["text","icon"])])]),S.value?(E(),V("div",sr,[$("span",cr,Pt(S.value),1)])):nt("",!0)])):(E(),V("div",er,[(E(!0),V(ge,null,be(e.shortcuts,C=>(E(),ce(h(we),{key:C.id,type:"icon",emphasis:"low",color:"neutral",size:"32",icon:C.icon,class:"services-shortcut__icon-btn","aria-label":C.name,onClick:ie=>le(C)},null,8,["icon","aria-label","onClick"]))),128))]))])]),_:1})]),_:1})]),_:1}),A(Wa,{modelValue:i.value,"onUpdate:modelValue":y[1]||(y[1]=C=>i.value=C),loading:e.isSaving,onConfirm:N},null,8,["modelValue","loading"])])}}}),fr=Object.assign(Le(hr,[["__scopeId","data-v-0dbd649d"]]),{__name:"ServicesShortcut"}),Sn=3,vr=7,mr=ke({__name:"services",setup(e){const n=wn(),t=J(()=>n.getTheme);lo({htmlAttrs:{class:t}});const o=io(),{shortcuts:a,handleSaveShortcuts:r,resetToDefaultShortcuts:l,isSaving:s,isLoading:i,isCustom:c,refreshShortcuts:u}=vo(Sn),{getAllCatalogItems:f,fetchCatalog:p}=Dn(),v=Z(!1),D=Z([]),S=Z(""),F=co("shortcutRef"),M=Z(null);let T=null;const B=J(()=>D.value.map(K=>K.id)),I=J(()=>D.value.length<vr),N=K=>
1{D.value=K.map(ne=>({...ne}))},{isSearchActive:W,searchQuery:j,filteredItems:le,showSearchEmptyState:X,openSearch:g,closeSearch:O}=Xo(f),{showSaveModal:L,canSave:U,requestLeave:m,tryLeaveRoute:y,handleSaveConfirm:Y,handleSaveCancel:C}=qo({isEditMode:v,liveShortcuts:D,savedShortcutIdsAtEditStart:S,minCount:Sn,onSave:async K=>{const ne=await r(K);return ne&&N(a.value),ne}});so(K=>s.value?!1:W.value?(O(),!1):y(K));const ie=()=>{m(()=>o.back())},ve=()=>{v.value=!1,g()},Me=()=>{m(()=>ve())},Et=()=>{O()};Ht(()=>{T=M.value?.parentElement??null,T?.classList.add("services-page-layout"),u(),p()}),Cn(()=>{T?.classList.remove("services-page-layout"),T=null}),Xe(v,K=>{if(K){S.value=a.value.map(ne=>ne.id).join(","),N(a.value);return}S.value="",N([])});const x=K=>{N(K)},P=async K=>{await r(K)&&(N(a.value),v.value=!1)},ae=async()=>{await l()&&(N(a.value),F.value?.closeResetModal(),v.value=!1)},xe=K=>{F.value?.addItem(K)};return(K,ne)=>{const Wn=So,Gn=Ho;return E(),V("div",{ref_key:"pageRef",ref:M,class:"services-page"},[A(Gn,{editable:v.value,"selected-ids":B.value,"can-add":I.value,"is-search-active":h(W),"search-query":h(j),"search-results":h(le),"show-search-empty-state":h(X),onAdd:xe},{pin:ee(()=>[h(W)?(E(),ce(Ko,{key:1,modelValue:h(j),"onUpdate:modelValue":ne[0]||(ne[0]=qe=>He(j)?j.value=qe:null),onCancel:Et},null,8,["modelValue"])):(E(),ce(Wn,{key:0,onBack:ie,onSearch:Me})),h(W)?nt("",!0):(E(),ce(fr,{key:2,ref_key:"shortcutRef",ref:F,"edit-mode":v.value,"onUpdate:editMode":ne[1]||(ne[1]=qe=>v.value=qe),shortcuts:h(a),"is-saving":h(s),"is-loading":h(i),"is-custom":h(c),onSave:P,onReset:ae,onOrderChange:x},null,8,["edit-mode","shortcuts","is-saving","is-loading","is-custom"]))]),_:1},8,["editable","selected-ids","can-add","is-search-active","search-query","search-results","show-search-empty-state"]),A(Qo,{modelValue:h(L),"onUpdate:modelValue":ne[2]||(ne[2]=qe=>He(L)?L.value=qe:null),"can-save":h(U),loading:h(s),onConfirm:h(Y),onCancel:h(C)},null,8,["modelValue","can-save","loading","onConfirm","onCancel"])],512)}}}),Mr=Le(mr,[["__scopeId","data-v-7ecfd00a"]]);export{Mr as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.