@freshworks/crayons
Version:
Crayons Web Components library
1 lines • 6.12 kB
JavaScript
System.register(["./p-6fb516eb.system.js"],(function(e){"use strict";var t,a,n,r;return{setters:[function(e){t=e.b;a=e.a;n=e.c;r=e.d}],execute:function(){var i={lessThanXSeconds:{one:"少於 1 秒",other:"少於 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分鐘",lessThanXMinutes:{one:"少於 1 分鐘",other:"少於 {{count}} 分鐘"},xMinutes:{one:"1 分鐘",other:"{{count}} 分鐘"},xHours:{one:"1 小時",other:"{{count}} 小時"},aboutXHours:{one:"大約 1 小時",other:"大約 {{count}} 小時"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大約 1 個星期",other:"大約 {{count}} 個星期"},xWeeks:{one:"1 個星期",other:"{{count}} 個星期"},aboutXMonths:{one:"大約 1 個月",other:"大約 {{count}} 個月"},xMonths:{one:"1 個月",other:"{{count}} 個月"},aboutXYears:{one:"大約 1 年",other:"大約 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超過 1 年",other:"超過 {{count}} 年"},almostXYears:{one:"將近 1 年",other:"將近 {{count}} 年"}};function o(e,t,a){a=a||{};var n;if(typeof i[e]==="string"){n=i[e]}else if(t===1){n=i[e].one}else{n=i[e].other.replace("{{count}}",t)}if(a.addSuffix){if(a.comparison>0){return n+"內"}else{return n+"前"}}return n}var d={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"};var u={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"};var s={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"};var h={date:t({formats:d,defaultWidth:"full"}),time:t({formats:u,defaultWidth:"full"}),dateTime:t({formats:s,defaultWidth:"full"})};var m={lastWeek:"'上個'eeee p",yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:"'下個'eeee p",other:"P"};function l(e,t,a,n){return m[e]}var f={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]};var v={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]};var c={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]};var g={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["週日","週一","週二","週三","週四","週五","週六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]};var b={narrow:{am:"上",pm:"下",midnight:"午夜",noon:"晌",morning:"早",afternoon:"午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"},wide:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"}};var w={narrow:{am:"上",pm:"下",midnight:"午夜",noon:"晌",morning:"早",afternoon:"午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"},wide:{am:"上午",pm:"下午",midnight:"午夜",noon:"中午",morning:"上午",afternoon:"下午",evening:"晚上",night:"夜晚"}};function y(e,t){var a=Number(e);var n=t||{};var r=String(n.unit);switch(r){case"date":return a.toString()+"日";case"hour":return a.toString()+"時";case"minute":return a.toString()+"分";case"second":return a.toString()+"秒";default:return"第 "+a.toString()}}var p={ordinalNumber:y,era:a({values:f,defaultWidth:"wide"}),quarter:a({values:v,defaultWidth:"wide",argumentCallback:function e(t){return Number(t)-1}}),month:a({values:c,defaultWidth:"wide"}),day:a({values:g,defaultWidth:"wide"}),dayPeriod:a({values:b,defaultWidth:"wide",formattingValues:w,defaultFormattingWidth:"wide"})};var W=/^(第\s*)?\d+(日|時|分|秒)?/i;var P=/\d+/i;var M={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i};var S={any:[/^(前)/i,/^(公元)/i]};var x={narrow:/^[1234]/i,abbreviated:/^第[一二三四]季/i,wide:/^第[一二三四]季度/i};var k={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]};var X={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i};var z={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]};var C={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^週[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i};var E={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]};var N={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i};var Y={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}};var D={ordinalNumber:n({matchPattern:W,parsePattern:P,valueCallback:function e(t){return parseInt(t,10)}}),era:r({matchPatterns:M,defaultMatchWidth:"wide",parsePatterns:S,defaultParseWidth:"any"}),quarter:r({matchPatterns:x,defaultMatchWidth:"wide",parsePatterns:k,defaultParseWidth:"any",valueCallback:function e(t){return t+1}}),month:r({matchPatterns:X,defaultMatchWidth:"wide",parsePatterns:z,defaultParseWidth:"any"}),day:r({matchPatterns:C,defaultMatchWidth:"wide",parsePatterns:E,defaultParseWidth:"any"}),dayPeriod:r({matchPatterns:N,defaultMatchWidth:"any",parsePatterns:Y,defaultParseWidth:"any"})};var H=e("default",{code:"zh-HK",formatDistance:o,formatLong:h,formatRelative:l,localize:p,match:D,options:{weekStartsOn:0,firstWeekContainsDate:1}})}}}));