|
|
import{e,f as t,_ as a,g as n,h as s,w as i,i as r,o as l,c as o,a as u,t as c,n as d,j as v,k as p,l as m,m as g,F as h,p as f,q as y,s as w,d as z,b,v as x}from"./index-77fd5149.js";import{V as C,M as L,Q as k,O as T,S as U,P as M,N as D,g as I,e as S,a as E,b as N,_,d as O,w as P,c as R}from"./dong-027197ce.js";import"./request-eed9b906.js";const W=new C,H=new k,j=new C;class A extends T{constructor(e=document.createElement("div")){super(),this.isCSS3DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.addEventListener("removed",function(){this.traverse(function(e){e.element instanceof e.element.ownerDocument.defaultView.Element&&null!==e.element.parentNode&&e.element.remove()})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}const B=new L,$=new L;class F{constructor(e={}){const t=this;let a,n,s,i;const r={camera:{style:""},objects:new WeakMap},l=void 0!==e.element?e.element:document.createElement("div");l.style.overflow="hidden",this.domElement=l;const o=document.createElement("div");o.style.transformOrigin="0 0",o.style.pointerEvents="none",l.appendChild(o);const u=document.createElement("div");function c(e){return Math.abs(e)<1e-10?0:e}function d(e){const t=e.elements;return"matrix3d("+c(t[0])+","+c(-t[1])+","+c(t[2])+","+c(t[3])+","+c(t[4])+","+c(-t[5])+","+c(t[6])+","+c(t[7])+","+c(t[8])+","+c(-t[9])+","+c(t[10])+","+c(t[11])+","+c(t[12])+","+c(-t[13])+","+c(t[14])+","+c(t[15])+")"}function v(e){const t=e.elements;return"translate(-50%,-50%)"+("matrix3d("+c(t[0])+","+c(t[1])+","+c(t[2])+","+c(t[3])+","+c(-t[4])+","+c(-t[5])+","+c(-t[6])+","+c(-t[7])+","+c(t[8])+","+c(t[9])+","+c(t[10])+","+c(t[11])+","+c(t[12])+","+c(t[13])+","+c(t[14])+","+c(t[15])+")")}function p(e){e.isCSS3DObject&&(e.element.style.display="none");for(let t=0,a=e.children.length;t<a;t++)p(e.children[t])}function m(e,a,n,s){if(!1!==e.visible){if(e.isCSS3DObject){const s=!0===e.layers.test(n.layers),i=e.element;if(i.style.display=!0===s?"":"none",!0===s){let s;e.onBeforeRender(t,a,n),e.isCSS3DSprite?(B.copy(n.matrixWorldInverse),B.transpose(),0!==e.rotation2D&&B.multiply($.makeRotationZ(e.rotation2D)),e.matrixWorld.decompose(W,H,j),B.setPosition(W),B.scale(j),B.elements[3]=0,B.elements[7]=0,B.elements[11]=0,B.elements[15]=1,s=v(B)):s=v(e.matrixWorld);const l=r.objects.get(e);if(void 0===l||l.style!==s){i.style.transform=s;const t={style:s};r.objects.set(e,t)}i.parentNode!==u&&u.appendChild(i),e.onAfterRender(t,a,n)}}for(let t=0,s=e.children.length;t<s;t++)m(e.children[t],a,n)}else p(e)}u.style.transformStyle="preserve-3d",o.appendChild(u),this.getSize=function(){return{width:a,height:n}},this.render=function(e,t){const l=t.projectionMatrix.elements[5]*i;let v,p;t.view&&t.view.enabled?(o.style.transform=`translate( ${-t.view.offsetX*(a/t.view.width)}px, ${-t.view.offsetY*(n/t.view.height)}px )`,o.style.transform+=`scale( ${t.view.fullWidth/t.view.width}, ${t.view.fullHeight/t.view.height} )`):o.style.transform="",!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),t.isOrthographicCamera&&(v=-(t.right+t.left)/2,p=(t.top+t.bottom)/2);const g=t.view&&t.view.enabled?t.view.height/t.view.fullHeight:1,h=t.isOrthographicCamera?`scale( ${g} )scale(`+l+")translate("+c(v)+"px,"+c(p)+"px)"+d(t.matrixWorldInverse):`scale( ${g} )translateZ(`+l+"px)"+d(t.matrixWorldInverse),f=(t.isPerspectiveCamera?"perspective("+l+"px) ":"")+h+"translate("+s+"px,"+i+"px)";r.camera.style!==f&&(u.style.transform=f,r.camera.style=f),m(e,e,t)},this.setSize=function(e,t){a=e,n=t,s=a/2,i=n/2,l.style.width=e+"px",l.style.height=t+"px",o.style.width=e+"px",o.style.height=t+"px",u.style.width=e+"px",u.style.height=t+"px"}}}const Y=e("lottery",()=>{const e=t("idle"),a=t(-1),n=t(!1),s=t([]),i=t([]),r=t(!1),l=t([]);return{lotteryState:e,setLotteryState:function(t){e.value=t},lastRevealedIdx:a,setLastRevealedIdx:function(e){a.value=e},waitingForNextReveal:n
|