Files
crm-uni/node_modules/vue-i18n/dist/vue-i18n.runtime.global.prod.js
T

7 lines
26 KiB
JavaScript
Raw Normal View History

2025-03-14 16:55:12 +08:00
/*!
* vue-i18n v9.1.9
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
var VueI18n=function(e,t){"use strict";const a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,n=e=>a?Symbol(e):e,r=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),l=e=>"number"==typeof e&&isFinite(e),o=e=>"[object RegExp]"===v(e),s=e=>k(e)&&0===Object.keys(e).length;function i(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const c=Object.assign;function u(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const m=Object.prototype.hasOwnProperty;function f(e,t){return m.call(e,t)}const g=Array.isArray,p=e=>"function"==typeof e,_=e=>"string"==typeof e,b=e=>"boolean"==typeof e,d=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,v=e=>h.call(e),k=e=>"[object Object]"===v(e),F=[];F[0]={w:[0],i:[3,0],"[":[4],o:[7]},F[1]={w:[1],".":[2],"[":[4],o:[7]},F[2]={w:[2],i:[3,0],0:[3,0]},F[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},F[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},F[5]={"'":[4,0],o:8,l:[5,0]},F[6]={'"':[4,0],o:8,l:[6,0]};const y=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function w(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function M(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(y.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}const W=new Map;function L(e,t){if(!d(e))return null;let a=W.get(t);if(a||(a=function(e){const t=[];let a,n,r,l,o,s,i,c=-1,u=0,m=0;const f=[];function g(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,r="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===n?n=r:n+=r},f[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===n)return!1;if(n=M(n),!1===n)return!1;f[1]()}};null!==u;)if(c++,a=e[c],"\\"!==a||!g()){if(l=w(a),i=F[u],o=i[l]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=f[o[1]],s&&(r=a,!1===s())))return;if(7===u)return t}}(t),a&&W.set(t,a)),!a)return null;const n=a.length;let r=e,l=0;for(;l<n;){const e=r[a[l]];if(void 0===e)return null;r=e,l++}return r}function I(e){if(!d(e))return e;for(const t in e)if(f(e,t))if(t.includes(".")){const a=t.split("."),n=a.length-1;let r=e;for(let e=0;e<n;e++)a[e]in r||(r[a[e]]={}),r=r[a[e]];r[a[n]]=e[t],delete e[t],d(r[a[n]])&&I(r[a[n]])}else d(e[t])&&I(e[t]);return e}const $=e=>e,T=e=>"",O=e=>0===e.length?"":e.join(""),C=e=>null==e?"":g(e)||k(e)&&e.toString===h?JSON.stringify(e,null,2):String(e);function S(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function j(e={}){const t=e.locale,a=function(e){const t=l(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(l(e.named.count)||l(e.named.n))?l(e.named.count)?e.named.count:l(e.named.n)?e.named.n:t:t}(e),n=d(e.pluralRules)&&_(t)&&p(e.pluralRules[t])?e.pluralRules[t]:S,r=d(e.pluralRules)&&_(t)&&p(e.pluralRules[t])?S:void 0,o=e.list||[],s=e.named||{};l(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(a,s);function i(t){const a=p(e.messages)?e.messages(t):!!d(e.messages)&&e.messages[t];return a||(e.parent?e.parent.message(t):T)}const c=k(e.processor)&&p(e.processor.normalize)?e.processor.normalize:O,u=k(e.processor)&&p(e.processor.interpolate)?e.processor.interpolate:C,m={list:e=>o[e],named:e=>s[e],plural:e=>e[n(a,e.length,r)],linked:(t,a)=>{const n=i(t)(m);return _(a)?(r=a,e.modifiers?e.modifiers[r]:$)(n):n;var r},message:i,type:k(e.processor)&&_(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:c};return m}let E=0;function N(e={}){const t=_(e.version)?e.version:"9.1.9",a=_(e.locale)?e.locale:"en-US",n=g(e.fallbackLocale)||k(e.fallbackLocale)||_(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,r=k(e.messages)?e.messages:{[a]:{}},l=k(e.datetimeFormats)?e.datetimeFormats:{[a]:{}},s=k(e.numberFormats)?e.numberFormats:{[a]:{}},