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AM,GAAG,IAAI,CAAC;gBAC/B,IAAI,CAAC,aAAa,EAAE,CAAC;aACxB;QACL,CAAC;KACJ,CAAA;IArVG;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC;sDACc;IAE5C;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC;mDACW;IAEzC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC;4DACsB;IAEtD;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;yDACgB;IAE5C;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;uDACa;IAEzC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;kDACQ;IAEpC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC;uDACc;IAE5C;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;qDACY;IAGxC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;qDACW;IAGvC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC;sDACa;IAvBzB,cAAc;QADlC,OAAO;OACa,cAAc,CAwVlC;IAAD,qBAAC;KAAA;kBAxVoB,cAAc","file":"","sourceRoot":"/","sourcesContent":["import { AudioManager } from \"simba-cc-audio-manager\";\nimport { ResUtils } from \"simba-cc-resutils\";\nimport { ConfigManager } from \"simba-config-manager\";\nimport { DeepReadonly } from \"simba-utils\";\nimport { richNodesToCocosString, richNodeTextCount, SentenceContent, SentenceMediaContent, SentenceTextContent, SentenceType } from \"../../../../../avg/AVG\";\n// import { DailyQuestType } from \"../../../../../avg/EditorEnums\";\nimport { DummyLabel, DummyNode, DummyRichText, DummySprite } from \"../../../../../common/CCDummyObjects\";\nimport { GameTextData } from \"../../../../../common/gameplay/gamedata/GameTextData\";\nimport { UIManager } from \"../../../../../common/gameplay/managers/UIManager\";\nimport { characterVoiceConfig, ICharacterVoiceConfig } from \"../../../../../config/CharacterVoiceConfig\";\nimport { CommonLocation, ExposureType } from \"../../../../Enums\";\nimport { GameModelManager } from \"../../../../model/GameModelManager\";\nimport AlertDialogViewPresenter from \"../../../presenter/AlertDialogViewPresenter\";\nimport { ImagePreviewPresenter } from \"../../../presenter/message/ImagePreviewPresenter\";\nimport { AlertDialogViewProps } from \"../../type/AlertDialogView\";\n\nconst { ccclass, property } = cc._decorator;\n\nconst BASE_DELAY = 1;\nconst PER_CHAR_DELAY = 0.1;\n\n@ccclass\nexport default class ChatBubbleView extends cc.Component {\n    //#region editor bindings\n    @property({ type: cc.Sprite })\n    private iconSprite: cc.Sprite = DummySprite;\n    @property({ type: cc.Sprite })\n    private nameSpr: cc.Sprite = DummySprite;\n    @property({ type: cc.RichText })\n    private textContentLabel: cc.RichText = DummyRichText;\n    @property({ type: cc.Node })\n    private inputtingNode?: cc.Node = undefined;\n    @property({ type: cc.Node })\n    private contentNode: cc.Node = DummyNode;\n    @property({ type: cc.Node })\n    private bgNode: cc.Node = DummyNode;\n    @property({ type: cc.Sprite })\n    private imageSprite?: cc.Sprite = undefined;\n    @property({ type: cc.Node })\n    private container?: cc.Node = undefined;\n\n    @property({ type: cc.Node })\n    private voiceNode: cc.Node = DummyNode;\n\n    @property({ type: cc.Label })\n    private voiceLabel: cc.Label = DummyLabel;\n\n    playVoice = () => {\n        if (this._voicePath) {\n            this.contentNode.children[1].getComponent(cc.Animation)?.play(\"voice_play\");\n            AudioManager.playVoice(this._voicePath).then(() => {\n                this.contentNode.children[1].getComponent(cc.Animation)?.play(\"voice_stop\");\n            });\n        }\n    }\n\n    onVoiceClick() {\n        if (this._voiceCfg) {\n            let needAd = GameModelManager.checkVoiceNeedShowAD(this._voiceCfg);\n            if (needAd) {\n                this.showVoiceAdAlert();\n            } else {\n                this.playVoice();\n            }\n        }\n    }\n\n    autoPopVoiceDialog(isCheckContent = true) {\n        if (this._voiceCfg) {\n            if (isCheckContent) {\n                let needAd = GameModelManager.checkVoiceNeedShowAD(this._voiceCfg);\n                if (needAd) {\n                    this.showVoiceAdAlert();\n                }\n            } else {\n                this.showVoiceAdAlert();\n            }\n        }\n    }\n\n    showVoiceAdAlert() {\n        let temp: AlertDialogViewProps =\n        {\n            dataptr: {},\n            titlecontent: GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_VOICE_TITLE_VALUE),\n            content: GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_VOICE_CONTENT_VALUE),\n            ishasad: true,\n            istwobtn: true,\n            adconfig: \"inject_fruit\",\n            // items: [],\n            location: CommonLocation.Audio,\n            hasBanner: false,\n            callback: (type, ret) => {\n                if (ret) {\n                    GameModelManager.pushVoiceShowAdToRecord(this._voiceCfg!.id);\n                    this.playVoice();\n                    if (type === \"video\") {\n                        // GameModelManager.addDailyTasks(DailyQuestType.Dq_AdsWatch, 1);\n                    }\n                }\n            }\n        };\n        UIManager.pushPresenter(AlertDialogViewPresenter, temp);\n    }\n\n    previewImage() {\n        UIManager.pushPresenter(ImagePreviewPresenter, this._previewImage);\n    }\n    //#endregion\n\n    private _previewImage: string;\n\n    private _extraNode?: cc.Node;\n\n    private _nodeHeight: number;\n    private _bgWidth: number;\n    private _bgHeight: number;\n    private _textHeight: number;\n    private _icon: string;\n    private _itemIcon: string;\n    private _timer?: number;\n    private _voicePath?: string;\n    private _voiceCfg?: ICharacterVoiceConfig;\n\n    private delay(time: number) {\n        return new Promise((resolve) => {\n            this._timer = setTimeout(() => {\n                this._timer = undefined;\n                resolve(null);\n            }, time * 1000);\n        });\n    }\n\n    init() {\n        this._nodeHeight = this.node.height;\n        this._bgWidth = this.bgNode.width;\n        this._bgHeight = this.bgNode.height;\n        this._textHeight = this.textContentLabel.node.height;\n    }\n\n    reuse() {\n        if (this._timer) { clearTimeout(this._timer); this._timer = undefined; }\n        if (this._nodeHeight === undefined) return;\n        if (this._extraNode) {\n            this._extraNode.removeFromParent(true);\n            this._extraNode = undefined;\n        }\n        this.node.height = this._nodeHeight;\n        this.bgNode.width = this._bgWidth;\n        this.bgNode.height = this._bgHeight;\n        this.textContentLabel!.string = \"\";\n        this._previewImage = \"\";\n        this.bgNode.active = true;\n        this.voiceLabel!.string = \"\";\n        this._voiceCfg = undefined;\n        this._voicePath = \"\";\n        if (this.imageSprite) this.imageSprite.node.parent.active = false;\n    }\n\n    private async resizeContent() {\n        // console.log(\"resizeContent begin\");\n        if (this._previewImage) { // 图片类型\n            let sf = this.imageSprite!.spriteFrame;\n            let width = this.imageSprite!.node.width = Math.max(sf.getOriginalSize().width, 200);\n            this.imageSprite!.node.height = width / sf.getOriginalSize().width * sf.getOriginalSize().height;\n            this.node.height = -this.imageSprite!.node.y + this.imageSprite!.node.height + 40;\n        } else {\n            this.textContentLabel.node.active = true;\n            this.textContentLabel.maxWidth = 0;\n            // while (!this.enabledInHierarchy) {\n            //     if (!this.enabled) return;\n            //     await this.delay(0.5);\n            // }\n            let mw = 440;\n            if (mw < this.textContentLabel.node.width) {\n                this.textContentLabel.maxWidth = mw;\n            }\n            this.bgNode.height = this.textContentLabel.node.height + 70;\n            if (this._voiceCfg) {\n                this.voiceNode.y = this.bgNode.height / 2 * (-1);\n            }\n\n            this.node.height = this.bgNode.height + this._textHeight;\n            let gapW = 120;\n            if (this.bgNode.anchorX == 0) {\n                if (this._voiceCfg) {\n                    this.bgNode.width = this.voiceLabel.node.x + this.voiceLabel.node.width + gapW + 32;\n                } else {\n                    this.bgNode.width = this.textContentLabel.node.x + this.textContentLabel.node.width + gapW;\n                }\n            } else {\n                if (this._voiceCfg) {\n                    this.bgNode.width = -this.voiceLabel.node.x + this.voiceLabel.node.width + gapW + 32;\n                } else {\n                    this.bgNode.width = -this.textContentLabel.node.x + this.textContentLabel.node.width + gapW;\n                }\n            }\n            this.node.height = this.bgNode.height + this.nameSpr.node.height;\n        }\n        // console.log(\"resizeContent end\");\n    }\n\n    setName(name: string) {\n        // console.log(\"setName begin\");\n        // this.nameLabel.string = name;\n        // console.log(\"setName end\");\n    }\n\n    setNameIcon(icon: string) {\n        this.nameSpr.spriteFrame = new cc.SpriteFrame();\n        if (icon && \"\" !== icon.trim()) {\n            ResUtils.loadRes(icon, cc.SpriteFrame).then((sf) => {\n                this.nameSpr.spriteFrame = sf;\n            });\n        }\n    }\n\n    setIcon(icon: string) {\n        if (icon && this._icon !== icon) {\n            this._icon = icon;\n            ResUtils.loadRes(icon, cc.SpriteFrame).then((sf) => {\n                if (this._icon === icon) this.iconSprite.spriteFrame = sf;\n            });\n        }\n    }\n\n    setText(txt: string) {\n        // console.log(\"setText begin\");\n        this.textContentLabel.string = txt;\n        // console.log(\"setText end\");\n    }\n\n    setExtraContent(node: cc.Node) {\n        if (this.container) {\n            let pre = this.container.getChildByName(\"LikeTip\");\n            if (pre) {\n                this.container.removeChild(pre, true);\n            }\n            node.name = \"LikeTip\";\n            node.active = true;\n            this.container.addChild(node);\n        }\n    }\n\n    updateVoiceLastTime() {\n        this.voiceLabel.string = this._voiceCfg!.last + \"''\";\n    }\n\n    async setContent(plotId: number, content: DeepReadonly<SentenceContent>, select?: number, shouldDelay = false): Promise<void> {\n        // console.log(\"setContent begin\");\n        if (this._nodeHeight === undefined) this.init();\n        let textCount = 0;\n        let setContent1 = async (pid: number, content: DeepReadonly<SentenceTextContent | SentenceMediaContent>) => {\n            if (content.type === SentenceType.TEXT) {\n\n                textCount = richNodeTextCount(content.value);\n                let str = richNodesToCocosString(content.value);\n                this.textContentLabel.string = str;\n                this.contentNode.children[0].active = true;\n                this.contentNode.children[1].active = false;\n                this.contentNode.children[2].active = false;\n            } else if (content.type === SentenceType.AUDIO) {\n                let cfg = ConfigManager.getConfig(characterVoiceConfig, parseInt(content.value));\n                if (cfg) {\n                    this._voiceCfg = cfg;\n                    this._voicePath = cfg.name;\n                    this.updateVoiceLastTime();\n                    this.contentNode.children[0].active = false;\n                    this.contentNode.children[1].active = true;\n                    this.contentNode.children[2].active = false;\n                    let hasAd = cfg.ads === 1;\n                    let needAd = GameModelManager.checkVoiceNeedShowAD(this._voiceCfg);\n                    if (hasAd && needAd) {\n                        let curMainLinePlotId: number = GameModelManager.getCurMainLinePlotId();\n                        if (curMainLinePlotId === pid) {\n                            this.autoPopVoiceDialog(false);\n                        }\n                    }\n                }\n\n            } else if (content.type === SentenceType.IMAGE && this.imageSprite) {\n                this.contentNode.children[0].active = false;\n                this.contentNode.children[1].active = false;\n                this.contentNode.children[2].active = true;\n                if (content.value) {\n                    this._previewImage = \"textures/stickers/\" + content.value;\n                    let thumb = \"textures/stickers/thumb/\" + content.value;\n                    let info = cc.resources.getInfoWithPath(thumb);\n                    // console.log(\"getInfoWithPath\", info);\n                    if (!info) {\n                        thumb = this._previewImage;\n                    }\n                    try {\n                        await ResUtils.loadRes(thumb, cc.SpriteFrame).then((sf) => {\n                            // if (this.imageSprite!.node.activeInHierarchy) {\n                            this.imageSprite!.spriteFrame = sf;\n                            // }\n                        });\n                    } catch (e) {\n\n                    }\n                }\n            } else {\n                console.error(\"content type not supported yet.\")\n            }\n        }\n        let inputtingForever = false;\n        let promise: Promise<any> | undefined = undefined;\n        if (content.type === SentenceType.SELECT) {\n            if (select === undefined) {\n                inputtingForever = true;\n            } else {\n                let option = content.value[select];\n                if (option.content) {\n                    promise = setContent1(plotId, option.content as DeepReadonly<SentenceTextContent | SentenceMediaContent>);\n                } else {\n                    this.contentNode.children[0].active = true;\n                    this.contentNode.children[1].active = false;\n                    this.textContentLabel.string = option.summary;\n                }\n            }\n        } else {\n            promise = setContent1(plotId, content as DeepReadonly<SentenceTextContent | SentenceMediaContent>);\n        }\n        if (this.inputtingNode) {\n            if (shouldDelay || inputtingForever) {\n                this.inputtingNode.active = true;\n                this.contentNode.active = false;\n                this.inputtingNode.children[0].runAction(cc.repeatForever(cc.rotateBy(1, 360)));\n                if (inputtingForever) return;\n                if (promise) await promise;\n                await this.delay(BASE_DELAY + PER_CHAR_DELAY * textCount);\n                // return new Promise<void>((resolve) => {\n                //     this.scheduleOnce(() => {\n                this.inputtingNode.children[0].stopAllActions();\n                this.inputtingNode.active = false;\n                this.contentNode.active = true;\n                if (this._previewImage) this.bgNode.active = false;\n                this.resizeContent();\n                //     resolve();\n                // }, BASE_DELAY + PER_CHAR_DELAY * textCount);\n                // })\n            } else {\n                if (promise) await promise;\n                this.inputtingNode.children[0].stopAllActions();\n                this.inputtingNode.active = false;\n                this.contentNode.active = true;\n                if (this._previewImage) this.bgNode.active = false;\n                this.resizeContent();\n            }\n        }\n        // console.log(\"setContent end\");\n    }\n\n    clearInputting() {\n        if (this._timer) {\n            clearTimeout(this._timer);\n            this._timer = undefined;\n            if (this.inputtingNode) {\n                this.inputtingNode.children[0].stopAllActions();\n                this.inputtingNode.active = false;\n            }\n            this.contentNode.active = true;\n            this.resizeContent();\n        }\n    }\n}"]}