PageSourceSearch

https://www.fsmglobal.hk/9.00cbfcd7442b404d96b3.js

js fsmglobal.hk collected 2026-10-09 23:58:45 UTC 10,522 bytes, 2 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{"0Fs0":function(t,e,i){"use strict";i.d(e,"a",(function(){return w}));var n=i("ofXK"),s=i("sYmb"),o=i("3Pt+"),r=i("OzZK"),a=i("OtHt"),d=i("dEAy"),u=i("VWX/"),c=i("4Kzv"),h=i("MZ6w"),l=i("TaO5"),p=i("nJia"),g=i("SiQl"),f=i("NZ3S"),C=i("jnL5"),m=i("t4Ps"),b=i("26om"),y=i("gvH3"),v=i("MI2K"),F=i("t08x"),I=i("Z8C4"),L=i("fXoL");let w=(()=>{class t{}return t.\u0275mod=L["\u0275\u0275defineNgModule"]({type:t}),t.\u0275inj=L["\u0275\u0275defineInjector"]({factory:function(e){return new(e||t)},imports:[[n.c,u.a,o.o,o.E,s.d,c.a,h.a,r.c,d.c,a.b,l.c,p.b,g.a,f.b.forRoot({codeLength:1,isCharsCode:!0}),C.a,m.a,b.a,y.a,v.a,I.a,F.a]]}),t})()},NZ3S:function(t,e,i){"use strict";i.d(e,"a",(function(){return c})),i.d(e,"b",(function(){return h}));var n=i("fXoL"),s=i("ofXK");const o=["input"];function r(t,e){if(1&t){const t=n["\u0275\u0275getCurrentView"]();n["\u0275\u0275elementStart"](0,"span"),n["\u0275\u0275elementStart"](1,"input",1,2),n["\u0275\u0275listener"]("click",(function(e){return n["\u0275\u0275restoreView"](t),n["\u0275\u0275nextContext"]().onClick(e)}))("paste",(function(i){n["\u0275\u0275restoreView"](t);const s=e.index;return n["\u0275\u0275nextContext"]().onPaste(i,s)}))("input",(function(i){n["\u0275\u0275restoreView"](t);const s=e.index;return n["\u0275\u0275nextContext"]().onInput(i,s)}))("keydown",(function(i){n["\u0275\u0275restoreView"](t);const s=e.index;return n["\u0275\u0275nextContext"]().onKeydown(i,s)})),n["\u0275\u0275elementEnd"](),n["\u0275\u0275elementEnd"]()}if(2&t){const t=n["\u0275\u0275nextContext"]();n["\u0275\u0275classProp"]("code-hidden",t.isCodeHidden),n["\u0275\u0275advance"](1),n["\u0275\u0275property"]("type",t.inputType)("disabled",t.disabled),n["\u0275\u0275attribute"]("autocapitalize",t.autocapitalize)}}const a=new n.InjectionToken("CodeInputComponentConfig"),d={codeLength:4,inputType:"tel",initialFocusField:void 0,isCharsCode:!1,isCodeHidden:!1,isPrevFocusableAfterClearing:!0,isFocusingOnLastByClickIfFilled:!1,code:void 0,disabled:!1,autocapitalize:void 0};var u=function(t){return t[t.ready=0]="ready",t[t.reset=1]="reset",t}({});let c=(()=>{class t{constructor(t){if(this.isNonDigitsCode=!1,this.codeChanged=new n.EventEmitter,this.codeCompleted=new n.EventEmitter,this.placeholders=[],this.inputs=[],this.inputsStates=[],this.state={isFocusingAfterAppearingCompleted:!1,isInitialFocusFieldEnabled:!1},Object.assign(this,d),t)for(const e in t)t.hasOwnProperty(e)&&d.hasOwnProperty(e)&&(this[e]=t[e])}ngOnInit(){this.state.isInitialFocusFieldEnabled=!this.isEmpty(this.initialFocusField),this.onCodeLengthChanges()}ngAfterViewInit(){this.inputsListSubscription=this.inputsList.changes.subscribe(this.onInputsListChanges.bind(this)),this.onInputsListChanges(this.inputsList)}ngAfterViewChecked(){this.focusOnInputAfterAppearing()}ngOnChanges(t){t.code&&this.onInputCodeChanges(),t.codeLength&&this.onCodeLengthChanges()}ngOnDestroy(){this.inputsListSubscription&&this.inputsListSubscription.unsubscribe()}reset(t=!1){this.onInputCodeChanges(),this.state.isInitialFocusFieldEnabled&&this.focusOnField(this.initialFocusField),t&&this.emitChanges()}focusOnField(t){if(t>=this._codeLength)throw new Error("The index of the focusing input box should be less than the codeLength.");this.inputs[t].focus()}onClick(t){if(!this.isFocusingOnLastByClickIfFilled)return;const e=this.inputs[this._codeLength-1];t.target!==e&&this.getCurrentFilledCode().length>=this._codeLength&&setTimeout(()=>e.focus())}onInput(t,e){const i=t.target,n=t.data||i.value;if(this.isEmpty(n))return;if(!this.canInputValue(n))return t.preventDefault(),t.stopPropagation(),this.setInputValue(i,null),void this.setStateForInput(i,u.reset);const s=n.toString().trim().split("");for(let r=0;r<s.length;r++){const t=r+e;if(t>this._codeLength-1)break;this.setInputValue(this.inputs[t],s[r])}this.emitChanges();const o=e+s.length;o>this._codeLength-1?i.blur():this.inputs[o].focus()}onPaste(t,e){t.preventDefault(),t.stopPropagation();const i=t.clipboardData?t.clipboardData.getData("text").trim():void 0;if(this.isEmpty(i))return;const n=i.split("");let s=0;for(let o=e;o<this.inputs.length&&s!==n.length;o++){const t=this.inputs[o],e=n[s];if(!this.canInputValue(e))return this.setInputValue(t,null),void this.setStateForInput(t,u.reset);this.setInputValue(t,e.toString()),s++}this.inputs[e].blur(),this.emitChanges()}onKeydown(t,e){return i=this,void 0,s=function*(){const i=t.target,n=this.isEmpty(i.value),s=e-1,o=yield this.isBackspaceKey(t),r=this.isDeleteKey(t);(o||r)&&(t.preventDefault(),this.setInputValue(i,null),n||this.emitChanges(),s<0||r||(n||this.isPrevFocusableAfterClearing)&&this.inputs[s].focus())}
1,new((n=void 0)||(n=Promise))((function(e,o){function r(e){try{d(s.next(e))}catch(t){o(t)}}function a(e){try{d(s.throw(e))}catch(t){o(t)}}function d(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(t){t(i)}))).then(r,a)}d((s=s.apply(i,[])).next())}));var i,n,s}onInputCodeChanges(){if(!this.inputs.length)return;if(this.isEmpty(this.code))return void this.inputs.forEach(t=>{this.setInputValue(t,null)});const t=this.code.toString().trim().split("");let e=!0;for(const i of t)if(!this.canInputValue(i)){e=!1;break}this.inputs.forEach((i,n)=>{this.setInputValue(i,e?t[n]:null)})}onCodeLengthChanges(){if(this.codeLength)if(this._codeLength=this.codeLength,this._codeLength>this.placeholders.length){const t=Array(this._codeLength-this.placeholders.length).fill(1);this.placeholders.splice(this.placeholders.length-1,0,...t)}else this._codeLength<this.placeholders.length&&this.placeholders.splice(this._codeLength)}onInputsListChanges(t){if(t.length>this.inputs.length){const e=t.filter((t,e)=>e>this.inputs.length-1);this.inputs.splice(this.inputs.length,0,...e.map(t=>t.nativeElement));const i=Array(e.length).fill(u.ready);this.inputsStates.splice(this.inputsStates.length,0,...i)}else t.length<this.inputs.length&&(this.inputs.splice(t.length),this.inputsStates.splice(t.length));this.onInputCodeChanges()}focusOnInputAfterAppearing(){this.state.isInitialFocusFieldEnabled&&(this.state.isFocusingAfterAppearingCompleted||(this.focusOnField(this.initialFocusField),this.state.isFocusingAfterAppearingCompleted=document.activeElement===this.inputs[this.initialFocusField]))}emitChanges(){setTimeout(()=>this.emitCode(),50)}emitCode(){const t=this.getCurrentFilledCode();this.codeChanged.emit(t),t.length>=this._codeLength&&this.codeCompleted.emit(t)}getCurrentFilledCode(){let t="";for(const e of this.inputs)this.isEmpty(e.value)||(t+=e.value);return t}isBackspaceKey(t){return t.key&&"backspace"===t.key.toLowerCase()||t.keyCode&&8===t.keyCode?Promise.resolve(!0):t.keyCode&&229===t.keyCode?new Promise(e=>{setTimeout(()=>{const i=t.target,n=this.getStateForInput(i)===u.reset;n&&this.setStateForInput(i,u.ready),e(0===i.selectionStart&&!n)})}):Promise.resolve(!1)}isDeleteKey(t){return t.key&&"delete"===t.key.toLowerCase()||t.keyCode&&46===t.keyCode}setInputValue(t,e){this.isEmpty(e)?(t.value="",t.classList.remove("has-value"),t.parentElement.classList.add("empty")):(t.value=e,t.classList.add("has-value"),t.parentElement.classList.remove("empty"))}canInputValue(t){return!this.isEmpty(t)&&(/^[0-9]+$/.test(t.toString())||this.isCharsCode||this.isNonDigitsCode)}setStateForInput(t,e){const i=this.inputs.indexOf(t);i<0||(this.inputsStates[i]=e)}getStateForInput(t){const e=this.inputs.indexOf(t);return this.inputsStates[e]}isEmpty(t){return null==t||!t.toString().length}}return t.\u0275fac=function(e){return new(e||t)(n["\u0275\u0275directiveInject"](a,8))},t.\u0275cmp=n["\u0275\u0275defineComponent"]({type:t,selectors:[["code-input"]],viewQuery:function(t,e){var i;1&t&&n["\u0275\u0275viewQuery"](o,!0),2&t&&n["\u0275\u0275queryRefresh"](i=n["\u0275\u0275loadQuery"]())&&(e.inputsList=i)},inputs:{isNonDigitsCode:"isNonDigitsCode",codeLength:"codeLength",inputType:"inputType",initialFocusField:"initialFocusField",isCharsCode:"isCharsCode",isCodeHidden:"isCodeHidden",isPrevFocusableAfterClearing:"isPrevFocusableAfterClearing",isFocusingOnLastByClickIfFilled:"isFocusingOnLastByClickIfFilled",code:"code",disabled:"disabled",autocapitalize:"autocapitalize"},outputs:{codeChanged:"codeChanged",codeCompleted:"codeCompleted"},features:[n["\u0275\u0275NgOnChangesFeature"]],decls:1,vars:1,consts:[[3,"code-hidden",4,"ngFor","ngForOf"],["autocomplete","one-time-code",3,"type","disabled","click","paste","input","keydown"],["input",""]],template:function(t,e){1&t&&n["\u0275\u0275template"](0,r,3,5,"span",0),2&t&&n["\u0275\u0275property"]("ngForOf",e.placeholders)},directives:[s.s],styles:["[_nghost-%COMP%]{--text-security-type:disc;--item-spacing:4px;--item-height:4.375em;--item-border:1px solid #ddd;--item-border-bottom:1px solid #ddd;--item-border-has-value:1px solid #ddd;--item-border-bottom-has-value:1px solid #ddd;--item-border-focused:1px solid #ddd;--item-border-bottom-focused:1px solid #ddd;--item-shadow-focused:0px 1px 5px #ddd;--item-border-radius:5px;--item-background:transparent;--color:#171516;display:flex;transform:translateZ(0);font-size:inherit;color:var(--color)}[_nghost-%COMP%]   span[_ngcontent-%COMP%]{display:block;flex:1;padding-right:var(--item-spacing)}[_nghost-%COMP%]   span[_ngcontent-%COMP%]:first-child{padding-left:var(--item-spacing)}[_nghost-%COMP%]   span.code-hidden[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{text-security:var(--text-security-type);-webkit-text-security:var(--text-security-type);-moz-text-security:var(--text-security-type)}[_nghost-%COMP%]   input[_ngcontent-%COMP%]{width:100%;height:var(--item-height);color:inherit;background:var(--item-background);text-align:center;font-size:inherit;border:var(--item-border);border-bottom:var(--item-border-bottom);border-radius:var(--item-border-radius);-webkit-appearance:none;transform:translateZ(0);-webkit-transform:translateZ(0);outline:none}[_nghost-%COMP%]   input.has-value[_ngcontent-%COMP%]{border:var(--item-border-has-value);border-bottom:var(--item-border-bottom-has-value)}[_nghost-%COMP%]   input[_ngcontent-%COMP%]:focus{border:var(--item-border-focused);border-bottom:var(--item-border-bottom-focused);box-shadow:var(--item-shadow-focused)}"]}),t})(),h=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[{provide:a,useValue:e}]}}}return t.\u0275mod=n["\u0275\u0275defineNgModule"]({type:t}),t.\u0275inj=n["\u0275\u0275defineInjector"]({factory:function(e){return new(e||t)},imports:[[s.c]]}),t})()}}]);
2//# sourceMappingURL=9.00cbfcd7442b404d96b3.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.