diff --git a/assets/index-b58c30c5.js b/assets/index-ee3eddb6.js similarity index 99% rename from assets/index-b58c30c5.js rename to assets/index-ee3eddb6.js index 256baa9..e69b394 100644 --- a/assets/index-b58c30c5.js +++ b/assets/index-ee3eddb6.js @@ -178,4 +178,4 @@ Error generating stack: `+i.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),wt.rippleVisible,tS,ps,({theme:e})=>e.transitions.easing.easeInOut,wt.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,wt.child,wt.childLeaving,nS,ps,({theme:e})=>e.transitions.easing.easeInOut,wt.childPulsate,rS,({theme:e})=>e.transitions.easing.easeInOut),lS=R.forwardRef(function(t,n){const r=wa({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:l}=r,a=mt(r,qx),[u,s]=R.useState([]),c=R.useRef(0),m=R.useRef(null);R.useEffect(()=>{m.current&&(m.current(),m.current=null)},[u]);const p=R.useRef(!1),w=R.useRef(0),v=R.useRef(null),g=R.useRef(null);R.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]);const C=R.useCallback(f=>{const{pulsate:S,rippleX:P,rippleY:E,rippleSize:L,cb:A}=f;s(O=>[...O,re.jsx(iS,{classes:{ripple:at(i.ripple,wt.ripple),rippleVisible:at(i.rippleVisible,wt.rippleVisible),ripplePulsate:at(i.ripplePulsate,wt.ripplePulsate),child:at(i.child,wt.child),childLeaving:at(i.childLeaving,wt.childLeaving),childPulsate:at(i.childPulsate,wt.childPulsate)},timeout:ps,pulsate:S,rippleX:P,rippleY:E,rippleSize:L},c.current)]),c.current+=1,m.current=A},[i]),h=R.useCallback((f={},S={},P=()=>{})=>{const{pulsate:E=!1,center:L=o||S.pulsate,fakeElement:A=!1}=S;if((f==null?void 0:f.type)==="mousedown"&&p.current){p.current=!1;return}(f==null?void 0:f.type)==="touchstart"&&(p.current=!0);const O=A?null:g.current,H=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let V,ge,_e;if(L||f===void 0||f.clientX===0&&f.clientY===0||!f.clientX&&!f.touches)V=Math.round(H.width/2),ge=Math.round(H.height/2);else{const{clientX:Ee,clientY:de}=f.touches&&f.touches.length>0?f.touches[0]:f;V=Math.round(Ee-H.left),ge=Math.round(de-H.top)}if(L)_e=Math.sqrt((2*H.width**2+H.height**2)/3),_e%2===0&&(_e+=1);else{const Ee=Math.max(Math.abs((O?O.clientWidth:0)-V),V)*2+2,de=Math.max(Math.abs((O?O.clientHeight:0)-ge),ge)*2+2;_e=Math.sqrt(Ee**2+de**2)}f!=null&&f.touches?v.current===null&&(v.current=()=>{C({pulsate:E,rippleX:V,rippleY:ge,rippleSize:_e,cb:P})},w.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},eS)):C({pulsate:E,rippleX:V,rippleY:ge,rippleSize:_e,cb:P})},[o,C]),d=R.useCallback(()=>{h({},{pulsate:!0})},[h]),y=R.useCallback((f,S)=>{if(clearTimeout(w.current),(f==null?void 0:f.type)==="touchend"&&v.current){v.current(),v.current=null,w.current=setTimeout(()=>{y(f,S)});return}v.current=null,s(P=>P.length>0?P.slice(1):P),m.current=S},[]);return R.useImperativeHandle(n,()=>({pulsate:d,start:h,stop:y}),[d,h,y]),re.jsx(oS,D({className:at(wt.root,i.root,l),ref:g},a,{children:re.jsx(Xx,{component:null,exit:!0,children:u})}))}),aS=lS;function uS(e){return Zl("MuiButtonBase",e)}const sS=Jl("MuiButtonBase",["root","disabled","focusVisible"]),cS=sS,fS=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],dS=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,l=dc({root:["root",t&&"disabled",n&&"focusVisible"]},uS,o);return n&&r&&(l.root+=` ${r}`),l},pS=un("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${cS.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),hS=R.forwardRef(function(t,n){const r=wa({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:l,className:a,component:u="button",disabled:s=!1,disableRipple:c=!1,disableTouchRipple:m=!1,focusRipple:p=!1,LinkComponent:w="a",onBlur:v,onClick:g,onContextMenu:C,onDragLeave:h,onFocus:d,onFocusVisible:y,onKeyDown:f,onKeyUp:S,onMouseDown:P,onMouseLeave:E,onMouseUp:L,onTouchEnd:A,onTouchMove:O,onTouchStart:H,tabIndex:V=0,TouchRippleProps:ge,touchRippleRef:_e,type:Ee}=r,de=mt(r,fS),Ue=R.useRef(null),M=R.useRef(null),I=ad(M,_e),{isFocusVisibleRef:j,onFocus:le,onBlur:ye,ref:sn}=Tv(),[Q,Je]=R.useState(!1);s&&Q&&Je(!1),R.useImperativeHandle(o,()=>({focusVisible:()=>{Je(!0),Ue.current.focus()}}),[]);const[qe,cn]=R.useState(!1);R.useEffect(()=>{cn(!0)},[]);const It=qe&&!c&&!s;R.useEffect(()=>{Q&&p&&!c&&qe&&M.current.pulsate()},[c,p,Q,qe]);function Pt(W,to,Pa=m){return ji(no=>(to&&to(no),!Pa&&M.current&&M.current[W](no),!0))}const ka=Pt("start",P),gi=Pt("stop",C),Ea=Pt("stop",h),Ca=Pt("stop",L),Ra=Pt("stop",W=>{Q&&W.preventDefault(),E&&E(W)}),Nn=Pt("start",H),yi=Pt("stop",A),Zr=Pt("stop",O),nr=Pt("stop",W=>{ye(W),j.current===!1&&Je(!1),v&&v(W)},!1),Jr=ji(W=>{Ue.current||(Ue.current=W.currentTarget),le(W),j.current===!0&&(Je(!0),y&&y(W)),d&&d(W)}),yt=()=>{const W=Ue.current;return u&&u!=="button"&&!(W.tagName==="A"&&W.href)},rr=R.useRef(!1),vi=ji(W=>{p&&!rr.current&&Q&&M.current&&W.key===" "&&(rr.current=!0,M.current.stop(W,()=>{M.current.start(W)})),W.target===W.currentTarget&&yt()&&W.key===" "&&W.preventDefault(),f&&f(W),W.target===W.currentTarget&&yt()&&W.key==="Enter"&&!s&&(W.preventDefault(),g&&g(W))}),wi=ji(W=>{p&&W.key===" "&&M.current&&Q&&!W.defaultPrevented&&(rr.current=!1,M.current.stop(W,()=>{M.current.pulsate(W)})),S&&S(W),g&&W.target===W.currentTarget&&yt()&&W.key===" "&&!W.defaultPrevented&&g(W)});let or=u;or==="button"&&(de.href||de.to)&&(or=w);const fn={};or==="button"?(fn.type=Ee===void 0?"button":Ee,fn.disabled=s):(!de.href&&!de.to&&(fn.role="button"),s&&(fn["aria-disabled"]=s));const ir=ad(n,sn,Ue),qr=D({},r,{centerRipple:i,component:u,disabled:s,disableRipple:c,disableTouchRipple:m,focusRipple:p,tabIndex:V,focusVisible:Q}),eo=dS(qr);return re.jsxs(pS,D({as:or,className:at(eo.root,a),ownerState:qr,onBlur:nr,onClick:g,onContextMenu:gi,onFocus:Jr,onKeyDown:vi,onKeyUp:wi,onMouseDown:ka,onMouseLeave:Ra,onMouseUp:Ca,onDragLeave:Ea,onTouchEnd:yi,onTouchMove:Zr,onTouchStart:Nn,ref:ir,tabIndex:s?-1:V,type:Ee},fn,de,{children:[l,It?re.jsx(aS,D({ref:I,center:i},ge)):null]}))}),mS=hS;function gS(e){return Zl("MuiButton",e)}const yS=Jl("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Bi=yS,vS=R.createContext({}),wS=vS,xS=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],SS=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:l}=e,a={root:["root",i,`${i}${Le(t)}`,`size${Le(o)}`,`${i}Size${Le(o)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Le(o)}`],endIcon:["endIcon",`iconSize${Le(o)}`]},u=dc(a,gS,l);return D({},l,u)},Nm=e=>D({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),kS=un(mS,{shouldForwardProp:e=>$m(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Le(n.color)}`],t[`size${Le(n.size)}`],t[`${n.variant}Size${Le(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return D({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":D({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ui(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ui(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ui(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":D({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Bi.focusVisible}`]:D({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Bi.disabled}`]:D({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Ui(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Bi.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Bi.disabled}`]:{boxShadow:"none"}}),ES=un("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Le(n.size)}`]]}})(({ownerState:e})=>D({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},Nm(e))),CS=un("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Le(n.size)}`]]}})(({ownerState:e})=>D({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},Nm(e))),RS=R.forwardRef(function(t,n){const r=R.useContext(wS),o=fc(r,t),i=wa({props:o,name:"MuiButton"}),{children:l,color:a="primary",component:u="button",className:s,disabled:c=!1,disableElevation:m=!1,disableFocusRipple:p=!1,endIcon:w,focusVisibleClassName:v,fullWidth:g=!1,size:C="medium",startIcon:h,type:d,variant:y="text"}=i,f=mt(i,xS),S=D({},i,{color:a,component:u,disabled:c,disableElevation:m,disableFocusRipple:p,fullWidth:g,size:C,type:d,variant:y}),P=SS(S),E=h&&re.jsx(ES,{className:P.startIcon,ownerState:S,children:h}),L=w&&re.jsx(CS,{className:P.endIcon,ownerState:S,children:w});return re.jsxs(kS,D({ownerState:S,className:at(r.className,P.root,s),component:u,disabled:c,focusRipple:!p,focusVisibleClassName:at(P.focusVisible,v),ref:n,type:d},f,{classes:P,children:[E,l,L]}))}),PS=RS,_S=gv([{path:"redirect/:name/:slug1/:slug2/:slug3",element:re.jsx(MS,{})}]);function TS(){return re.jsx(dv,{router:_S})}function MS(){const{name:t,slug1:n,slug2:r,slug3:o}=ev(),[i,l]=R.useState("inherit"),[a,u]=R.useState("Opening "+t+" on your mobile device "),[s,c]=R.useState(!1),[m,p]=R.useState(!1),[w,v]=R.useState(!1),g=t+"://"+n+"/"+r+"/"+o;function C(){return s?re.jsx(PS,{onClick:()=>window.open(g,"_blank"),size:"large",variant:"contained",children:"Open Link"}):re.jsx("view",{})}return R.useEffect(()=>{(t==="http"||t==="HTTP"||t==="https"||t==="HTTPS")&&(u("Simple redirect is not allowed to redirect HTTP links"),l("error"),p(!0)),!m&&w&&(setTimeout(()=>{window.open(g,"_blank")},2e3),setTimeout(()=>{l("warning"),u("Link redirection is taking longer than usual")},3e3),setTimeout(()=>{l("error"),u("Unable to open link automatically. Please open using the link below"),c(!0)},5e3)),v(!0)},[m,t,g,w,!0]),re.jsxs("view",{children:[re.jsx(Bx,{size:s?128:0,color:i}),re.jsxs("view",{style:{display:"flex",flexDirection:"row",justifyContent:"center"},children:[re.jsx("h5",{children:"URL Payload 1:"+n}),re.jsx("view",{style:{padding:16}}),re.jsx("h5",{children:"URL Payload 2:"+r})]}),re.jsx("h5",{children:"URL Payload 3:"+o}),re.jsx("h2",{style:{color:"white",textAlign:"center"},children:a}),re.jsx(C,{})]})}cu.createRoot(document.getElementById("root")).render(re.jsx(TS,{})); +`),wt.rippleVisible,tS,ps,({theme:e})=>e.transitions.easing.easeInOut,wt.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,wt.child,wt.childLeaving,nS,ps,({theme:e})=>e.transitions.easing.easeInOut,wt.childPulsate,rS,({theme:e})=>e.transitions.easing.easeInOut),lS=R.forwardRef(function(t,n){const r=wa({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:l}=r,a=mt(r,qx),[u,s]=R.useState([]),c=R.useRef(0),m=R.useRef(null);R.useEffect(()=>{m.current&&(m.current(),m.current=null)},[u]);const p=R.useRef(!1),w=R.useRef(0),v=R.useRef(null),g=R.useRef(null);R.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]);const C=R.useCallback(f=>{const{pulsate:S,rippleX:P,rippleY:E,rippleSize:L,cb:A}=f;s(O=>[...O,re.jsx(iS,{classes:{ripple:at(i.ripple,wt.ripple),rippleVisible:at(i.rippleVisible,wt.rippleVisible),ripplePulsate:at(i.ripplePulsate,wt.ripplePulsate),child:at(i.child,wt.child),childLeaving:at(i.childLeaving,wt.childLeaving),childPulsate:at(i.childPulsate,wt.childPulsate)},timeout:ps,pulsate:S,rippleX:P,rippleY:E,rippleSize:L},c.current)]),c.current+=1,m.current=A},[i]),h=R.useCallback((f={},S={},P=()=>{})=>{const{pulsate:E=!1,center:L=o||S.pulsate,fakeElement:A=!1}=S;if((f==null?void 0:f.type)==="mousedown"&&p.current){p.current=!1;return}(f==null?void 0:f.type)==="touchstart"&&(p.current=!0);const O=A?null:g.current,H=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let V,ge,_e;if(L||f===void 0||f.clientX===0&&f.clientY===0||!f.clientX&&!f.touches)V=Math.round(H.width/2),ge=Math.round(H.height/2);else{const{clientX:Ee,clientY:de}=f.touches&&f.touches.length>0?f.touches[0]:f;V=Math.round(Ee-H.left),ge=Math.round(de-H.top)}if(L)_e=Math.sqrt((2*H.width**2+H.height**2)/3),_e%2===0&&(_e+=1);else{const Ee=Math.max(Math.abs((O?O.clientWidth:0)-V),V)*2+2,de=Math.max(Math.abs((O?O.clientHeight:0)-ge),ge)*2+2;_e=Math.sqrt(Ee**2+de**2)}f!=null&&f.touches?v.current===null&&(v.current=()=>{C({pulsate:E,rippleX:V,rippleY:ge,rippleSize:_e,cb:P})},w.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},eS)):C({pulsate:E,rippleX:V,rippleY:ge,rippleSize:_e,cb:P})},[o,C]),d=R.useCallback(()=>{h({},{pulsate:!0})},[h]),y=R.useCallback((f,S)=>{if(clearTimeout(w.current),(f==null?void 0:f.type)==="touchend"&&v.current){v.current(),v.current=null,w.current=setTimeout(()=>{y(f,S)});return}v.current=null,s(P=>P.length>0?P.slice(1):P),m.current=S},[]);return R.useImperativeHandle(n,()=>({pulsate:d,start:h,stop:y}),[d,h,y]),re.jsx(oS,D({className:at(wt.root,i.root,l),ref:g},a,{children:re.jsx(Xx,{component:null,exit:!0,children:u})}))}),aS=lS;function uS(e){return Zl("MuiButtonBase",e)}const sS=Jl("MuiButtonBase",["root","disabled","focusVisible"]),cS=sS,fS=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],dS=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,l=dc({root:["root",t&&"disabled",n&&"focusVisible"]},uS,o);return n&&r&&(l.root+=` ${r}`),l},pS=un("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${cS.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),hS=R.forwardRef(function(t,n){const r=wa({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:l,className:a,component:u="button",disabled:s=!1,disableRipple:c=!1,disableTouchRipple:m=!1,focusRipple:p=!1,LinkComponent:w="a",onBlur:v,onClick:g,onContextMenu:C,onDragLeave:h,onFocus:d,onFocusVisible:y,onKeyDown:f,onKeyUp:S,onMouseDown:P,onMouseLeave:E,onMouseUp:L,onTouchEnd:A,onTouchMove:O,onTouchStart:H,tabIndex:V=0,TouchRippleProps:ge,touchRippleRef:_e,type:Ee}=r,de=mt(r,fS),Ue=R.useRef(null),M=R.useRef(null),I=ad(M,_e),{isFocusVisibleRef:j,onFocus:le,onBlur:ye,ref:sn}=Tv(),[Q,Je]=R.useState(!1);s&&Q&&Je(!1),R.useImperativeHandle(o,()=>({focusVisible:()=>{Je(!0),Ue.current.focus()}}),[]);const[qe,cn]=R.useState(!1);R.useEffect(()=>{cn(!0)},[]);const It=qe&&!c&&!s;R.useEffect(()=>{Q&&p&&!c&&qe&&M.current.pulsate()},[c,p,Q,qe]);function Pt(W,to,Pa=m){return ji(no=>(to&&to(no),!Pa&&M.current&&M.current[W](no),!0))}const ka=Pt("start",P),gi=Pt("stop",C),Ea=Pt("stop",h),Ca=Pt("stop",L),Ra=Pt("stop",W=>{Q&&W.preventDefault(),E&&E(W)}),Nn=Pt("start",H),yi=Pt("stop",A),Zr=Pt("stop",O),nr=Pt("stop",W=>{ye(W),j.current===!1&&Je(!1),v&&v(W)},!1),Jr=ji(W=>{Ue.current||(Ue.current=W.currentTarget),le(W),j.current===!0&&(Je(!0),y&&y(W)),d&&d(W)}),yt=()=>{const W=Ue.current;return u&&u!=="button"&&!(W.tagName==="A"&&W.href)},rr=R.useRef(!1),vi=ji(W=>{p&&!rr.current&&Q&&M.current&&W.key===" "&&(rr.current=!0,M.current.stop(W,()=>{M.current.start(W)})),W.target===W.currentTarget&&yt()&&W.key===" "&&W.preventDefault(),f&&f(W),W.target===W.currentTarget&&yt()&&W.key==="Enter"&&!s&&(W.preventDefault(),g&&g(W))}),wi=ji(W=>{p&&W.key===" "&&M.current&&Q&&!W.defaultPrevented&&(rr.current=!1,M.current.stop(W,()=>{M.current.pulsate(W)})),S&&S(W),g&&W.target===W.currentTarget&&yt()&&W.key===" "&&!W.defaultPrevented&&g(W)});let or=u;or==="button"&&(de.href||de.to)&&(or=w);const fn={};or==="button"?(fn.type=Ee===void 0?"button":Ee,fn.disabled=s):(!de.href&&!de.to&&(fn.role="button"),s&&(fn["aria-disabled"]=s));const ir=ad(n,sn,Ue),qr=D({},r,{centerRipple:i,component:u,disabled:s,disableRipple:c,disableTouchRipple:m,focusRipple:p,tabIndex:V,focusVisible:Q}),eo=dS(qr);return re.jsxs(pS,D({as:or,className:at(eo.root,a),ownerState:qr,onBlur:nr,onClick:g,onContextMenu:gi,onFocus:Jr,onKeyDown:vi,onKeyUp:wi,onMouseDown:ka,onMouseLeave:Ra,onMouseUp:Ca,onDragLeave:Ea,onTouchEnd:yi,onTouchMove:Zr,onTouchStart:Nn,ref:ir,tabIndex:s?-1:V,type:Ee},fn,de,{children:[l,It?re.jsx(aS,D({ref:I,center:i},ge)):null]}))}),mS=hS;function gS(e){return Zl("MuiButton",e)}const yS=Jl("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Bi=yS,vS=R.createContext({}),wS=vS,xS=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],SS=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:l}=e,a={root:["root",i,`${i}${Le(t)}`,`size${Le(o)}`,`${i}Size${Le(o)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Le(o)}`],endIcon:["endIcon",`iconSize${Le(o)}`]},u=dc(a,gS,l);return D({},l,u)},Nm=e=>D({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),kS=un(mS,{shouldForwardProp:e=>$m(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Le(n.color)}`],t[`size${Le(n.size)}`],t[`${n.variant}Size${Le(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return D({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":D({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ui(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ui(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ui(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":D({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Bi.focusVisible}`]:D({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Bi.disabled}`]:D({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Ui(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Bi.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Bi.disabled}`]:{boxShadow:"none"}}),ES=un("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Le(n.size)}`]]}})(({ownerState:e})=>D({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},Nm(e))),CS=un("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Le(n.size)}`]]}})(({ownerState:e})=>D({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},Nm(e))),RS=R.forwardRef(function(t,n){const r=R.useContext(wS),o=fc(r,t),i=wa({props:o,name:"MuiButton"}),{children:l,color:a="primary",component:u="button",className:s,disabled:c=!1,disableElevation:m=!1,disableFocusRipple:p=!1,endIcon:w,focusVisibleClassName:v,fullWidth:g=!1,size:C="medium",startIcon:h,type:d,variant:y="text"}=i,f=mt(i,xS),S=D({},i,{color:a,component:u,disabled:c,disableElevation:m,disableFocusRipple:p,fullWidth:g,size:C,type:d,variant:y}),P=SS(S),E=h&&re.jsx(ES,{className:P.startIcon,ownerState:S,children:h}),L=w&&re.jsx(CS,{className:P.endIcon,ownerState:S,children:w});return re.jsxs(kS,D({ownerState:S,className:at(r.className,P.root,s),component:u,disabled:c,focusRipple:!p,focusVisibleClassName:at(P.focusVisible,v),ref:n,type:d},f,{classes:P,children:[E,l,L]}))}),PS=RS,_S=gv([{path:"redirect/:name/:slug1/:slug2/:slug3",element:re.jsx(MS,{})}]);function TS(){return re.jsx(dv,{router:_S})}function MS(){let{name:t,slug1:n,slug2:r,slug3:o}=ev();t==="exp"?t="exp://10.0.10.8:19000/--/":t+="://";const[i,l]=R.useState("inherit"),[a,u]=R.useState("Opening "+t+" on your mobile device "),[s,c]=R.useState(!1),[m,p]=R.useState(!1),[w,v]=R.useState(!1);let g="";t&&n&&r&&o&&(g=t+n+"/"+r+"/"+o);function C(){return s?re.jsx(PS,{onClick:()=>window.open(g,"_blank"),size:"large",variant:"contained",children:"Open Link"}):re.jsx("view",{})}return R.useEffect(()=>{(t==="http"||t==="HTTP"||t==="https"||t==="HTTPS")&&(u("Simple redirect is not allowed to redirect HTTP links"),l("error"),p(!0)),!m&&w&&(setTimeout(()=>{window.open(g,"_blank")},2e3),setTimeout(()=>{l("warning"),u("Link redirection is taking longer than usual")},3e3),setTimeout(()=>{l("error"),u("Unable to open link automatically. Please open using the link below"),c(!0)},5e3)),v(!0)},[m,t,g,w,!0]),re.jsxs("view",{children:[re.jsx(Bx,{size:s?128:0,color:i}),re.jsxs("view",{style:{display:"flex",flexDirection:"row",justifyContent:"center"},children:[re.jsx("h5",{children:"URL Payload 1:"+n}),re.jsx("view",{style:{padding:16}}),re.jsx("h5",{children:"URL Payload 2:"+r})]}),re.jsx("h5",{children:"URL Payload 3:"+o}),re.jsx("h2",{style:{color:"white",textAlign:"center"},children:a}),re.jsx(C,{})]})}cu.createRoot(document.getElementById("root")).render(re.jsx(TS,{})); diff --git a/index.html b/index.html index c4f971e..b375cc9 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@