/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("../../utils/util.js"),r=require("../../events.js"),l=require("../../plugin/plugin.js"),a=require("../assets/replay.js");var i=function(i){e.inherits(s,i);var n=e.createSuper(s);function s(){return e.classCallCheck(this,s),n.apply(this,arguments)}return e.createClass(s,[{key:"registerIcons",value:function(){return{replay:a.default}}},{key:"afterCreate",value:function(){var e=this;l.default.insert(this.icons.replay,this.root,0),this.__handleReplay=this.hook("replayClick",function(){e.player.replay()},{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(".xgplayer-replay",["click","touchend"],this.__handleReplay),this.on(r.ENDED,function(){if(e.playerConfig.loop||t.default.addClass(e.player.root,"replay"),!e.config.disable){e.show();var r=e.root.querySelector("path");if(r){var l=window.getComputedStyle(r).getPropertyValue("transform");if("string"==typeof l&&l.indexOf("none")>-1)return null;r.setAttribute("transform",l)}}}),this.on(r.PLAY,function(){e.hide()})}},{key:"handleReplay",value:function(e){e.preventDefault(),e.stopPropagation(),this.player.replay(),t.default.removeClass(this.player.root,"replay")}},{key:"show",value:function(e){this.config.disable||(this.root.style.display="flex")}},{key:"enable",value:function(){this.config.disable=!1}},{key:"disable",value:function(){this.config.disable=!0,this.hide()}},{key:"destroy",value:function(){this.unbind(".xgplayer-replay",["click","touchend"],this.__handleReplay)}},{key:"render",value:function(){return'<xg-replay class="xgplayer-replay">\n      <xg-replay-txt class="xgplayer-replay-txt" lang-key="'.concat(this.i18nKeys.REPLAY,'">').concat(this.i18n.REPLAY,"</xg-replay-txt>\n    </xg-replay>")}}],[{key:"pluginName",get:function(){return"replay"}},{key:"defaultConfig",get:function(){return{disable:!1}}}]),s}(l.default);exports.default=i;