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E,CAAC;QACzC,CAAC;QAED,SAAS;YACL,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAC5B,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC,KAAK,OAAO,EAAE;gBACrC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,gBAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aAChD;QACL,CAAC;KAUJ,CAAA;IA1EG;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;oDACU;IAG5B;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,8BAAQ,EAAE,CAAC;sDACyB;IALrC,gBAAgB;QAFpC,OAAO;QACP,gCAAO,CAAC,+BAAgB,EAAE,wBAAwB,CAAC;OAC/B,gBAAgB,CA4EpC;IAAD,uBAAC;KAAA;kBA5EoB,gBAAgB","file":"","sourceRoot":"/","sourcesContent":["import { SDK } from \"simba-sdk\";\nimport SVButton from \"simba-sdk-ccsvbutton\";\nimport { DummyNode } from \"../../../../common/CCDummyObjects\";\nimport { CCPureView } from \"../../../../common/classbase/CCViewBase\";\nimport { GameConstData } from \"../../../../common/gameplay/gamedata/GameConstData\";\nimport { GetRewardType } from \"../../../../common/gameplay/gamedata/GameEnumData\";\nimport { ShowType } from \"../../../Enums\";\nimport { RegView } from \"../../PresenterCCViewFactory\";\nimport { PlotStopView, PlotStopViewProps, PlotStopViewType } from \"../type/PlotStopView\";\n\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\n@RegView(PlotStopViewType, \"prefab/ui/PlotStopView\")\nexport default class PlotStopViewImpl extends CCPureView<PlotStopViewProps> implements PlotStopView {\n @property(cc.Node)\n banner: cc.Node = DummyNode;\n\n @property({ type: SVButton })\n adButton: SVButton = undefined as unknown as SVButton;\n\n svType: GetRewardType = GetRewardType.Ad;\n\n onLoad() {\n this.adButton.onResult = (type, ret) => {\n if (ret) {\n this._props.onAddRes(type);\n } else {\n this._props.onCancelAdCallback(this.svType);\n }\n this._props.onAdBtnOption(ShowType.FINISH, type, ret);\n }\n }\n\n closeView() {\n this.isShowViewBanner(false);\n this.close();\n }\n\n\n onEnable() {\n this.isShowViewBanner(true);\n this.adButton.loadSVConfig();\n\n }\n\n isShowViewBanner = (isShow: boolean) => {\n if (isShow) {\n let info = SDK.systemInfo.displayInfo;\n let aspect = info.windowSize.height / cc.view.getVisibleSize().height;\n this.node.getComponent(cc.Widget).updateAlignment();\n\n let _width = this.banner.width * aspect;\n let _height = this.banner.height * aspect;\n let _left = (info.windowSize.width - _width) * 0.5;\n let _top = info.windowSize.height - _height;\n\n let style = {\n left: _left,\n top: _top,\n width: _width,\n height: _height,\n anchorX: 0.5,\n anchorY: 1,\n }\n SDK.showBannerAd(style, GameConstData.GAME_CONST_BANNER_REFRESH_TIME);\n } else {\n SDK.hideBannerAd();\n }\n }\n\n unlockPlotCallback(event) {\n this._props.unlockPlotCallbackFunc();\n }\n\n onAdClick() {\n let t = this.getSvBtnType();\n if (t && t === \"share\" || t === \"video\") {\n this._props.onAdBtnOption(ShowType.CLICK, t);\n }\n }\n\n getSvBtnType = (): string => {\n let ret = \"share\";\n if (this.adButton.svPoint) {\n ret = this.adButton.svPoint.type;\n }\n return ret;\n }\n\n}"]}