var t = require; var e = module; var i = exports; Object.defineProperty(i, "__esModule", {value: !0}), (i.DybAd = void 0); const s = t("GameText"), o = t("Toast"); t("ADManageBase"); i.DybAd = class { constructor(t) { (this.dybSdk = window.dyb), (this.onLoadAdComplete = null), (this.onLoadAdFail = null), (this.adState = 0), (this.id = t); } init() { this.initAd(); } initAd() { console.log("adUnitId:", this.id), (this.adState = 2); } load() { this.onLoadAdComplete(); } show() { this.dybSdk.createVideoAd(this.id, t => { console.log(JSON.stringify(t), "createRewardedVideoAd"); let e = {code: 1}; "close" == t.state && t.isEnded ? ((e.code = 0), console.log("//视频完整看完,进行发送奖励")) : console.log("//视频没看完"), this.onShowAdComplete(e), "error" == t.state && o.default.launch(s.GameText.getText(62)); }); } };