daratsakura1.xyz Open in urlscan Pro
172.67.164.210  Public Scan

Submitted URL: http://daratsakura1.xyz/_next/static/chunks/629-9dd879a2a92206cc.js
Effective URL: https://daratsakura1.xyz/_next/static/chunks/629-9dd879a2a92206cc.js
Submission: On November 05 via api from US — Scanned from US

Form analysis 0 forms found in the DOM

Text Content

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[629],{6905:function(t,a,e){e.d(a,{v:function(){return n}});var n=e(7294).createContext({captcha:{token:"",captcha:{loginCaptcha:"",registerCaptcha:""}},setCaptcha:function(t){}})},5707:function(t,a,e){var n=e(7294),r=e(6905),i=e(6279),o=e(4554),s=e(1287);function u(t,a){(null==a||a>t.length)&&(a=t.length);for(var e=0,n=new Array(a);e<a;e++)n[e]=t[e];return n}function l(t,a){return function(t){if(Array.isArray(t))return t}(t)||function(t,a){var e=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,r,i=[],o=!0,s=!1;try{for(e=e.call(t);!(o=(n=e.next()).done)&&(i.push(n.value),!a||i.length!==a);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==e.return||e.return()}finally{if(s)throw r}}return i}}(t,a)||function(t,a){if(!t)return;if("string"===typeof t)return u(t,a);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return u(t,a)}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}a.Z=function(t){var a=l(n.useState(!1),2),e=a[0],u=a[1],c=l(n.useState(!1),2),d=c[0],f=c[1],h=n.useContext(r.v),p=h.captcha,m=h.setCaptcha,v=l(n.useState(),2),g=v[0],b=v[1],y=l(n.useState(!1),2),w=(y[0],y[1]),k=function(){var t=(0,o.ky)(),a=(0,o.an)();m({token:null!==t&&void 0!==t?t:"",captcha:a})},C=function(){(0,o.mc)(),(0,o.JM)()},P=function(){C(),document.cookie="loggedin=true; path=/",window.location.replace("".concat(window.location.origin,"/verify"))};return{isLoginLoading:e,isRegisterLoading:d,captcha:p,login:function(a,e,n){return new Promise((function(r,i){var l;u(!0);var c={username:a,password:e,captcha:parseInt(n,10),captchaToken:null!==(l=p.token)&&void 0!==l?l:""};(0,o.pH)(c,(0,s.nn)(t),t.base_url).then((function(t){var a;u(!1);var e,n,i=t.data;i.status?P():b({message:null!==(e=i.message)&&void 0!==e?e:"Gagal melakukan login, harap coba kembali dalam beberapa saat",type:"warning"});k(),r({status:i.status,hasPin:null!==(n=null===(a=i.data)||void 0===a?void 0:a.hasPin)&&void 0!==n&&n})})).catch((function(t){var a;u(!1),b({message:null!==(a=t.message)&&void 0!==a?a:"Gagal melakukan login, harap coba kembali dalam beberapa saat",type:"error"}),k(),i()}))}))},register:function(a){return new Promise((function(e,n){var r,i;f(!0),a.captchaToken=null!==(r=p.token)&&void 0!==r?r:"",a.referral=null!==(i=(0,o.py)())&&void 0!==i?i:"",(0,o.a$)(a,(0,s.nn)(t),t.base_url).then((function(t){f(!1);var a,n=t.data;n.status?(b({message:n.message,type:"success"}),C()):(n.data.captchaKey&&m({captcha:{loginCaptcha:n.data.loginCaptcha,registerCaptcha:n.data.registerCaptcha},token:n.data.capthcaKey}),b({message:null!==(a=n.message)&&void 0!==a?a:"Gagal melakukan register, harap coba kembali dalam beberapa saat",type:"warning"}));k(),e(n.status)})).catch((function(t){var a;f(!1),b({message:null!==(a=t.message)&&void 0!==a?a:"Gagal melakukan register, harap coba kembali dalam beberapa saat",type:"error"}),k(),n()}))}))},loadCaptcha:k,saveReferralCode:function(t){(0,o.r7)(t)},message:g,loadIndex:function(){var a;(0,i.FO)(null!==(a=(0,o.py)())&&void 0!==a?a:"",(0,s.nn)(t),t.base_url).then((function(t){var a,e,n=t.data;n.status?(k(),(null===(a=n.data)||void 0===a?void 0:a.referralUsername)?(0,o.u7)(n.data.referralUsername):C()):b({message:null!==(e=n.message)&&void 0!==e?e:"Gagal dalam mengambil index. Silahkan coba lagi dalam beberapa saat",type:"warning"})})).catch((function(t){var a;b({message:null!==(a=t.message)&&void 0!==a?a:"Terjadi kesalahan internal. Harap coba lagi nanti",type:"error"})}))},getRegisterCaptchaImageUrl:function(a){return""===(null===a||void 0===a?void 0:a.captcha.registerCaptcha)?"":"https://".concat(window.location.host).concat(t.captcha_image_endpoint,"?number=").concat(null===a||void 0===a?void 0:a.captcha.registerCaptcha)},getLoginCaptchaImageUrl:function(a){return""===(null===a||void 0===a?void 0:a.captcha.loginCaptcha)?"":"https://".concat(window.location.host).concat(t.captcha_image_endpoint,"?number=").concat(null===a||void 0===a?void 0:a.captcha.loginCaptcha)},agreement:function(a){return new Promise((function(e,n){u(!0),(0,o.zo)(a,(0,s.nn)(t),t.base_url).then((function(t){u(!1);var a=t.data;e(a.status)})).catch((function(t){var a;u(!1),b({message:null!==(a=t.message)&&void 0!==a?a:"Gagal melakukan login, harap coba kembali dalam beberapa saat",type:"error"}),k(),n()}))}))},confirmPINNumber:function(a){return new Promise((function(e,n){u(!0),(0,o.Z3)(a,(0,s.nn)(t),t.base_url).then((function(t){u(!1);var a,n=t.data;n.status||b({message:null!==(a=n.message)&&void 0!==a?a:"Gagal melakukan login, harap coba kembali dalam beberapa saat",type:"warning"});e(n.status)})).catch((function(t){var a;u(!1),b({message:null!==(a=t.message)&&void 0!==a?a:"Gagal melakukan login, harap coba kembali dalam beberapa saat",type:"error"}),k(),n()}))}))},createPINNumber:function(a){return new Promise((function(e,n){u(!0),(0,o.HM)(a,(0,s.nn)(t),t.base_url).then((function(t){u(!1);var a,n=t.data;n.status||b({message:null!==(a=n.message)&&void 0!==a?a:"Gagal melakukan login, harap coba kembali dalam beberapa saat",type:"warning"});k(),e(n.status)})).catch((function(t){var a;u(!1),b({message:null!==(a=t.message)&&void 0!==a?a:"Gagal melakukan login, harap coba kembali dalam beberapa saat",type:"error"}),k(),n()}))}))},setMyStatusToLoggedIn:P,removeReferralCode:C,getReferralCode:o.py,setCaptcha:m,loadIndexWithCb:function(){return new Promise((function(a,e){var n;(0,i.FO)(null!==(n=(0,o.py)())&&void 0!==n?n:"",(0,s.nn)(t),t.base_url).then((function(t){var e,n=t.data;n.status&&(k(),(null===(e=n.data)||void 0===e?void 0:e.referralUsername)?(0,o.u7)(n.data.referralUsername):C());return a(!0)})).catch((function(t){401===t.response.status&&(localStorage.clear(),document.cookie="loggedin=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",window.location.replace("".concat(window.location.origin))),e(t)}))}))},setMessage:b,forgotPasswordRequest:function(a){return new Promise((function(e,n){w(!0),(0,o.gF)(a,(0,s.nn)(t),t.base_url).then((function(t){w(!1),e(t.data)})).catch((function(t){var a;w(!1),b({message:null!==(a=t.message)&&void 0!==a?a:"Gagal melakukan request password. Harap coba lagi dalam beberapa saat lagi",type:"error"}),n(t)}))}))},getRefUsername:function(){var t;return null!==(t=(0,o.t_)())&&void 0!==t?t:""}}}},2063:function(t,a,e){e.d(a,{Z:function(){return g}});var n=e(7294),r=e(8691),i=e(635),o=function(t,a){return i.Z.get("".concat(a,"/pasaran/list"),{headers:t})},s=function(t,a,e){return i.Z.get("".concat(e,"/keluaran?pasarID=").concat(t),{headers:a})};function u(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}var l=["Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],c=function(){function t(){u(this,t),this.resultSchedule=[],this.iconUrl=""}var a=t.prototype;return a.updateConfig=function(t){var a,e,n;this.name=t.pasarName,this.website=null!==(a=t.websiteResmi)&&void 0!==a?a:this.website,this.autoClose=1===t.autoClose,this.closedTime=null!==(e=t.jamTutup)&&void 0!==e?e:this.closedTime,t.jadwalResult&&(this.resultSchedule=t.jadwalResult.map((function(t){return l[t-1]}))),this.status=1===t.isOnline,this.isActive=1===t.isAktif,this.resultTime=null!==(n=t.jamResult)&&void 0!==n?n:this.resultTime},a.updateStatus=function(t){this.status=1===t.isOnline,this.isActive=1===t.isAktif},a.updateGameConfig=function(t){t.jadwalResult&&(this.resultSchedule=t.jadwalResult.map((function(t){return l[t-1]})))},a.updateResult=function(t){t.noKeluar.length>5&&(t.noKeluar=t.noKeluar.substr(0,2)+"-"+t.noKeluar.substr(2)),this.result=t.noKeluar,this.resultDate=null===t.resultDate?void 0:new Date(1e3*t.resultDate),this.prevPeriode=t.periodeTerakhir,this.periode=t.periodePasar},a.deserialize=function(t,a){var e,n;return this.pasarID=t.pasarID,this.code=t.pasarCode,this.name=t.pasarName,this.result=null!==(n=t.noKeluar)&&void 0!==n?n:"",(null===(e=this.result)||void 0===e?void 0:e.length)>5&&(this.result=this.result.substr(0,2)+"-"+this.result.substr(2)),this.periode=t.periodePasar,this.status=1===t.isOnline,this.isActive=1===t.isAktif,this.website=t.websiteResmi,this.autoClose=1===t.autoClose,this.closedTime=t.jamTutup,this.resultTime=t.jamResult,this.resultDate=null===t.resultDate?void 0:new Date(1e3*t.resultDate),this.resultSchedule=t.jadwalResult.map((function(t){return l[t-1]})),this.prevPeriode=t.periodeTerakhir,this.iconUrl="".concat(a.global_cdn_url,"/assets/images/lottery/").concat(t.pasarIcon?t.pasarIcon:"".concat(this.name.toLowerCase().replace(" ","-"),".png")),this},t}();var d=function(){function t(){!function(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.deserialize=function(t){var a,e,n,r,i,o;return t.keluaran.length>5&&(t.keluaran=t.keluaran.substr(0,2)+"-"+t.keluaran.substr(2)),(null===(a=t.firstPrize)||void 0===a?void 0:a.length)>5&&(t.firstPrize=t.firstPrize.substr(0,2)+"-"+t.firstPrize.substr(2)),(null===(e=t.secondPrize)||void 0===e?void 0:e.length)>5&&(t.secondPrize=t.secondPrize.substr(0,2)+"-"+t.secondPrize.substr(2)),(null===(n=t.thirdPrize)||void 0===n?void 0:n.length)>5&&(t.thirdPrize=t.thirdPrize.substr(0,2)+"-"+t.thirdPrize.substr(2)),this.result=t.keluaran,this.firstPrize=null!==(r=t.firstPrize)&&void 0!==r?r:"",this.secondPrize=null!==(i=t.secondPrize)&&void 0!==i?i:"",this.thirdPrize=null!==(o=t.thirdPrize)&&void 0!==o?o:"",this.periode=t.periode,this.time=void 0===t.waktu?void 0:new Date(1e3*t.waktu),this.dateString=t.tanggal,this},t}(),f=e(1287);function h(t,a){(null==a||a>t.length)&&(a=t.length);for(var e=0,n=new Array(a);e<a;e++)n[e]=t[e];return n}function p(t,a){return function(t){if(Array.isArray(t))return t}(t)||function(t,a){var e=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,r,i=[],o=!0,s=!1;try{for(e=e.call(t);!(o=(n=e.next()).done)&&(i.push(n.value),!a||i.length!==a);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==e.return||e.return()}finally{if(s)throw r}}return i}}(t,a)||v(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,a){if(t){if("string"===typeof t)return h(t,a);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(e):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?h(t,a):void 0}}var g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1?arguments[1]:void 0,e=p(n.useState(t),2),i=e[0],u=e[1],l=p(n.useState([]),2),h=l[0],v=l[1],g=p(n.useState(!1),2),b=g[0],y=g[1],w=p(n.useState(!1),2),k=w[0],C=w[1],P=n.useContext(r.J).socket,S=function(){y(!0),o((0,f.nn)(a),a.base_url).then((function(t){if(y(!1),t.data.status){var e,n,r=(null!==(n=null===(e=t.data)||void 0===e?void 0:e.data)&&void 0!==n?n:[]).map((function(t){return(new c).deserialize(t,a)}));u(r)}else u([])})).catch((function(t){y(!1),u([])}))},_=function(t){C(!0),s(t,(0,f.nn)(a),a.base_url).then((function(t){if(C(!1),t.data.status){var a,e,n,r=(null!==(n=null===(a=t.data)||void 0===a||null===(e=a.data)||void 0===e?void 0:e.dataKeluaran)&&void 0!==n?n:[]).map((function(t){return(new d).deserialize(t)}));v(r)}else v([])})).catch((function(t){y(!1)}))};return n.useEffect((function(){return null===P||void 0===P||P.on("psr",(function(t){var e=t.map((function(t){return(new c).deserialize(t,a)}));u(e.filter((function(t){return t.isActive})))})),null===P||void 0===P||P.on("psr_st",(function(t){var a=m(i).map((function(a){var e=t.find((function(t){return t.code===a.code}));return e&&a.updateStatus(e),a}));u(a.filter((function(t){return t.isActive})))})),null===P||void 0===P||P.on("psr_cf",(function(t){var a,e=null!==(a=null===t||void 0===t?void 0:t.code)&&void 0!==a?a:"",n=m(i),r=n.findIndex((function(t){return t.code===e}));-1!=r&&n[r].updateConfig(t.config),u(n)})),null===P||void 0===P||P.on("psr_rs",(function(t){var a=m(i).map((function(a){var e=t.find((function(t){return t.code===a.code}));return e&&a.updateResult(e),a}));u(a)})),function(){null===P||void 0===P||P.off("psr"),null===P||void 0===P||P.off("psr_st"),null===P||void 0===P||P.off("psr_cf"),null===P||void 0===P||P.off("psr_rs")}}),[P]),Object.freeze({fetchPasaranList:S,pasarList:i,pasarLoading:b,fetchPasarResult:_,pasarResult:h,isResultLoading:k,setPasarList:u,setPasarResult:v})}}}]);