Files
bestpc/public_html/assets/builder/index.js

9 lines
395 KiB
JavaScript
Raw Normal View History

2025-05-31 20:29:02 +07:00
var Tt,A,_s,Be,fn,Ss,Es,Ts,Zi,Di,zi,Ps,St={},Cs=[],Yr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Pt=Array.isArray;function be(i,e){for(var t in e)i[t]=e[t];return i}function Ki(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function I(i,e,t){var n,r,a,l={};for(a in e)a=="key"?n=e[a]:a=="ref"?r=e[a]:l[a]=e[a];if(arguments.length>2&&(l.children=arguments.length>3?Tt.call(arguments,2):t),typeof i=="function"&&i.defaultProps!=null)for(a in i.defaultProps)l[a]==null&&(l[a]=i.defaultProps[a]);return wt(i,l,n,r,null)}function wt(i,e,t,n,r){var a={type:i,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++_s,__i:-1,__u:0};return r==null&&A.vnode!=null&&A.vnode(a),a}function Zr(){return{current:null}}function W(i){return i.children}function me(i,e){this.props=i,this.context=e}function at(i,e){if(e==null)return i.__?at(i.__,i.__i+1):null;for(var t;e<i.__k.length;e++)if((t=i.__k[e])!=null&&t.__e!=null)return t.__e;return typeof i.type=="function"?at(i):null}function ks(i){var e,t;if((i=i.__)!=null&&i.__c!=null){for(i.__e=i.__c.base=null,e=0;e<i.__k.length;e++)if((t=i.__k[e])!=null&&t.__e!=null){i.__e=i.__c.base=t.__e;break}return ks(i)}}function ji(i){(!i.__d&&(i.__d=!0)&&Be.push(i)&&!Jt.__r++||fn!=A.debounceRendering)&&((fn=A.debounceRendering)||Ss)(Jt)}function Jt(){for(var i,e,t,n,r,a,l,o=1;Be.length;)Be.length>o&&Be.sort(Es),i=Be.shift(),o=Be.length,i.__d&&(t=void 0,r=(n=(e=i).__v).__e,a=[],l=[],e.__P&&((t=be({},n)).__v=n.__v+1,A.vnode&&A.vnode(t),Ji(e.__P,t,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,a,r??at(n),!!(32&n.__u),l),t.__v=n.__v,t.__.__k[t.__i]=t,As(a,t,l),t.__e!=r&&ks(t)));Jt.__r=0}function Ms(i,e,t,n,r,a,l,o,c,d,u){var h,p,m,f,v,b,g=n&&n.__k||Cs,x=e.length;for(c=Kr(t,e,g,c,x),h=0;h<x;h++)(m=t.__k[h])!=null&&(p=m.__i==-1?St:g[m.__i]||St,m.__i=h,b=Ji(i,m,p,r,a,l,o,c,d,u),f=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&Qi(p.ref,null,m),u.push(m.ref,m.__c||f,m)),v==null&&f!=null&&(v=f),4&m.__u||p.__k===m.__k?c=Ls(m,c,i):typeof m.type=="function"&&b!==void 0?c=b:f&&(c=f.nextSibling),m.__u&=-7);return t.__e=v,c}function Kr(i,e,t,n,r){var a,l,o,c,d,u=t.length,h=u,p=0;for(i.__k=new Array(r),a=0;a<r;a++)(l=e[a])!=null&&typeof l!="boolean"&&typeof l!="function"?(c=a+p,(l=i.__k[a]=typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?wt(null,l,null,null,null):Pt(l)?wt(W,{children:l},null,null,null):l.constructor==null&&l.__b>0?wt(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):l).__=i,l.__b=i.__b+1,o=null,(d=l.__i=Jr(l,t,c,h))!=-1&&(h--,(o=t[d])&&(o.__u|=2)),o==null||o.__v==null?(d==-1&&(r>u?p--:r<u&&p++),typeof l.type!="function"&&(l.__u|=4)):d!=c&&(d==c-1?p--:d==c+1?p++:(d>c?p--:p++,l.__u|=4))):i.__k[a]=null;if(h)for(a=0;a<u;a++)(o=t[a])!=null&&(2&o.__u)==0&&(o.__e==n&&(n=at(o)),Is(o,o));return n}function Ls(i,e,t){var n,r;if(typeof i.type=="function"){for(n=i.__k,r=0;n&&r<n.length;r++)n[r]&&(n[r].__=i,e=Ls(n[r],e,t));return e}i.__e!=e&&(e&&i.type&&!t.contains(e)&&(e=at(i)),t.insertBefore(i.__e,e||null),e=i.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Ce(i,e){return e=e||[],i==null||typeof i=="boolean"||(Pt(i)?i.some(function(t){Ce(t,e)}):e.push(i)),e}function Jr(i,e,t,n){var r,a,l=i.key,o=i.type,c=e[t];if(c===null&&i.key==null||c&&l==c.key&&o==c.type&&(2&c.__u)==0)return t;if(n>(c!=null&&(2&c.__u)==0?1:0))for(r=t-1,a=t+1;r>=0||a<e.length;){if(r>=0){if((c=e[r])&&(2&c.__u)==0&&l==c.key&&o==c.type)return r;r--}if(a<e.length){if((c=e[a])&&(2&c.__u)==0&&l==c.key&&o==c.type)return a;a++}}return-1}function gn(i,e,t){e[0]=="-"?i.setProperty(e,t??""):i[e]=t==null?"":typeof t!="number"||Yr.test(e)?t:t+"px"}function At(i,e,t,n,r){var a;e:if(e=="style")if(typeof t=="string")i.style.cssText=t;else{if(typeof n=="string"&&(i.style.cssText=n=""),n)for(e in n)t&&e in t||gn(i.style,e,"");if(t)for(e in t)n&&t[e]==n[e]||gn(i.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")a=e!=(e=e.replace(Ts,"$1")),e=e.toLowerCase()in i||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),i.l||(i.l={}),i.l[e+a]=t,t?n?t.u=n.u:(t.u=Zi,i.addEv
Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let h=Ye(),p;if(e){let x=typeof e=="string"?ut(e):e;V(d==="/"||((g=x.pathname)==null?void 0:g.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${x.pathname}" was given in the \`location\` prop.`),p=x}else p=h;let m=p.pathname||"/",f=m;if(d!=="/"){let x=d.replace(/^\//,"").split("/");f="/"+m.replace(/^\//,"").split("/").slice(x.length).join("/")}let v=Js(i,{pathname:f});we(u||v!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),we(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let b=fl(v&&v.map(x=>Object.assign({},x,{params:Object.assign({},o,x.params),pathname:ke([d,r.encodeLocation?r.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?d:ke([d,r.encodeLocation?r.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),a,t,n);return e&&b?I(kt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},b):b}function ul(){let i=yl(),e=nl(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),t=i instanceof Error?i.stack:null,n="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",i),l=I(W,null,I("p",null,"💿 Hey developer 👋"),I("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",I("code",{style:a},"ErrorBoundary")," or"," ",I("code",{style:a},"errorElement")," prop on your route.")),I(W,null,I("h2",null,"Unexpected Application Error!"),I("h3",{style:{fontStyle:"italic"}},e),t?I("pre",{style:r},t):null,l)}var hl=I(ul,null),pl=class extends me{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,e){return e.location!==i.location||e.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:e.error,location:e.location,revalidation:i.revalidation||e.revalidation}}componentDidCatch(i,e){console.error("React Router caught the following error during render",i,e)}render(){return this.state.error!==void 0?I(Le.Provider,{value:this.props.routeContext},I(rn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ml({routeContext:i,match:e,children:t}){let n=B(ht);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),I(Le.Provider,{value:i},t)}function fl(i,e=[],t=null,n=null){if(i==null){if(!t)return null;if(t.errors)i=t.matches;else if(e.length===0&&!t.initialized&&t.matches.length>0)i=t.matches;else return null}let r=i,a=t==null?void 0:t.errors;if(a!=null){let c=r.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);V(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),r=r.slice(0,Math.min(r.length,c+1))}let l=!1,o=-1;if(t)for(let c=0;c<r.length;c++){let d=r[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(o=c),d.route.id){let{loaderData:u,errors:h}=t,p=d.route.loader&&!u.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||p){l=!0,o>=0?r=r.slice(0,o+1):r=[r[0]];break}}}return r.reduceRight((c,d,u)=>{let h,p=!1,m=null,f=null;t&&(h=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||hl,l&&(o<0&&u===0?(or
2025-05-28 15:30:26 +07:00
<div class="fancybox__backdrop"></div>
<div class="fancybox__carousel"></div>
<div class="fancybox__footer"></div>
2025-05-31 20:29:02 +07:00
</div>`},trapFocus:!0,wheel:"zoom"};var K,ee;(function(i){i[i.Init=0]="Init",i[i.Ready=1]="Ready",i[i.Closing=2]="Closing",i[i.CustomClosing=3]="CustomClosing",i[i.Destroy=4]="Destroy"})(K||(K={})),function(i){i[i.Loading=0]="Loading",i[i.Opening=1]="Opening",i[i.Ready=2]="Ready",i[i.Closing=3]="Closing"}(ee||(ee={}));let ss="",yt=!1,$t=!1,$e=null;const Rr=()=>{let i="",e="";const t=z.getInstance();if(t){const n=t.carousel,r=t.getSlide();if(n&&r){let a=r.slug||void 0,l=r.triggerEl||void 0;e=a||t.option("slug")||"",!e&&l&&l.dataset&&(e=l.dataset.fancybox||""),e&&e!=="true"&&(i="#"+e+(!a&&n.slides.length>1?"-"+(r.index+1):""))}}return{hash:i,slug:e,index:1}},ri=()=>{const i=new URL(document.URL).hash,e=i.slice(1).split("-"),t=e[e.length-1],n=t&&/^\+?\d+$/.test(t)&&parseInt(e.pop()||"1",10)||1;return{hash:i,slug:e.join("-"),index:n}},Dr=()=>{const{slug:i,index:e}=ri();if(!i)return;let t=document.querySelector(`[data-slug="${i}"]`);if(t&&t.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),z.getInstance())return;const n=document.querySelectorAll(`[data-fancybox="${i}"]`);n.length&&(t=n[e-1],t&&t.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))},zr=()=>{if(z.defaults.Hash===!1)return;const i=z.getInstance();if((i==null?void 0:i.options.Hash)===!1)return;const{slug:e,index:t}=ri(),{slug:n}=Rr();i&&(e===n?i.jumpTo(t-1):(yt=!0,i.close())),Dr()},jr=()=>{$e&&clearTimeout($e),queueMicrotask(()=>{zr()})},rs=()=>{window.addEventListener("hashchange",jr,!1),setTimeout(()=>{zr()},500)};_t&&(/complete|interactive|loaded/.test(document.readyState)?rs():document.addEventListener("DOMContentLoaded",rs));const Ht="is-zooming-in";class Fr extends ge{onCreateSlide(e,t,n){const r=this.instance.optionFor(n,"src")||"";n.el&&n.type==="image"&&typeof r=="string"&&this.setImage(n,r)}onRemoveSlide(e,t,n){n.panzoom&&n.panzoom.destroy(),n.panzoom=void 0,n.imageEl=void 0}onChange(e,t,n,r){j(this.instance.container,Ht);for(const a of t.slides){const l=a.panzoom;l&&a.index!==n&&l.reset(.35)}}onClose(){var e;const t=this.instance,n=t.container,r=t.getSlide();if(!n||!n.parentElement||!r)return;const{el:a,contentEl:l,panzoom:o,thumbElSrc:c}=r;if(!a||!c||!l||!o||o.isContentLoading||o.state===F.Init||o.state===F.Destroy)return;o.updateMetrics();let d=this.getZoomInfo(r);if(!d)return;this.instance.state=K.CustomClosing,n.classList.remove(Ht),n.classList.add("is-zooming-out"),l.style.backgroundImage=`url('${c}')`;const u=n.getBoundingClientRect();(((e=window.visualViewport)===null||e===void 0?void 0:e.scale)||1)===1&&Object.assign(n.style,{position:"absolute",top:`${n.offsetTop+window.scrollY}px`,left:`${n.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${u.width}px`,height:`${u.height}px`,overflow:"hidden"});const{x:h,y:p,scale:m,opacity:f}=d;if(f){const v=((b,g,x,y)=>{const w=g-b,N=y-x;return k=>x+((k-b)/w*N||0)})(o.scale,m,1,0);o.on("afterTransform",()=>{l.style.opacity=v(o.scale)+""})}o.on("endAnimation",()=>{t.destroy()}),o.target.a=m,o.target.b=0,o.target.c=0,o.target.d=m,o.panTo({x:h,y:p,scale:m,friction:f?.2:.33,ignoreBounds:!0}),o.isResting&&t.destroy()}setImage(e,t){const n=this.instance;e.src=t,this.process(e,t).then(r=>{const{contentEl:a,imageEl:l,thumbElSrc:o,el:c}=e;if(n.isClosing()||!a||!l)return;a.offsetHeight;const d=!!n.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")&&c){c.addEventListener("contextmenu",p=>{p.preventDefault()});const h=document.createElement("div");M(h,"fancybox-protected"),a.appendChild(h)}if(o&&d){const h=r.contentRect,p=Math.max(h.fullWidth,h.fullHeight);let m=null;!d.opacity&&p>1200&&(m=document.createElement("img"),M(m,"fancybox-ghost"),m.src=o,a.appendChild(m));const f=()=>{m&&(M(m,"f-fadeFastOut"),setTimeout(()=>{m&&(m.remove(),m=null)},200))};(u=o,new Promise((v,b)=>{const g=new Image;g.onload=v,g.onerror=b,g.src=u})).then(()=>{n.hideLoading(e),e.state=ee.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then(()=>{f(),this.instance.done(e)},()=>{}),m&&setTimeout(()=>{f()},p>2500?800:200)},()=>{n.hideLoading(e),n.revealContent(e)})}else{const h
<source src="{{src}}" type="{{format}}" />Sorry, your browser doesn't support embedded videos.</video>`,videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},Gc=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class Br extends ge{onBeforeInitSlide(e,t,n){this.processType(n)}onCreateSlide(e,t,n){this.setContent(n)}onClearContent(e,t){t.xhr&&(t.xhr.abort(),t.xhr=null);const n=t.iframeEl;n&&(n.onload=n.onerror=null,n.src="//about:blank",t.iframeEl=null);const r=t.contentEl,a=t.placeholderEl;if(t.type==="inline"&&r&&a)r.classList.remove("fancybox__content"),getComputedStyle(r).getPropertyValue("display")!=="none"&&(r.style.display="none"),setTimeout(()=>{a&&(r&&a.parentNode&&a.parentNode.insertBefore(r,a),a.remove())},0),t.contentEl=void 0,t.placeholderEl=void 0;else for(;t.el&&t.el.firstChild;)t.el.removeChild(t.el.firstChild)}onSelectSlide(e,t,n){n.state===ee.Ready&&this.playVideo()}onUnselectSlide(e,t,n){var r,a;if(n.type===ft){try{(a=(r=n.el)===null||r===void 0?void 0:r.querySelector("video"))===null||a===void 0||a.pause()}catch{}return}let l;n.type===ze?l={method:"pause",value:"true"}:n.type===Ee&&(l={event:"command",func:"pauseVideo"}),l&&n.iframeEl&&n.iframeEl.contentWindow&&n.iframeEl.contentWindow.postMessage(JSON.stringify(l),"*"),n.poller&&clearTimeout(n.poller)}onDone(e,t){e.isCurrentSlide(t)&&!e.isClosing()&&this.playVideo()}onRefresh(e,t){t.slides.forEach(n=>{n.el&&(this.resizeIframe(n),this.setAspectRatio(n))})}onMessage(e){try{let t=JSON.parse(e.data);if(e.origin==="https://player.vimeo.com"){if(t.event==="ready")for(let n of Array.from(document.getElementsByClassName("fancybox__iframe")))n instanceof HTMLIFrameElement&&n.contentWindow===e.source&&(n.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&t.event==="onReady"){const n=document.getElementById(t.id);n&&(n.dataset.ready="true")}}catch{}}loadAjaxContent(e){const t=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);const n=this.instance,r=new XMLHttpRequest;n.showLoading(e),r.onreadystatechange=function(){r.readyState===XMLHttpRequest.DONE&&n.state===K.Ready&&(n.hideLoading(e),r.status===200?n.setContent(e,r.responseText):n.setError(e,r.status===404?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const a=e.ajax||null;r.open(a?"POST":"GET",t+""),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.send(a),e.xhr=r}setInlineContent(e){let t=null;if(ie(e.src))t=e.src;else if(typeof e.src=="string"){const n=e.src.split("#",2).pop();t=n?document.getElementById(n):null}if(t){if(e.type==="clone"||t.closest(".fancybox__slide")){t=t.cloneNode(!0);const n=t.dataset.animationName;n&&(t.classList.remove(n),delete t.dataset.animationName);let r=t.getAttribute("id");r=r?`${r}--clone`:`clone-${this.instance.id}-${e.index}`,t.setAttribute("id",r)}else if(t.parentNode){const n=document.createElement("div");n.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(n,t),e.placeholderEl=n}this.instance.setContent(e,t)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){const{src:t,el:n}=e;if(!t||typeof t!="string"||!n)return;n.classList.add("is-loading");const r=this.instance,a=document.createElement("iframe");a.className="fancybox__iframe",a.setAttribute("id",`fancybox__iframe_${r.id}_${e.index}`);for(const[o,c]of Object.entries(this.optionFor(e,"iframeAttr")||{}))a.setAttribute(o,c);a.onerror=()=>{r.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=a;const l=this.optionFor(e,"preload");if(e.type!=="iframe"||l===!1)return a.setAttribute("src",e.src+""),r.setContent(e,a,!1),this.resizeIframe(e),void r.revealContent(e);r.showLoading(e),a.onload=()=>{if(!a.src.length)return;const o=a.dataset.ready!=="true";a.dataset.ready="true",this.resizeIframe(e),o?r.revealContent(e):r.hideLoading(e)},a.setAttribute("src",t),r.setContent(e,a,!1)}resizeIframe(e){const{type:t,iframeEl:n}=e;if(t===Ee||t===ze)return;const