import{d as e,u as t,c as n,k as o,l as r,e as i,f as a,w as l,j as s,h as c,n as u,x as d,y as p,B as h,R as f,N as g,m,G as v,r as b,a1 as y,ao as x,ap as w,a6 as _,z as S,F as E,A as C,aq as D,L as k,ar as T,as as I,I as O,aj as N,at as A,E as M,a5 as P,q as j,au as z,an as R,av as X,H as F,aw as Y,ax as B}from"./index-b8ec63bc.js";import{_ as W}from"./u-icon.45222ba8.js";import{_ as H}from"./_plugin-vue_export-helper.1b428a4d.js";import{_ as L,a as U}from"./tabbar.vue_vue_type_script_setup_true_lang.55f9f6e5.js";import{c as G}from"./article.7a47f2fe.js";import{_ as q}from"./u-avatar.e909919c.js";import{_ as $}from"./app-link.vue_vue_type_script_setup_true_lang.f540e6c2.js";const V=H(e({__name:"index",props:["component","index"],setup(e){const b=e,y=t(),x=n((()=>"decorate"==y.mode?y.value[b.index]:b.component));return(e,t)=>{const n=m,b=v,y=o(r("u-icon"),W);return i(),a(n,{class:"diy-text bg-white",onClick:t[1]||(t[1]=e=>s(g)(s(x).link))},{default:l((()=>["style-1"==s(x).style?(i(),a(n,{key:0,class:"p-[20rpx]"},{default:l((()=>[c(n,{class:"",style:u({fontSize:2*s(x).fontSize+"rpx",color:s(x).textColor,fontWeight:s(x).fontWeight,textAlign:s(x).textAlign})},{default:l((()=>[d(p(s(x).text),1)])),_:1},8,["style"])])),_:1})):h("",!0),"style-2"==s(x).style?(i(),a(n,{key:1,class:"p-[20rpx] flex items-center"},{default:l((()=>[c(n,{class:"max-w-[200rpx] truncate",style:u({fontSize:2*s(x).fontSize+"rpx",color:s(x).textColor,fontWeight:s(x).fontWeight})},{default:l((()=>[d(p(s(x).text),1)])),_:1},8,["style"]),c(b,{class:"ml-[16rpx] max-w-[300rpx] truncate",style:u({color:s(x).subTitle.color,fontSize:2*s(x).subTitle.fontSize+"rpx"})},{default:l((()=>[d(p(s(x).subTitle.text),1)])),_:1},8,["style"]),s(x).more.isShow?(i(),a(n,{key:0,class:"ml-auto text-right flex items-center",style:u({color:s(x).more.color}),onClick:t[0]||(t[0]=f((e=>s(g)(s(x).more.link)),["stop"]))},{default:l((()=>[c(b,{class:"max-w-[200rpx] truncate text-[24rpx] mr-[8rpx]"},{default:l((()=>[d(p(s(x).more.text),1)])),_:1}),c(y,{name:"arrow-right",size:"12",style:u({color:s(x).more.color})},null,8,["style"])])),_:1},8,["style"])):h("",!0)])),_:1})):h("",!0)])),_:1})}}}),[["__scopeId","data-v-e68571eb"]]),Z=e({__name:"index",props:["component","index"],setup(e){const o=e,r=t(),d=n((()=>"decorate"==r.mode?r.value[o.index]:o.component)),p=b(0),h=e=>{p.value=e.detail.current},f=b("");y((()=>{g(),"decorate"==r.mode&&x((()=>d.value),((e,t)=>{e&&"ImageAds"==e.componentName&&g()}))}));const g=()=>{"decorate"==r.mode&&d.value.list.forEach(((e,t)=>{""==e.imageUrl&&(e.imageUrl="static/resource/images/diy/figure.png",e.imgWidth=690,e.imgHeight=330)})),(()=>{let e=0;f.value="0rpx",d.value.list.forEach(((t,n)=>{D({success:e=>{var n=t.imgHeight/t.imgWidth;t.width=e.windowWidth,t.height=t.width*n}}),(0==e||e>t.height)&&(e=t.height)})),d.value.list.forEach(((t,n)=>{t.height=2*e+"rpx",f.value=2*e+"rpx"}))})()};return(e,t)=>{const n=k,o=m,r=T,p=I;return i(),a(o,{class:"image-ads"},{default:l((()=>[1==s(d).list.length?(i(),a(o,{key:0,class:"simple-graph-wrap",onClick:t[0]||(t[0]=e=>s(w)(s(d).list[0].link))},{default:l((()=>[c(n,{src:s(_)(s(d).list[0].imageUrl),style:u({height:s(d).list[0].height}),mode:"widthFix",class:"w-full","show-menu-by-longpress":!0},null,8,["src","style"])])),_:1})):(i(),a(p,{key:1,class:"swiper",style:u({height:f.value}),autoplay:"true",circular:"true",onChange:h},{default:l((()=>[(i(!0),S(E,null,C(s(d).list,(e=>(i(),a(r,{class:"swiper-item",key:e.id,onClick:t=>s(w)(e.link)},{default:l((()=>[c(o,{class:"item",style:u({height:e.height})},{default:l((()=>[c(n,{src:s(_)(e.imageUrl),mode:"scaleToFill",class:"w-full h-full"},null,8,["src"])])),_:2},1032,["style"])])),_:2},1032,["onClick"])))),128))])),_:1},8,["style"]))])),_:1})}}}),K=H(e({__name:"index",props:["component","index"],setup(e){const f=e,g=t(),D=n((()=>"decorate"==g.mode?g.value[f.index]:f.component)),j=b(0),z=e=>{j.value=e.detail.current},R=b("");y((()=>{X(),"decorate"==g.mode&&x((()=>D.value),((e,t)=>{e&&"GraphicNav"==e.componentName&&X()}))}));const X=()=>{var e;"decorate"==g.mode&&D.value.list.forEach(((e,t)=>{""==e.imageUrl&&(e.imageUrl="static/resource/images/diy/figure.png")})),e=0,"graphic"==D.value.mode?e=(49+D.value.imageSize)*D.value.pageCount:"img"==D.value.mode?e=(22+D.value.imageSize)*D.value.pageCount:"text"==D.value.mode&&(e=43*D.value.pageCount),R.value=e+"rpx"},F=e=>{if(e.url){if("pages/member/index"==N()&&!A())return void M().setLoginBack({url:e.url});w(e)}};return(t,n)=>{const f=k,g=v,b=m,y=o(r("u-icon"),W),x=T,w=I,N=P;return i(),a(b,{class:"bg-white"},{default:l((()=>["vertical"==s(D).layout?(i(),a(b,{key:0,class:"graphic-nav py-[20rpx] px-[30rpx] box-border relative"},{default:l((()=>[s(D).navTitle?(i(),S("div",{key:0,class:"py-2 border-solid border-b border-t-0 border-l-0 border-r-0 border-gray-200"},p(s(D).navTitle),1)):h("",!0),(i(!0),S(E,null,C(s(D).list,((e,t)=>(i(),a(b,{class:O(["graphic-nav-item flex items-center justify-between py-2 border-solid border-l-0 border-r-0 border-b-0 border-gray-200",[0==t?"border-t-0":"border-t"]]),key:e.id,onClick:t=>F(e.link)},{default:l((()=>["text"!=s(D).mode?(i(),a(b,{key:0,class:"graphic-img relative flex items-center w-10 h-10 mr-[20rpx]",style:u({width:2*s(D).imageSize+"rpx",height:2*s(D).imageSize+"rpx"})},{default:l((()=>[c(f,{src:s(_)(e.imageUrl),mode:"aspectFill",style:u({maxWidth:2*s(D).imageSize+"rpx",maxHeight:2*s(D).imageSize+"rpx",borderRadius:2*s(D).aroundRadius+"rpx"})},null,8,["src","style"]),e.label.control?(i(),a(g,{key:0,class:"tag absolute -top-[10rpx] -right-[24rpx] text-white rounded-[24rpx] rounded-bl-none transform scale-80 py-1 px-2 text-xs",style:u({color:e.label.textColor,backgroundImage:"linear-gradient("+e.label.bgColorStart+","+e.label.bgColorEnd+")"})},{default:l((()=>[d(p(e.label.text),1)])),_:2},1032,["style"])):h("",!0)])),_:2},1032,["style"])):h("",!0),"img"!=s(D).mode?(i(),a(g,{key:1,class:"graphic-text w-full truncate leading-normal",style:u({fontSize:2*s(D).font.size+"rpx",fontWeight:s(D).font.weight,color:s(D).font.color})},{default:l((()=>[d(p(e.title),1)])),_:2},1032,["style"])):h("",!0),c(y,{name:"arrow-right"})])),_:2},1032,["class","onClick"])))),128))])),_:1})):"horizontal"==s(D).layout&&"pageSlide"==s(D).showStyle?(i(),a(w,{key:1,class:"graphic-nav p-2 box-border relative",circular:"","indicator-dots":!1,style:u({height:R.value}),onChange:z},{default:l((()=>[(i(!0),S(E,null,C(Math.ceil(s(D).list.length/(s(D).pageCount*s(D).rowCount)),((t,n)=>(i(),a(x,{class:"graphic-nav-wrap flex flex-wrap"},{default:l((()=>[e.index>=[(t-1)*(s(D).pageCount*s(D).rowCount)]&&e.index<[t*(s(D).pageCount*s(D).rowCount)]?(i(!0),S(E,{key:0},C(s(D).list,((e,t)=>(i(),a(b,{class:O(["graphic-nav-item flex flex-col items-center box-border py-2",[s(D).mode]]),key:e.id,style:u({width:100/s(D).rowCount+"%"}),onClick:t=>F(e.link)},{default:l((()=>["text"!=s(D).mode?(i(),a(b,{key:0,class:"graphic-img relative flex items-center justify-center w-10 h-10",style:u({width:2*s(D).imageSize+"rpx",height:2*s(D).imageSize+"rpx"})},{default:l((()=>[c(f,{src:s(_)(e.imageUrl),mode:"aspectFill",style:u({maxWidth:2*s(D).imageSize+"rpx",maxHeight:2*s(D).imageSize+"rpx",borderRadius:2*s(D).aroundRadius+"rpx"})},null,8,["src","style"]),e.label.control?(i(),a(g,{key:0,class:"tag absolute -top-[10rpx] -right-[24rpx] text-white rounded-[24rpx] rounded-bl-none transform scale-80 py-1 px-2 text-xs",style:u({color:e.label.textColor,backgroundImage:"linear-gradient("+e.label.bgColorStart+","+e.label.bgColorEnd+")"})},{default:l((()=>[d(p(e.label.text),1)])),_:2},1032,["style"])):h("",!0)])),_:2},1032,["style"])):h("",!0),"img"!=s(D).mode?(i(),a(g,{key:1,class:O(["graphic-text w-full text-center truncate leading-normal",{"pt-1.5":"text"!=s(D).mode}]),style:u({fontSize:2*s(D).font.size+"rpx",fontWeight:s(D).font.weight,color:s(D).font.color})},{default:l((()=>[d(p(e.title),1)])),_:2},1032,["class","style"])):h("",!0)])),_:2},1032,["class","style","onClick"])))),128)):h("",!0)])),_:2},1024)))),256))])),_:1},8,["style"])):(i(),a(N,{key:2,"scroll-x":"singleSlide"==s(D).showStyle,class:O(["graphic-nav","graphic-nav-"+s(D).showStyle])},{default:l((()=>[(i(!0),S(E,null,C(s(D).list,((e,t)=>(i(),a(b,{class:O(["graphic-nav-item flex flex-col items-center box-border py-2",{"flex-shrink-0":"singleSlide"==s(D).showStyle}]),key:e.id,style:u({width:100/s(D).rowCount+"%"}),onClick:t=>F(e.link)},{default:l((()=>["text"!=s(D).mode?(i(),a(b,{key:0,class:"graphic-img relative flex items-center justify-center w-10 h-10",style:u({width:2*s(D).imageSize+"rpx",height:2*s(D).imageSize+"rpx"})},{default:l((()=>[c(f,{src:s(_)(e.imageUrl),mode:"aspectFill",style:u({maxWidth:2*s(D).imageSize+"rpx",maxHeight:2*s(D).imageSize+"rpx",borderRadius:2*s(D).aroundRadius+"rpx"})},null,8,["src","style"]),e.label.control?(i(),a(g,{key:0,class:O(["tag absolute -top-[10rpx] -right-[24rpx] text-white rounded-[24rpx] rounded-bl-none transform scale-80 py-1 px-2 text-xs"]),style:u({color:e.label.textColor,backgroundImage:"linear-gradient("+e.label.bgColorStart+","+e.label.bgColorEnd+")"})},{default:l((()=>[d(p(e.label.text),1)])),_:2},1032,["style"])):h("",!0)])),_:2},1032,["style"])):h("",!0),"img"!=s(D).mode?(i(),a(g,{key:1,class:O(["graphic-text w-full text-center truncate leading-normal",{"pt-1.5":"text"!=s(D).mode}]),style:u({fontSize:2*s(D).font.size+"rpx",fontWeight:s(D).font.weight,color:s(D).font.color})},{default:l((()=>[d(p(e.title),1)])),_:2},1032,["class","style"])):h("",!0)])),_:2},1032,["class","style","onClick"])))),128))])),_:1},8,["scroll-x","class"]))])),_:1})}}}),[["__scopeId","data-v-51eae080"]]),Q=H(e({__name:"index",props:["component","index"],setup(e){const u=e,f=t(),y=b([]),x=n((()=>"decorate"==f.mode?f.value[u.index]:u.component));(()=>{if("decorate"==f.mode){let e={image:"",summary:"文章摘要",title:"文章标题",create_time:"2023-03-28 09:00:00"};y.value.push(e)}else(()=>{let e={};"diy"==x.value.sources?e.ids=x.value.articleIds:e.limit=x.value.count,G(e).then((e=>{y.value=e.data}))})()})();return(e,t)=>{const n=o(r("u-icon"),W),u=o(r("u--image"),L),f=m,b=v;return i(),a(f,null,{default:l((()=>[(i(!0),S(E,null,C(y.value,((e,t)=>(i(),a(f,{key:e.id,class:O(["bg-white flex align-center p-[20rpx]",{"border-solid border-t-0 border-l-0 border-r-0 border-b border-gray-200":y.value.length-1!==t}]),onClick:t=>{return n=e.id,void g({url:"/pages/article/detail",param:{id:n}});var n}},{default:l((()=>[e.image?(i(),a(u,{key:0,width:"260rpx",height:"200rpx",src:s(_)(e.image),model:"aspectFill"},{error:l((()=>[c(n,{name:"photo",color:"#999",size:"50"})])),_:2},1032,["src"])):h("",!0),c(f,{class:"flex-1 flex flex-col justify-between ml-[20rpx]"},{default:l((()=>[c(f,{class:"text-[32rpx] leading-[1.3] multi-hidden mt-[4rpx]"},{default:l((()=>[d(p(e.title),1)])),_:2},1024),c(f,{class:"text-[28rx] using-hidden mb-[auto] mt-[20rpx] text-gray-500"},{default:l((()=>[d(p(e.summary),1)])),_:2},1024),c(f,{class:"text-[24rpx] text-gray-400 flex justify-between mb-[10rpx]"},{default:l((()=>[c(b,{class:""},{default:l((()=>[d(p(e.create_time),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1032,["class","onClick"])))),128))])),_:1})}}}),[["__scopeId","data-v-a2931f1c"]]),J=e({__name:"index",props:["component","index"],setup(e){const o=e,r=t(),l=n((()=>"decorate"==r.mode?r.value[o.index]:o.component)),c=n((()=>{var e="";return e+="height:"+2*l.value.height+"rpx"}));return(e,t)=>{const n=m;return i(),a(n,{style:u(s(c))},null,8,["style"])}}}),ee=e({__name:"index",props:["component","index"],setup(e){const u=e,h=t();n((()=>"decorate"==h.mode?h.value[u.index]:u.component));const f=j(),{query:y}=z(location.href);y.code&&R()&&X({code:y.code}).then((e=>{f.getMemberInfo()}));const x=n((()=>"decorate"==h.mode?{headimg:"",nickname:"昵称",balance:0,point:0}:f.info)),w=()=>{M().setLoginBack({url:"/pages/member/index"})};b(!1);const S=()=>{R()?M().getAuthCode("snsapi_userinfo"):g({url:"/pages/member/personal"})};return(e,t)=>{const n=o(r("u-avatar"),q),u=m,h=v,f=o(r("app-link"),$);return i(),a(u,null,{default:l((()=>[s(x)?(i(),a(u,{key:0,class:"bg-primary"},{default:l((()=>[c(u,{class:"flex p-[30rpx]"},{default:l((()=>[c(n,{src:s(_)(s(x).headimg),size:"60",leftIcon:"none",onClick:S},null,8,["src"]),c(u,{class:"flex-1 w-0 mx-[20rpx] flex justify-center flex-col"},{default:l((()=>[c(u,{class:"text-white font-bold text-lg"},{default:l((()=>[d(p(s(x).nickname),1)])),_:1}),c(u)])),_:1}),c(u,{class:"flex items-center"},{default:l((()=>[c(f,{url:"/pages/setting/index"},{default:l((()=>[c(h,{class:"iconfont iconshezhi text-white text-lg ml-[10rpx]"})])),_:1})])),_:1})])),_:1}),c(u,{class:"flex m-[30rpx] mb-0 py-[30rpx] bg-white rounded-lg rounded-b-none"},{default:l((()=>[c(u,{class:"flex-1 text-center"},{default:l((()=>[c(u,{class:"font-bold"},{default:l((()=>[c(f,{url:"/pages/member/point"},{default:l((()=>[d(p(parseInt(s(x).point)),1)])),_:1})])),_:1}),c(u,{class:"text-sm mt-[10rpx]"},{default:l((()=>[c(f,{url:"/pages/member/point"},{default:l((()=>[d(p(s(F)("point")),1)])),_:1})])),_:1})])),_:1}),c(u,{class:"flex-1 text-center"},{default:l((()=>[c(u,{class:"font-bold"},{default:l((()=>[c(f,{url:"/pages/member/balance"},{default:l((()=>[d(p(s(Y)(s(x).balance)),1)])),_:1})])),_:1}),c(u,{class:"text-sm mt-[10rpx]"},{default:l((()=>[c(f,{url:"/pages/member/balance"},{default:l((()=>[d(p(s(F)("balance")),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})):(i(),a(u,{key:1,class:"flex p-[30rpx] bg-primary",onClick:w},{default:l((()=>[c(n,{src:"",size:"60"}),c(u,{class:"flex-1 w-0 mx-[20rpx] flex justify-center flex-col"},{default:l((()=>[c(u,{class:"text-white font-bold text-lg"},{default:l((()=>[d(p(s(F)("login"))+"/"+p(s(F)("register")),1)])),_:1})])),_:1})])),_:1}))])),_:1})}}}); /**! * Sortable 1.15.0 * @author RubaXa * @author owenm * @license MIT */ function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ne(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function le(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var se=le(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ce=le(/Edge/i),ue=le(/firefox/i),de=le(/safari/i)&&!le(/chrome/i)&&!le(/android/i),pe=le(/iP(ad|od|hone)/i),he=le(/chrome/i)&&le(/android/i),fe={capture:!1,passive:!1};function ge(e,t,n){e.addEventListener(t,n,!se&&fe)}function me(e,t,n){e.removeEventListener(t,n,!se&&fe)}function ve(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function be(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ye(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&ve(e,t):ve(e,t))||o&&e===n)return e;if(e===n)break}while(e=be(e))}return null}var xe,we=/\s+/g;function _e(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(we," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(we," ")}}function Se(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function Ee(e,t){var n="";if("string"==typeof e)n=e;else do{var o=Se(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function Ce(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,i=o.length;if(n)for(;r=i:r<=i))return o;if(o===De())break;o=Me(o,!1)}return!1}function Ie(e,t,n,o){for(var r=0,i=0,a=e.children;i2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=ae(n,He);We.pluginEvent.bind(zt)(e,t,ne({dragEl:Ge,parentEl:qe,ghostEl:$e,rootEl:Ve,nextEl:Ze,lastDownEl:Ke,cloneEl:Qe,cloneHidden:Je,dragStarted:pt,putSortable:it,activeSortable:zt.active,originalEvent:o,oldIndex:et,oldDraggableIndex:nt,newIndex:tt,newDraggableIndex:ot,hideGhostForTarget:At,unhideGhostForTarget:Mt,cloneNowHidden:function(){Je=!0},cloneNowShown:function(){Je=!1},dispatchSortableEvent:function(e){Ue({sortable:t,name:e,originalEvent:o})}},r))};function Ue(e){!function(e){var t=e.sortable,n=e.rootEl,o=e.name,r=e.targetEl,i=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,p=e.originalEvent,h=e.putSortable,f=e.extraEventProperties;if(t=t||n&&n[Xe]){var g,m=t.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||se||ce?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=l||n,g.item=r||n,g.clone=i,g.oldIndex=s,g.newIndex=c,g.oldDraggableIndex=u,g.newDraggableIndex=d,g.originalEvent=p,g.pullMode=h?h.lastPutMode:void 0;var b=ne(ne({},f),We.getEventProperties(o,t));for(var y in b)g[y]=b[y];n&&n.dispatchEvent(g),m[v]&&m[v].call(t,g)}}(ne({putSortable:it,cloneEl:Qe,targetEl:Ge,rootEl:Ve,oldIndex:et,oldDraggableIndex:nt,newIndex:tt,newDraggableIndex:ot},e))}var Ge,qe,$e,Ve,Ze,Ke,Qe,Je,et,tt,nt,ot,rt,it,at,lt,st,ct,ut,dt,pt,ht,ft,gt,mt,vt=!1,bt=!1,yt=[],xt=!1,wt=!1,_t=[],St=!1,Et=[],Ct="undefined"!=typeof document,Dt=pe,kt=ce||se?"cssFloat":"float",Tt=Ct&&!he&&!pe&&"draggable"in document.createElement("div"),It=function(){if(Ct){if(se)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ot=function(e,t){var n=Se(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=Ie(e,0,t),i=Ie(e,1,t),a=r&&Se(r),l=i&&Se(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+ke(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+ke(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[kt]||i&&"none"===n[kt]&&s+c>o)?"vertical":"horizontal"},Nt=function(e){function t(e,n){return function(o,r,i,a){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,r,i,a),n)(o,r,i,a);var s=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;o&&"object"==oe(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},At=function(){!It&&$e&&Se($e,"display","none")},Mt=function(){!It&&$e&&Se($e,"display","")};Ct&&!he&&document.addEventListener("click",(function(e){if(bt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),bt=!1,!1}),!0);var Pt=function(e){if(Ge){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,i=e.clientY,yt.some((function(e){var t=e[Xe].options.emptyInsertThreshold;if(t&&!Oe(e)){var n=ke(e),o=r>=n.left-t&&r<=n.right+t,l=i>=n.top-t&&i<=n.bottom+t;return o&&l?a=e:void 0}})),a);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Xe]._onDragOver(n)}}var r,i,a},jt=function(e){Ge&&Ge.parentNode[Xe]._isOutsideThisEl(e.target)};function zt(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ie({},t),e[Xe]=this;var n={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 Ot(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(e,t){e.setData("Text",t.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:!1!==zt.supportPointer&&"PointerEvent"in window&&!de,emptyInsertThreshold:5};for(var o in We.initializePlugins(this,e,n),n)!(o in t)&&(t[o]=n[o]);for(var r in Nt(t),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!t.forceFallback&&Tt,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?ge(e,"pointerdown",this._onTapStart):(ge(e,"mousedown",this._onTapStart),ge(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(ge(e,"dragover",this),ge(e,"dragenter",this)),yt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ie(this,Fe())}function Rt(e,t,n,o,r,i,a,l){var s,c,u=e[Xe],d=u.options.onMove;return!window.CustomEvent||se||ce?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=r||t,s.relatedRect=i||ke(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function Xt(e){e.draggable=!1}function Ft(){St=!1}function Yt(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Bt(e){return setTimeout(e,0)}function Wt(e){return clearTimeout(e)}zt.prototype={constructor:zt,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(ht=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Ge):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(function(e){Et.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var o=t[n];o.checked&&Et.push(o)}}(n),!Ge&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!de||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=ye(l,o.draggable,n,!1))&&l.animated||Ke===l)){if(et=Ne(l),nt=Ne(l,o.draggable),"function"==typeof c){if(c.call(this,e,l,this))return Ue({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),Le("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=ye(s,o.trim(),n,!1))return Ue({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),Le("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());o.handle&&!ye(s,o.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var o,r=this,i=r.el,a=r.options,l=i.ownerDocument;if(n&&!Ge&&n.parentNode===i){var s=ke(n);if(Ve=i,qe=(Ge=n).parentNode,Ze=Ge.nextSibling,Ke=n,rt=a.group,zt.dragged=Ge,at={target:Ge,clientX:(t||e).clientX,clientY:(t||e).clientY},ut=at.clientX-s.left,dt=at.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ge.style["will-change"]="all",o=function(){Le("delayEnded",r,{evt:e}),zt.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!ue&&r.nativeDraggable&&(Ge.draggable=!0),r._triggerDragStart(e,t),Ue({sortable:r,name:"choose",originalEvent:e}),_e(Ge,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){Ce(Ge,e.trim(),Xt)})),ge(l,"dragover",Pt),ge(l,"mousemove",Pt),ge(l,"touchmove",Pt),ge(l,"mouseup",r._onDrop),ge(l,"touchend",r._onDrop),ge(l,"touchcancel",r._onDrop),ue&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ge.draggable=!0),Le("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(ce||se))o();else{if(zt.eventCanceled)return void this._onDrop();ge(l,"mouseup",r._disableDelayedDrag),ge(l,"touchend",r._disableDelayedDrag),ge(l,"touchcancel",r._disableDelayedDrag),ge(l,"mousemove",r._delayedDragTouchMoveHandler),ge(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&ge(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ge&&Xt(Ge),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;me(e,"mouseup",this._disableDelayedDrag),me(e,"touchend",this._disableDelayedDrag),me(e,"touchcancel",this._disableDelayedDrag),me(e,"mousemove",this._delayedDragTouchMoveHandler),me(e,"touchmove",this._delayedDragTouchMoveHandler),me(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?ge(document,"pointermove",this._onTouchMove):ge(document,t?"touchmove":"mousemove",this._onTouchMove):(ge(Ge,"dragend",this),ge(Ve,"dragstart",this._onDragStart));try{document.selection?Bt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(vt=!1,Ve&&Ge){Le("dragStarted",this,{evt:t}),this.nativeDraggable&&ge(document,"dragover",jt);var n=this.options;!e&&_e(Ge,n.dragClass,!1),_e(Ge,n.ghostClass,!0),zt.active=this,e&&this._appendGhost(),Ue({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(lt){this._lastX=lt.clientX,this._lastY=lt.clientY,At();for(var e=document.elementFromPoint(lt.clientX,lt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(lt.clientX,lt.clientY))!==t;)t=e;if(Ge.parentNode[Xe]._isOutsideThisEl(e),t)do{if(t[Xe]){if(t[Xe]._onDragOver({clientX:lt.clientX,clientY:lt.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Mt()}},_onTouchMove:function(e){if(at){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,i=$e&&Ee($e,!0),a=$e&&i&&i.a,l=$e&&i&&i.d,s=Dt&&mt&&Ae(mt),c=(r.clientX-at.clientX+o.x)/(a||1)+(s?s[0]-_t[0]:0)/(a||1),u=(r.clientY-at.clientY+o.y)/(l||1)+(s?s[1]-_t[1]:0)/(l||1);if(!zt.active&&!vt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))o.right+r||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+r}(e,r,this)&&!g.animated){if(g===Ge)return N(!1);if(g&&i===e.target&&(a=g),a&&(n=ke(a)),!1!==Rt(Ve,i,Ge,t,a,n,e,!!a))return O(),g&&g.nextSibling?i.insertBefore(Ge,g.nextSibling):i.appendChild(Ge),qe=i,A(),N(!0)}else if(g&&function(e,t,n){var o=ke(Ie(n.el,0,n.options,!0)),r=10;return t?e.clientXu+c*i/2:sd-gt)return-ft}else if(s>u+c*(1-r)/2&&sd-c*i/2))return s>u+c/2?1:-1;return 0}(e,a,n,r,w?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,wt,ht===a),0!==v){var C=Ne(Ge);do{C-=v,y=qe.children[C]}while(y&&("none"===Se(y,"display")||y===$e))}if(0===v||y===a)return N(!1);ht=a,ft=v;var D=a.nextElementSibling,k=!1,T=Rt(Ve,i,Ge,t,a,n,e,k=1===v);if(!1!==T)return 1!==T&&-1!==T||(k=1===T),St=!0,setTimeout(Ft,30),O(),k&&!D?i.appendChild(Ge):a.parentNode.insertBefore(Ge,k?D:a),S&&ze(S,0,E-S.scrollTop),qe=Ge.parentNode,void 0===b||wt||(gt=Math.abs(b-ke(a)[_])),A(),N(!0)}if(i.contains(Ge))return N(!1)}return!1}function I(l,s){Le(l,h,ne({evt:e,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:d,fromSortable:p,target:a,completed:N,onMove:function(n,o){return Rt(Ve,i,Ge,t,n,ke(n),e,o)},changed:A},s))}function O(){I("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function N(t){return I("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(h),h!==p&&(_e(Ge,it?it.options.ghostClass:c.options.ghostClass,!1),_e(Ge,l.ghostClass,!0)),it!==h&&h!==zt.active?it=h:h===zt.active&&it&&(it=null),p===h&&(h._ignoreWhileAnimating=a),h.animateAll((function(){I("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===Ge&&!Ge.animated||a===i&&!a.animated)&&(ht=null),l.dragoverBubble||e.rootEl||a===document||(Ge.parentNode[Xe]._isOutsideThisEl(e.target),!t&&Pt(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function A(){tt=Ne(Ge),ot=Ne(Ge,l.draggable),Ue({sortable:h,name:"change",toEl:i,newIndex:tt,newDraggableIndex:ot,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){me(document,"mousemove",this._onTouchMove),me(document,"touchmove",this._onTouchMove),me(document,"pointermove",this._onTouchMove),me(document,"dragover",Pt),me(document,"mousemove",Pt),me(document,"touchmove",Pt)},_offUpEvents:function(){var e=this.el.ownerDocument;me(e,"mouseup",this._onDrop),me(e,"touchend",this._onDrop),me(e,"pointerup",this._onDrop),me(e,"touchcancel",this._onDrop),me(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;tt=Ne(Ge),ot=Ne(Ge,n.draggable),Le("drop",this,{evt:e}),qe=Ge&&Ge.parentNode,tt=Ne(Ge),ot=Ne(Ge,n.draggable),zt.eventCanceled||(vt=!1,wt=!1,xt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Wt(this.cloneId),Wt(this._dragStartId),this.nativeDraggable&&(me(document,"drop",this),me(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),de&&Se(document.body,"user-select",""),Se(Ge,"transform",""),e&&(pt&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),$e&&$e.parentNode&&$e.parentNode.removeChild($e),(Ve===qe||it&&"clone"!==it.lastPutMode)&&Qe&&Qe.parentNode&&Qe.parentNode.removeChild(Qe),Ge&&(this.nativeDraggable&&me(Ge,"dragend",this),Xt(Ge),Ge.style["will-change"]="",pt&&!vt&&_e(Ge,it?it.options.ghostClass:this.options.ghostClass,!1),_e(Ge,this.options.chosenClass,!1),Ue({sortable:this,name:"unchoose",toEl:qe,newIndex:null,newDraggableIndex:null,originalEvent:e}),Ve!==qe?(tt>=0&&(Ue({rootEl:qe,name:"add",toEl:qe,fromEl:Ve,originalEvent:e}),Ue({sortable:this,name:"remove",toEl:qe,originalEvent:e}),Ue({rootEl:qe,name:"sort",toEl:qe,fromEl:Ve,originalEvent:e}),Ue({sortable:this,name:"sort",toEl:qe,originalEvent:e})),it&&it.save()):tt!==et&&tt>=0&&(Ue({sortable:this,name:"update",toEl:qe,originalEvent:e}),Ue({sortable:this,name:"sort",toEl:qe,originalEvent:e})),zt.active&&(null!=tt&&-1!==tt||(tt=et,ot=nt),Ue({sortable:this,name:"end",toEl:qe,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Le("nulling",this),Ve=Ge=qe=$e=Ze=Qe=Ke=Je=at=lt=pt=tt=ot=et=nt=ht=ft=it=rt=zt.dragged=zt.ghost=zt.clone=zt.active=null,Et.forEach((function(e){e.checked=!0})),Et.length=st=ct=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ge&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,i=this.options;o-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){if(!vn(e))return!1;var t=hn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)}function kn(e,t,n){if(!vn(n))return!1;var o=typeof t;return!!("number"==o?Dn(n)&&function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Cn.test(e))&&e>-1&&e%1==0&&e"decorate"==u.mode?u:c.data));return y((()=>{if("decorate"==u.mode){var e=document.getElementById("componentList");const t=zt.create(e,{group:"draggable-element",animation:200,onEnd:e=>{let n=u.value[e.oldIndex];u.value.splice(e.oldIndex,1),u.value.splice(e.newIndex,0,n),B((()=>{t.sort(An(u.value.length).map((e=>e.toString()))),u.postMessage(e.newIndex,u.value[e.newIndex])}))}})}})),(e,t)=>{const n=o(r("diy-text"),V),c=o(r("diy-image-ads"),Z),p=o(r("diy-graphic-nav"),K),f=o(r("diy-article"),Q),g=o(r("diy-horz-blank"),J),v=o(r("diy-member-info"),ee),b=m,y=o(r("tabbar"),U);return i(),a(b,{class:"diy-group",id:"componentList"},{default:l((()=>[(i(!0),S(E,null,C(s(d).value,((e,t)=>(i(),a(b,{key:e.id,onClick:n=>s(u).changeCurrentIndex(t,e),class:O(["draggable-element relative cursor-move",{selected:s(u).currentIndex==t,decorate:"decorate"==s(u).mode}])},{default:l((()=>["Text"==e.componentName?(i(),a(n,{key:0,component:e,index:t},null,8,["component","index"])):h("",!0),"ImageAds"==e.componentName?(i(),a(c,{key:1,component:e,index:t},null,8,["component","index"])):h("",!0),"GraphicNav"==e.componentName?(i(),a(p,{key:2,component:e,index:t},null,8,["component","index"])):h("",!0),"Article"==e.componentName?(i(),a(f,{key:3,component:e,index:t},null,8,["component","index"])):h("",!0),"HorzBlank"==e.componentName?(i(),a(g,{key:4,component:e,index:t},null,8,["component","index"])):h("",!0),"MemberInfo"==e.componentName?(i(),a(v,{key:5,component:e,index:t},null,8,["component","index"])):h("",!0)])),_:2},1032,["onClick","class"])))),128)),""==s(u).mode?(i(),a(y,{key:0})):h("",!0)])),_:1})}}}),[["__scopeId","data-v-523eabd0"]]);export{Mn as _};