/*!
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
*/
import{createClass as r,classCallCheck as e}from"./_virtual/_rollupPluginBabelHelpers.js";import o from"./version.js";import a from"./utils/util.js";var t={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},i={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},n=/* @__PURE__ */r(function r(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};e(this,r);var d=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var s=n.mediaError?n.mediaError:t.media.error||{},m=t.duration,l=t.currentTime,u=t.ended,c=t.src,g=t.currentSrc,p=t.media,E=p.readyState,y=p.networkState,f=n.errorCode||s.code;i[f]&&(f=i[f]);var v={playerVersion:o,currentTime:l,duration:m,ended:u,readyState:E,networkState:y,src:c||g,errorType:n.errorType,errorCode:f,message:n.errorMessage||s.message,mediaError:s,originError:n.originError?n.originError.stack:"",host:a.getHostFromUrl(c||g)};return n.ext&&Object.keys(n.ext).map(function(r){v[r]=n.ext[r]}),v}if(arguments.length>1){for(var S={playerVersion:o,domain:document.domain},T=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],C=0;C<arguments.length;C++)S[T[C]]=arguments[C];return S.ex=d?(d[arguments[0]]||{}).msg:"",S}});export{t as ERROR_TYPE_MAP,n as default};