PageSourceSearch

https://ufabet.mobile/react/assets/ModalHuay.DbDfhdOS.js

js ufabet.mobile collected 2026-10-04 20:34:45 UTC 4,275 bytes, 14 lines download raw bytes

1import{r as c,j as r}from"./vendor-react.ELhBuE2q.js";import{S as Y}from"./SheetModalPortal.8DggCGEj.js";import{b as C,n as S,o as k,A as M,am as N}from"./app-shared.CdUkAbk4.js";import"./vendor-ui.BSTRh9Ug.js";import"./vendor-i18n.DvM0XvO9.js";import"./vendor-router.aN8wpDPU.js";import"./vendor-moment.BLMuvzoS.js";import"./vendor-axios.NIGUFBhG.js";function _({data:o,onClose:u,children:b}){var p,y,h,x;const{jsonSetting:a}=C(),{setSelectedElement:v}=S(),e=c.useRef(null),d=c.useRef(null),s=c.useRef({startY:null,dy:0}),m="base_huay";let i;try{const t=k(a,"modal",m)||((y=(p=a.modal)==null?void 0:p.name)==null?void 0:y.base);i=(t==null?void 0:t.style)||"default",$forwardCreateCSS(i,(h=a==null?void 0:a.modal)==null?void 0:h.styles)}catch{console.error("forwardCreateCSS error:")}const g=t=>{t.stopPropagation(),v({styleName:m,classStyle:i,type:"modal",ref:t.target})};c.useEffect(()=>{var l;const t=(l=d.current)==null?void 0:l.closest(".modal-content");if(!t)return;const n=new MutationObserver(()=>{t.classList.contains("ReactModal__Content--before-close")&&e.current&&(e.current.style.transition="transform 0.3s ease-in",e.current.style.transform="translateY(105%)")});return n.observe(t,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},[]);const j=t=>{var n,l;s.current={startY:t.clientY,dy:0},(l=(n=t.currentTarget).setPointerCapture)==null||l.call(n,t.pointerId),e.current&&(e.current.style.transition="none")},w=t=>{if(s.current.startY==null)return;const n=Math.max(0,t.clientY-s.current.startY);s.current.dy=n,e.current&&(e.current.style.transform=`translateY(${n}px)`)},f=()=>{if(s.current.startY==null)return;const{dy:t}=s.current;s.current.startY=null,e.current&&(t>90?(e.current.style.transition="transform 0.18s ease-in",e.current.style.transform="translateY(100%)",setTimeout(()=>u(o.id),160)):(e.current.style.transition="transform 0.2s ease-out",e.current.style.transform="translateY(0)"))};return r.jsxs(r.Fragment,{children:[r.jsx("span",{ref:d,className:"hidden","aria-hidden":"true"}),r.jsx(Y,{children:r.jsx("div",{className:"fixed inset-x-0 bottom-0 flex justify-center pointer-events-none",style:{zIndex:1e4},children:r.jsxs("div",{ref:e,className:`pointer-events-auto relative w-full max-w-3xl max-h-[88dvh] min-h-[180px] overflow-y-auto ${i||""}`,style:{animation:"huaySheetUp 0.28s ease-out"},children:[r.jsx(M,{onClick:g,className:"!right-auto !left-1"}),r.jsx("div",{className:"sticky top-0 z-10 flex justify-center pt-2.5 pb-2 cursor-grab active:cursor-grabbing",style:{touchAction:"none"},onPointerDown:j,onPointerMove:w,onPointerUp:f,onPointerCancel:f,children:r.jsx("span",{className:"w-12 h-1.5 rounded-full",style:{background:"rgba(0,0,0,0.15)"}})}),((x=o==null?void 0:o.events)==null?void 0:x.showCloseButton)&&r.jsx("button",{type:"button",onClick:()=>u(o.id),className:"absolute top-3 right-3 z-20 grid place-items-center w-8 h-8 rounded-full active:translate-y-[1px]",style:{background:"rgba(0,0,0,0.06)",color:"currentColor"},"aria-label":"close",children:r.jsx(N,{size:15})}),r.jsx("div",{className:"huay-sheet-body px-3 pb-5 flex flex-col items-center",children:b}),r.jsx("style",{children:`
2              @keyframes huaySheetUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
3              /* modal ภายใน (CheckInModal ฯลฯ) วาดกรอบ+เงาของตัวเองไว้สำหรับ popup กลางจอ —
4                 ในธีม huay เนื้อหาต้องกลืนเป็นเนื้อเดียวกับ sheet: ตัดกรอบ/เงา + กว้างเต็ม
5                 (เจาะเฉพาะลูกชั้นแรกเท่านั้น — ห้ามแตะชั้นใน ไม่งั้นกล่องปุ่ม absolute เช่น X
6                 จะโดน width:100% แล้วตำแหน่งเพี้ยน) */
7              .huay-sheet-body > div {
8                border: none !important;
9                box-shadow: none !important;
10                width: 100% !important;
11                max-width: 100% !important;
12                background: transparent !important;
13              }
14            `})]})})})]})}export{_ 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.