{"version":3,"file":"scsr.min.mjs","sources":["../../../packages/ofa-error/main.js","../../router/init-router.mjs","../../../packages/xhear/public.mjs","../scsr.mjs"],"sourcesContent":["// const error_origin = \"http://127.0.0.1:5793/errors\";\nconst error_origin = \"https://ofajs.github.io/ofa-errors/errors\";\n\n// 存放错误信息的数据对象\nconst errors = {\n  load_fail: \"Load {url} failed\",\n  load_fail_status: \"Load {url} failed, status code: {status}\",\n  load_module: \"Load module failed, module address: {url}\",\n  no_alias: \"No alias found: {name}, so '{url}' request is invalid\",\n  config_alias_name_error: \"Error in setting alias, must start with '@'\",\n  alias_already: \"Alias ​​'{name}' already exists\",\n  alias_relate_name:\n    \"Alias ​​cannot be configured with relative address, '{name}': '{path}'\",\n  failed_to_set_data: \"Error in setting attribute value {key}\",\n  failed_to_get_data: \"Error in getting {key}\",\n  nexttick_thread_limit:\n    \"nextTick exceeds thread limit, may have an infinite loop, please try to repair or optimize the function\",\n  not_func: \"The callback parameter of the {name} method must be a Function\",\n  not_found_func:\n    \"The '{name}' method was not found on the target {tag}. Please define the '{name}' method on the 'proto' of the component {tag}\",\n  invalid_key:\n    \"The parameters for registering the '{compName}' component are incorrect. The '{name}' on '{targetName}' is already occupied. Please change '{name}' to another name.\",\n  xhear_wrap_no_parent:\n    \"The target element has no parent element, the warp method cannot be used\",\n  xhear_unwrap_has_siblings:\n    \"The target element contains adjacent nodes, the unwrap method cannot be used\",\n  xhear_reander_err: \"Failed to render the tag '{tag}'\",\n  xhear_register_exists:\n    \"The component '{name}' already exists, and this component cannot be registered repeatedly\",\n  xhear_register_err: \"Error in registering the '{tag}' component\",\n  xhear_validate_tag:\n    \"The registered component name '{str}' is incorrect. For the Web Components naming rules, please refer to: https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names \",\n  xhear_tag_noline:\n    \"The registered component name '{str}' is incorrect and contains at least one '-' character; Web Components For naming rules, please refer to: https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names \",\n  xhear_regster_data_noset:\n    \"Error in registering component {tag}, custom data cannot have data of type 'Set' or 'Map'\",\n  xhear_regster_data_nofunc:\n    \"Registration component {tag} error, functions cannot appear in custom data, please put the function in 'proto'; or change '{key}' to '_{key}'\",\n  xhear_fakenode_unclose:\n    \"This is an unclosed FakeNode; use the wrong attribute name: {name}\",\n  xhear_fill_tempname: \"Fill component template '{name}' not found\",\n  xhear_eval:\n    \"Template syntax '{name}' error, expression {name}:{arg0}=\\\"{arg1}\\\"\",\n  xhear_listen_already:\n    \"An old listener already exists, and this element is rendering incorrectly. \",\n  xhear_dbfill_noname:\n    \"Only fill components with the 'name' attribute can be rendered in the fill component\",\n  xhear_temp_exist: \"Template '{name}' already exists\",\n  xhear_sync_no_options:\n    \"Direct use of the 'sync' method is not allowed, it is only used for template rendering\",\n  xhear_sync_object_value:\n    \"Cannot use 'sync' to synchronize values ​​of Object type, target {targetName}\",\n  loading_nothing: \"Loading function has no return content\",\n  app_src_change:\n    \"The app element that has been initialized cannot modify the src attribute\",\n  no_cross_access_func:\n    \"To jump to a page across domains, you must set the access function\",\n  access_return_error: \"Jumping to {src} is not allowed\",\n  load_comp_module:\n    \"Error loading component module, wrong module address: {url}\",\n  comp_registered:\n    \"Component '{tag}' has been registered, and the component cannot be registered again\",\n  \"inject-link-rel\":\n    \"The rel attribute value of the link element in the inject-host component can only be 'stylesheet'\",\n  \"use-data-inject\":\n    \"Please do not use data() on the style element in the inject-host, because it will cause serious performance crisis\",\n  load_page_module: \"Loading page module {url} failed\",\n  page_no_defaults:\n    \"The current page ({src}) has been rendered and cannot be rendered again\",\n  not_page_module:\n    \"{src} is not a page module and cannot be set as the src of the page component\",\n  page_failed: \"Loading page failed: {src}\",\n  fetch_temp_err: \"Page module {url} failed to load template {tempSrc}\",\n  page_wrap_fetch: \"Page {before} failed to get the parent page ({current})\",\n  context_change_name:\n    \"Changing the 'name' of {compName} may cause performance issues, please avoid changing this property\",\n  no_provider:\n    \"The consumer named '{name}' was not captured by the corresponding provider\",\n  page_invalid_key:\n    \"The registration parameters of page {src} are incorrect. '{name}' on '{targetName}' is already taken. Please change '{name}' to another name.\",\n  root_provider_exist:\n    \"An exception occurred in the root provider named '{name}'. The root provider component can only appear once\",\n  root_provider_name_change:\n    \"An exception occurred in the root provider named '{name}'. The root provider component cannot change the 'name' attribute\",\n  change_lm_src:\n    \"{tag} element changes 'src' attribute invalid, this attribute can only be set once.\",\n  error_no_owner:\n    \"This data is incorrect, the owner has not registered this object\",\n  circular_data: \"An object with a circular reference\",\n  fill_type:\n    \"'value' of 'x-fill' must be of type Array, the current value is of type {type}\",\n  fill_key_duplicates: \"The key in the fill component is repeated\",\n  render_el_error: \"Rendering element failed, rendering error is {expr}\",\n  temp_multi_child:\n    \"The template element can only contain one child element. If multiple child elements appear, the child elements will be repackaged in a <div> element\",\n  temp_wrap_child:\n    \"The template '{tempName}' contains {len} child elements, which have been wrapped in a div element with the attribute '{wrapName}'.\",\n  app_noback:\n    \"This is already the first page, and the 'back' operation cannot be performed again\",\n  invalidated_inject_host: \"This element will be invalidated in 'inject-host'\",\n  olink_out_app: \"The element of [olink] is only allowed in o-app\",\n  app_noforward:\n    \"This is the last page, you can no longer perform the 'forward' operation\",\n  need_forwards:\n    \"The target o-app does not allow forward operations, please add the '_forwards' attribute to the target; or in the app config file, add 'export const allowForward = true' \",\n  watchuntil_timeout: \"watchUntil timed out, target value not monitored\",\n};\n\nif (globalThis.navigator && navigator.language) {\n  let langFirst = navigator.language.toLowerCase().split(\"-\")[0];\n\n  if (langFirst === \"zh\" && navigator.language.toLowerCase() !== \"zh-cn\") {\n    langFirst = \"zhft\";\n  }\n\n  // 根据用户的语言首字母加载对应的错误匹配库，匹配开发人员报错信息\n  (async () => {\n    if (!globalThis.localStorage) {\n      // 不支持 localStorage，不加载错误库\n      return;\n    }\n\n    if (globalThis.navigator && !navigator.onLine) {\n      // 网络不可用，不加载错误库\n      return;\n    }\n\n    if (localStorage[\"ofa-errors\"]) {\n      const targetLangErrors = JSON.parse(localStorage[\"ofa-errors\"]);\n      Object.assign(errors, targetLangErrors);\n    }\n\n    const errCacheTime = localStorage[\"ofa-errors-time\"];\n\n    if (!errCacheTime || Date.now() > Number(errCacheTime) + 5 * 60 * 1000) {\n      const targetLangErrors = await fetch(`${error_origin}/${langFirst}.json`)\n        .then((e) => e.json())\n        .catch(() => null);\n\n      if (targetLangErrors) {\n        localStorage[\"ofa-errors\"] = JSON.stringify(targetLangErrors);\n        localStorage[\"ofa-errors-time\"] = Date.now();\n      } else {\n        targetLangErrors = await fetch(`${error_origin}/en.json`)\n          .then((e) => e.json())\n          .catch((error) => {\n            return null;\n          });\n      }\n\n      Object.assign(errors, targetLangErrors);\n    }\n  })();\n}\n\nlet isSafari = false;\nif (globalThis.navigator) {\n  isSafari =\n    navigator.userAgent.includes(\"Safari\") &&\n    !navigator.userAgent.includes(\"Chrome\");\n}\n\n/**\n * 根据键、选项和错误对象生成错误对象。\n *\n * @param {string} key - 错误描述的键。\n * @param {Object} [options] - 映射相关值的选项对象。\n * @param {Error} [error] - 原始错误对象。\n * @returns {Error} 生成的错误对象。\n */\nexport const getErr = (key, options, error) => {\n  let desc = getErrDesc(key, options);\n\n  let errObj;\n  if (error) {\n    if (isSafari) {\n      desc += `\\nCaused by: ${error.toString()}\\n`;\n\n      if (error.stack) {\n        desc += `  ${error.stack.replace(/\\n/g, \"\\n    \")}`;\n      }\n    }\n    errObj = new Error(desc, { cause: error });\n  } else {\n    errObj = new Error(desc);\n  }\n  errObj.code = key;\n  return errObj;\n};\n\n/**\n * 根据键、选项生成错误描述\n *\n * @param {string} key - 错误描述的键。\n * @param {Object} [options] - 映射相关值的选项对象。\n * @returns {string} 生成的错误描述。\n */\nexport const getErrDesc = (key, options) => {\n  if (!errors[key]) {\n    return `Error code: \"${key}\", please go to https://github.com/ofajs/ofa-errors to view the corresponding error information`;\n  }\n\n  let desc = errors[key];\n\n  // 映射相关值\n  if (options) {\n    for (let k in options) {\n      desc = desc.replace(new RegExp(`{${k}}`, \"g\"), options[k]);\n    }\n  }\n\n  return desc;\n};\n","import { isSafariBrowser } from \"../../packages/xhear/public.mjs\";\n\nexport default function initRouter({ app, getStateUrl, fixStateUrl }) {\n  if (history.state && history.state.routerMode) {\n    app.routers = history.state.routers;\n  }\n\n  // Application fallback, no window.history operation required\n  let _isFixState;\n  // When history moves forward\n  let _isGoto;\n  // When the address is back\n  let _isBack;\n  // when there is historical data, re-entering the hash address, it is necessary to replace the blank history\n  let _isFixNavigate;\n\n  app.on(\"router-change\", (e) => {\n    let methodName = \"pushState\";\n    const { name, delta, src } = e.data || {};\n\n    switch (name) {\n      case \"replace\":\n        methodName = \"replaceState\";\n      case \"goto\":\n        const { routers } = app;\n\n        const { pathname, search, origin } = new URL(src, location.href);\n\n        if (_isGoto) {\n          _isGoto = null;\n          return;\n        }\n\n        let hUrl = \"\";\n\n        if (getStateUrl) {\n          hUrl = getStateUrl(pathname, search, methodName);\n        } else if (location.origin === origin) {\n          hUrl = `#${pathname}${search}`;\n        } else {\n          hUrl = `#${origin}${pathname}${search}`;\n        }\n\n        if (_isFixNavigate) {\n          methodName = \"replaceState\";\n          _isFixNavigate = null;\n        }\n\n        history[methodName](\n          {\n            routerMode: 1,\n            routers: routers.map((e) => {\n              return {\n                src: e.src,\n              };\n            }),\n          },\n          \"\",\n          hUrl\n        );\n        break;\n      case \"back\":\n        if (_isBack) {\n          _isBack = null;\n          return;\n        }\n\n        _isFixState = 1;\n        history.go(-delta);\n        break;\n    }\n  });\n\n  let popstateFunc;\n  window.addEventListener(\n    \"popstate\",\n    (popstateFunc = (e) => {\n      const { state } = e;\n\n      if (_isFixState) {\n        _isFixState = null;\n        return;\n      }\n\n      if (!state) {\n        if (fixStateUrl) {\n          const newPath = fixStateUrl();\n          if (newPath) {\n            _isFixNavigate = 1;\n            cancelAnime(app, () => app.goto(newPath));\n            return;\n          }\n\n          if (newPath === false) {\n            return;\n          }\n        }\n\n        _isBack = 1;\n        cancelAnime(app, () => app.back(app.routers.length - 1));\n        return;\n      }\n\n      if (!state.routerMode || state.ignore) {\n        return;\n      }\n\n      const { routers: hisRouters } = state;\n      const { routers: appRouters } = app;\n\n      if (hisRouters.length < appRouters.length) {\n        // history back\n        _isBack = 1;\n        cancelAnime(app, () => app.back(appRouters.length - hisRouters.length));\n      } else if (hisRouters.length > appRouters.length) {\n        // history forward\n        const moreRouters = hisRouters.slice();\n\n        const target = moreRouters.pop();\n\n        if (moreRouters.length > appRouters.length) {\n          const canPushRouters = moreRouters.slice(app._history.length);\n          app._history.push(...canPushRouters);\n        }\n\n        _isGoto = 1;\n\n        cancelAnime(app, () => app.goto(target.src));\n      } else if (JSON.stringify(hisRouters) !== JSON.stringify(appRouters)) {\n        console.error(`o-router error occurred`);\n      }\n    })\n  );\n\n  const isSa = isSafariBrowser();\n\n  const cancelAnime = (app, func) => {\n    isSa && (app._noanime = true);\n    func();\n    isSa && (app._noanime = false);\n  };\n\n  return popstateFunc;\n}\n","import { getErr } from \"../ofa-error/main.js\";\nimport { getType } from \"../stanz/public.mjs\";\n\nexport const isFunction = (val) => getType(val).includes(\"function\");\n\nexport const hyphenToUpperCase = (str) =>\n  str.replace(/-([a-z])/g, (match, p1) => {\n    return p1.toUpperCase();\n  });\n\nexport function capitalizeFirstLetter(str) {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\nexport const isArrayEqual = (arr1, arr2) => {\n  if (arr1.length !== arr2.length) {\n    return false;\n  }\n  for (let i = 0, len = arr1.length; i < len; i++) {\n    if (arr1[i] !== arr2[i]) {\n      return false;\n    }\n  }\n  return true;\n};\n\nexport const toDashCase = (str) => {\n  return str.replace(/[A-Z]/g, function (match) {\n    return \"-\" + match.toLowerCase();\n  });\n};\n\nexport function isEmptyObject(obj) {\n  if (!obj) {\n    return false;\n  }\n  for (var key in obj) {\n    if (obj.hasOwnProperty(key)) {\n      return false;\n    }\n  }\n  return true;\n}\n\nexport const removeArrayValue = (arr, target) => {\n  const index = arr.indexOf(target);\n  if (index > -1) {\n    arr.splice(index, 1);\n  }\n};\n\nexport const searchEle = (el, expr) => {\n  if (el instanceof HTMLTemplateElement) {\n    return Array.from(el.content.querySelectorAll(expr));\n  }\n  return Array.from(el.querySelectorAll(expr));\n};\n\nexport function mergeObjects(obj1, obj2) {\n  for (let key of Object.keys(obj1)) {\n    if (!obj2.hasOwnProperty(key)) {\n      delete obj1[key];\n    }\n  }\n\n  for (let [key, value] of Object.entries(obj2)) {\n    obj1[key] = value;\n  }\n}\n\nexport const isSafariBrowser = () =>\n  /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\nexport const getRenderErrorSupplementary = (data) => {\n  if (!data) {\n    return \"\";\n  }\n\n  let supplementary = \"\";\n  if (data.$host || data.$data) {\n    supplementary = \"Please check the usage of $host or $data, \";\n  }\n\n  const fromSrc = data.$host?.PATH || data.PATH;\n\n  if (fromSrc) {\n    supplementary += `from file: ${fromSrc}, `;\n  }\n\n  return supplementary;\n};\n","import initRouter from \"../router/init-router.mjs\";\n\n(() => {\n  async function ready() {\n    const app = $(\"o-app\");\n    $(\"o-app template[page]\")?.remove();\n\n    let maybeHash = false;\n    window.addEventListener(\"hashchange\", (e) => {\n      if (maybeHash) {\n        const urlObj = new URL(location.href);\n\n        const { routers } = app;\n\n        history.replaceState(\n          {\n            routerMode: 1,\n            ignore: 1,\n            routers: routers.map((e) => {\n              return {\n                src: e.src,\n              };\n            }),\n          },\n          \"\",\n          urlObj.hash\n        );\n      }\n    });\n\n    app.on(\"page-loaded\", (e) => {\n      const { _defaults } = $(e.target);\n\n      if (typeof _defaults.title === \"string\") {\n        const titleEl = $(\"head title\");\n        titleEl && (titleEl.text = _defaults.title);\n      }\n    });\n\n    if (!history?.state?.routerMode) {\n      app.push(\n        `<o-page src=\"${location.pathname}${location.search}\"></o-page>`\n      );\n    }\n\n    initRouter({\n      app,\n      getStateUrl(pathname, search) {\n        return `${pathname}${search}`;\n      },\n      fixStateUrl(e) {\n        const urlObj = new URL(location.href);\n\n        if (urlObj.hash) {\n          // 可能是hash锚地\n          maybeHash = true;\n          setTimeout(() => (maybeHash = false));\n          return false;\n        }\n      },\n    });\n  }\n\n  if (document.readyState === \"complete\") {\n    ready();\n  } else {\n    $(window).one(\"load\", () => {\n      ready();\n    });\n  }\n})();\n"],"names":["error_origin","errors","load_fail","load_fail_status","load_module","no_alias","config_alias_name_error","alias_already","alias_relate_name","failed_to_set_data","failed_to_get_data","nexttick_thread_limit","not_func","not_found_func","invalid_key","xhear_wrap_no_parent","xhear_unwrap_has_siblings","xhear_reander_err","xhear_register_exists","xhear_register_err","xhear_validate_tag","xhear_tag_noline","xhear_regster_data_noset","xhear_regster_data_nofunc","xhear_fakenode_unclose","xhear_fill_tempname","xhear_eval","xhear_listen_already","xhear_dbfill_noname","xhear_temp_exist","xhear_sync_no_options","xhear_sync_object_value","loading_nothing","app_src_change","no_cross_access_func","access_return_error","load_comp_module","comp_registered","load_page_module","page_no_defaults","not_page_module","page_failed","fetch_temp_err","page_wrap_fetch","context_change_name","no_provider","page_invalid_key","root_provider_exist","root_provider_name_change","change_lm_src","error_no_owner","circular_data","fill_type","fill_key_duplicates","render_el_error","temp_multi_child","temp_wrap_child","app_noback","invalidated_inject_host","olink_out_app","app_noforward","need_forwards","watchuntil_timeout","globalThis","navigator","language","langFirst","toLowerCase","split","localStorage","onLine","targetLangErrors","JSON","parse","Object","assign","errCacheTime","Date","now","Number","fetch","then","e","json","catch","stringify","error","userAgent","includes","initRouter","app","getStateUrl","fixStateUrl","_isFixState","_isGoto","_isBack","_isFixNavigate","popstateFunc","history","state","routerMode","routers","on","methodName","name","delta","src","data","pathname","search","origin","URL","location","href","hUrl","map","go","window","addEventListener","newPath","cancelAnime","goto","back","length","ignore","hisRouters","appRouters","moreRouters","slice","target","pop","canPushRouters","_history","push","console","isSa","test","func","_noanime","async","ready","$","remove","maybeHash","urlObj","replaceState","hash","_defaults","title","titleEl","text","setTimeout","document","readyState","one"],"mappings":";AACA,MAAMA,EAAe,4CAGfC,EAAS,CACbC,UAAW,oBACXC,iBAAkB,2CAClBC,YAAa,4CACbC,SAAU,wDACVC,wBAAyB,8CACzBC,cAAe,kCACfC,kBACE,yEACFC,mBAAoB,yCACpBC,mBAAoB,yBACpBC,sBACE,0GACFC,SAAU,iEACVC,eACE,iIACFC,YACE,uKACFC,qBACE,2EACFC,0BACE,+EACFC,kBAAmB,mCACnBC,sBACE,4FACFC,mBAAoB,6CACpBC,mBACE,sNACFC,iBACE,0PACFC,yBACE,4FACFC,0BACE,gJACFC,uBACE,qEACFC,oBAAqB,6CACrBC,WACE,sEACFC,qBACE,8EACFC,oBACE,uFACFC,iBAAkB,mCAClBC,sBACE,yFACFC,wBACE,gFACFC,gBAAiB,yCACjBC,eACE,4EACFC,qBACE,qEACFC,oBAAqB,kCACrBC,iBACE,8DACFC,gBACE,sFACF,kBACE,oGACF,kBACE,qHACFC,iBAAkB,mCAClBC,iBACE,0EACFC,gBACE,gFACFC,YAAa,6BACbC,eAAgB,sDAChBC,gBAAiB,0DACjBC,oBACE,sGACFC,YACE,6EACFC,iBACE,gJACFC,oBACE,8GACFC,0BACE,4HACFC,cACE,sFACFC,eACE,mEACFC,cAAe,sCACfC,UACE,iFACFC,oBAAqB,4CACrBC,gBAAiB,sDACjBC,iBACE,uJACFC,gBACE,qIACFC,WACE,qFACFC,wBAAyB,oDACzBC,cAAe,kDACfC,cACE,2EACFC,cACE,6KACFC,mBAAoB,oDAGtB,GAAIC,WAAWC,WAAaA,UAAUC,SAAU,CAC9C,IAAIC,EAAYF,UAAUC,SAASE,cAAcC,MAAM,KAAK,GAE1C,OAAdF,GAA2D,UAArCF,UAAUC,SAASE,gBAC3CD,EAAY,QAId,WACE,IAAKH,WAAWM,aAEd,OAGF,GAAIN,WAAWC,YAAcA,UAAUM,OAErC,OAGF,GAAID,aAAa,cAAe,CAC9B,MAAME,EAAmBC,KAAKC,MAAMJ,aAAa,eACjDK,OAAOC,OAAO1E,EAAQsE,EACxB,CAEA,MAAMK,EA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