PageSourceSearch

https://www.name.com/_nuxt/Cttnd8Nb.js

js name.com collected 2026-09-24 10:21:39 UTC 9,280 bytes, 1 lines download raw bytes

1import{p as e,A as t,as as a,l,ak as o,e as s,ax as n,J as i,I as r,o as u,a as d,z as c,aR as m,an as p,L as f,bv as v,at as h,al as w,bw as x,bx as g,by as b,a0 as y,b as V,bz as k,bA as C,y as I,d as D,w as _,D as S,N as B,k as A,O as $,F as O,H as z,P as N,bB as W,br as X,K as H}from"./U_BMSM8o.js";function L(s,n){const i=l(!1),r=l(!1),u=l(!1),d=l(0),c=l(0),m=l(Date.now()),p=l(),f=(e=t(s))=>{e?.removeEventListener("wheel",g)},v=(e=t(s))=>{e?.addEventListener("wheel",g,{passive:!0})},h=()=>{d.value=0,c.value=0,i.value=!1,r.value=!1,u.value=!1,p.value=void 0},w=o(e=>{n.onWheelEnd?.(e),x()},100),x=()=>{f(),v(),h()},g=e=>{p.value=Date.now()-m.value,d.value=e.deltaX,c.value=e.deltaY,i.value||(m.value=Date.now(),i.value=!0,n.onWheelStart?.(e)),r.value||u.value||(Math.abs(d.value)>1?r.value=!0:Math.abs(c.value)>1&&(u.value=!0)),n.onWheel?.(e),r.value&&(e=>{n.onWheelX?.(e)})(e),u.value&&(e=>{n.onWheelY?.(e)})(e),w(e)};return e(()=>t(s),(e,t)=>{t&&f(t),e&&v(),h()},{immediate:!0}),{isWheeling:a(i),isWheelingX:a(r),isWheelingY:a(u),lengthX:a(d),lengthY:a(c),elapsed:a(p),stop:f,reset:x}}var q=s({...s({inheritAttrs:!1}),__name:"NCarouselDot",props:{current:{type:Boolean}},setup(e){const a=e,l=n(i({class:r(()=>({"cursor-pointer w-3 h-3 rounded-full inline-block mx-2 z-20 transition-all":!0,"bg-green-700-auto":a.current,"bg-black-auto opacity-40 hover:opacity-80":!a.current}))}));return(e,a)=>(u(),d("div",c({class:"n-carousel-dot"},t(l)),null,16))}}),E=s({props:{modelValue:{type:Number,required:!0},childCount:{type:Number,required:!0},duration:{type:Number,required:!0},twClassesDisabled:{type:String,default:""},optimize:{type:[Boolean,String],default:!1},dragOffset:{type:Number,default:0}},setup(t,{expose:a}){const o=i({childCount:m(t,"childCount"),modelValue:m(t,"modelValue"),targetIndex:1,leftOffset:1,items:[],transitionDisabled:!1,forceDirection:null,swipeStop:void 0,paused:!1,watchStopHandle:void 0}),s=l(),n=p(f(t,"twClassesDisabled"),"opacity-60 scale-90",{required:!0});function u(e=o.modelValue){const t=o.childCount-1;let a=e;return e<0&&(a=t+(1+e)%o.childCount),e>t&&(a=e%o.childCount),a}function d(e=o.modelValue){const t=u(e);return o.modelValue===t||(o.modelValue=t,!1)}function c(e,t){const a=u(e);return t?.index===a?t:i({index:a,key:g(),current:r(()=>o.modelValue===a)})}function b(e=o.modelValue-1){o.forceDirection="prev",d(e)&&(o.targetIndex-=1,o.items[o.targetIndex].index!==o.modelValue&&(o.items[o.targetIndex].index!==o.modelValue+1&&(o.items.unshift(c(o.modelValue+1)),o.leftOffset+=1),o.items.unshift(c(o.modelValue)),o.leftOffset+=1),o.items[o.targetIndex]=c(e,o.items[o.targetIndex]),0===o.targetIndex&&(o.targetIndex=1,o.leftOffset+=1,o.items.unshift(c(o.modelValue-1))),o.forceDirection=null)}function y(e=o.modelValue+1){o.forceDirection="next",d(e)&&(o.targetIndex+=1,o.items[o.targetIndex].index!==o.modelValue&&(o.items[o.targetIndex].index!==o.modelValue-1&&(o.items.push(c(o.modelValue-1)),o.targetIndex+=1),o.items.push(c(o.modelValue)),o.targetIndex+=1),o.targetIndex===o.items.length-1&&o.items.push(c(o.modelValue+1)),o.forceDirection=null)}function V(e,t=e){o.paused=!1,o.transitionDisabled||("next"!==o.forceDirection&&(t>e||"prev"===o.forceDirection)?b(e):(t<e||"next"===o.forceDirection)&&y(e),Math.abs(e-t)>1&&Math.abs(e-t)<=o.childCount-1&&(o.paused=!0))}function k(e){o.transitionDisabled=!0;const a=t.modelValue,l=[c(a-1,e?.[0]),c(a,e?.[1]),c(a+1,e?.[2])];return o.items=l,o.targetIndex=1,o.leftOffset=1,setTimeout(()=>{o.transitionDisabled=!1,a!==o.modelValue&&V(o.modelValue,a)},50),l}e(()=>o.paused,()=>{o.watchStopHandle?.(),o.paused?o.watchStopHandle=x(()=>o.modelValue,(e,t=e)=>{o.paused=!1,V(e,t)},{throttle:r(()=>o.paused?t.duration:0)}):o.watchStopHandle=e(()=>o.modelValue,V)},{immediate:!0}),v(()=>[o.modelValue,o.paused],()=>k([o.items[o.targetIndex-1],o.items[o.targetIndex],o.items[o.targetIndex+1]]),{debounce:t.duration}),a({prev:b,next:y});const C=n.other("opacity"),I=n.other("scale");return()=>{const e=h({flattenFragments:!0});if(o.childCount=e.length,o.items.length||k(),"preserve"===t.optimize)return w("div",e.map((e,a)=>w("div",{class:a===t.modelValue?"":"hidden"},e)));if(t.optimize||1===e.length){const t=o.items.find(e=>e.current)?.index;return w("div",void 0===t?"":e[t])}return w("div",{class:"relative n-carousel-items-wrap",style:{transform:`translateX(${100*-o.leftOffset}%)`}},w("div",{class:["whitespace-nowrap relative n-carousel-items",t.dragOffset||o.transitionDisabled?"transition-none":"transition-all"],ref:s,style:{"transition-duration":`${t.duration}ms !important`,transform:`\n                translateX(calc(${100*-(o.targetIndex-o.leftOffset)}% - ${t.dragOffset}px))\n              `}},o.items.map((a,l)=>w("div",{key:a.key,class:["transition-none inline-block w-full align-top",!a.current&&"max-h-0"],style:{"transition-duration":`${t.duration}ms !important`},onClick(){l>o.targetIndex&&y(a.index),l<o.targetIndex&&b(a.index)}},w("div",{class:["transition-all",!a.current&&C.value,!a.current&&I.value],style:{"transition-duration":`${t.duration}ms !important`}},w(e[a.index]))))))}}}),M={class:"n-carousel-flex"},P={key:0,class:"n-carousel-arrow mr-2"},T={class:"n-carousel-wrapper grow relative rounded overflow-x-hidden overflow-y-hidden"},Y={key:0,class:"n-carousel-pagination absolute bottom-0 left-0 w-full px-5 py-2 text-center text-white"},F=["onClick"],R={key:1,class:"n-carousel-arrow ml-2"},j={key:0,class:"arrows-below-container flex w-full justify-end pt-2 pr-2"},U={class:"flex items-center space-x-2"},J=H(s({__name:"NCarousel",props:{modelValue:{default:0},duration:{default:500},twClassesDisabled:{default:void 0},showArrows:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},insetArrows:{type:Boolean,default:!1},swipeable:{type:Boolean,default:!0},wheelable:{type:Boolean,default:!0},keyable:{type:Boolean,default:!1},optimize:{type:[Boolean,String],default:!1},cycleDuration:{default:void 0},visibleItems:{default:void 0},arrowsBelow:{type:Boolean,default:!1}},setup(t){const a=t,o=i({modelValue:m(a,"modelValue"),timeout:void 0,swipeStop:void 0,wheelStop:void 0,childCount:0}),s=l(null),n=l(null),r={onClick:()=>n.value?.prev()},c={onClick:()=>n.value?.next()},p=e=>e-1===o.modelValue,v=l(0),h=l(!1);return e(f(o,"modelValue"),()=>{o.timeout&&(clearTimeout(o.timeout),o.timeout=void 0),a.cycleDuration&&(o.timeout=setTimeout(()=>n.value?.next(),a.cycleDuration))}),e(f(a,"cycleDuration"),(e,t)=>{!t&&e&&(o.timeout=setTimeout(()=>n.value?.next(),a.cycleDuration))},{immediate:!0}),b("ArrowLeft",()=>{a.keyable&&n.value?.prev()}),b("ArrowRight",()=>{a.keyable&&n.value?.next()}),y(()=>{e(f(a,"swipeable"),t=>{t?function(){o.swipeStop?.();const{stop:t,lengthX:a,isSwiping:l}=W(s,{onSwipeEnd(e,t){"left"===t?n.value?.next():"right"===t&&n.value?.prev()}});e(a,e=>{v.value=e}),e(l,e=>{h.value=e}),o.swipeStop=t}():o.swipeStop?.()},{immediate:!0}),e(f(a,"wheelable"),e=>{e?function(){o.wheelStop?.();const e=X(()=>{n.value?.prev()},150),t=X(()=>{n.value?.next()},150),{stop:a,lengthX:l}=L(s,{onWheelX(){l.value<-4?e():l.value>4&&t()}});o.wheelStop=a}():o.wheelStop?.()},{immediate:!0})}),(e,l)=>(u(),d("div",{ref_key:"carouselFrame",ref:s,class:N(["n-carousel",{"n-carousel-inset-arrows":t.insetArrows}])},[V("div",M,[t.showArrows&&o.childCount>1&&!t.arrowsBelow?(u(),d("div",P,[V("span",k(C(r)),[I(e.$slots,"arrow-left",{},()=>[D(B,{class:"text-black-auto text-xl",text:"",icon:"","aria-label":"Previous Item"},{default:_(()=>[D(S,{img:"arrow_left"})]),_:1})],!0)],16)])):A("",!0),V("div",T,[V("div",{class:"mx-auto",style:$({width:100/(a.visibleItems||1)+"%"})},[D(E,{ref_key:"carouselItems",ref:n,modelValue:o.modelValue,"onUpdate:modelValue":l[0]||(l[0]=e=>o.modelValue=e),"child-count":o.childCount,"onUpdate:childCount":l[1]||(l[1]=e=>
1o.childCount=e),optimize:t.optimize,"tw-classes-disabled":t.twClassesDisabled,duration:t.duration,"drag-offset":h.value?v.value:0},{default:_(()=>[I(e.$slots,"default",{},void 0,!0)]),_:3},8,["modelValue","child-count","optimize","tw-classes-disabled","duration","drag-offset"])],4),t.showPagination&&o.childCount>1?(u(),d("div",Y,[(u(!0),d(O,null,z(o.childCount,t=>(u(),d("span",{key:t,onClick:e=>o.modelValue=t-1},[I(e.$slots,"dot",{current:p(t)},()=>[D(q,{current:p(t)},null,8,["current"])],!0)],8,F))),128))])):A("",!0)]),t.showArrows&&o.childCount>1&&!t.arrowsBelow?(u(),d("div",R,[V("span",k(C(c)),[I(e.$slots,"arrow-right",{},()=>[D(B,{class:"text-black-auto text-xl",text:"",icon:"","aria-label":"Next Item"},{default:_(()=>[D(S,{img:"arrow_right"})]),_:1})],!0)],16)])):A("",!0)]),t.arrowsBelow&&t.showArrows&&o.childCount>1?(u(),d("div",j,[I(e.$slots,"arrows-below",{arrowLeftAttrs:r,arrowRightAttrs:c},()=>[V("div",U,[V("span",k(C(r)),[D(B,{text:"",class:"text-black-auto text-3xl"},{default:_(()=>[D(S,{img:"arrow_circle_left",class:"text-black-dark"})]),_:1})],16),V("span",k(C(c)),[D(B,{text:"",class:"text-black-auto text-3xl"},{default:_(()=>[D(S,{img:"arrow_circle_right",class:"text-black-dark"})]),_:1})],16)])],!0)])):A("",!0)],2))}}),[["__scopeId","data-v-db6b4937"]]),K=s({...s({inheritAttrs:!1}),__name:"NCarouselItem",setup(e){const a=n({class:"w-full"});return(e,l)=>(u(),d("div",c({class:"n-carousel-item"},t(a)),[I(e.$slots,"default")],16))}});export{K as N,J as a};

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.