/*!
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"),i=require("../../events.js");var t=function(t){e.inherits(n,t);var u=e.createSuper(n);function n(){var i;e.classCallCheck(this,n);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return i=u.call.apply(u,[this].concat(r)),e.defineProperty(e.assertThisInitialized(i),"onWaiting",function(){var t=e.assertThisInitialized(i).config;i.jumpCnt>t.jumpCntMax||i.timer||!1===t.useWaitingTimeoutJump||(i.timer=setTimeout(i.onJump,1e3*t.waitingTime))}),e.defineProperty(e.assertThisInitialized(i),"onJump",function(){var t=e.assertThisInitialized(i),u=t.player,n=t.config;if(clearTimeout(i.timer),i.timer=null,!(i.jumpCnt>n.jumpCntMax||!1===n.useWaitingTimeoutJump||u.media.paused&&0!==u.media.currentTime&&i.hasPlayed)){i.jumpSize=n.jumpSize*(i.jumpCnt+1),i.jumpCnt===n.jumpSize&&i.jumpSize<6&&(i.jumpSize=6);var r=u.currentTime+i.jumpSize;r>u.media.duration||(i.jumpCnt++,u.currentTime=r)}}),i}return e.createClass(n,[{key:"afterCreate",value:function(){var e=this,t=this.config,u=t.useWaitingTimeoutJump,n=t.jumpSize;!1!==u&&(this.hasPlayed=!1,this.jumpCnt=0,this.timer=null,this.jumpSize=n,this.on(i.WAITING,this.onWaiting),this.on([i.PLAYING,i.CANPLAY],function(){clearTimeout(e.timer),e.timer=null,e.jumpSize=e.config.jumpSize}),this.on(i.PLAY,function(){e.hasPlayed=!0}))}}],[{key:"pluginName",get:function(){return"waitingTimeoutJump"}},{key:"defaultConfig",get:function(){return{useWaitingTimeoutJump:!1,waitingTime:15,jumpSize:2,jumpCntMax:4}}}]),n}(require("../../plugin/plugin.js").default);exports.default=t;