import{a as x}from"./chunk-QYZO4RSP.js";import{C as ee,a as Z,c as q,g as K,n as J}from"./chunk-AWFGIQSJ.js";import{Cb as g,Db as C,Eb as F,Fb as G,Gc as I,Ha as c,Ic as W,Na as k,Nb as L,Ob as H,Pb as P,Qb as B,Ra as E,Rb as $,Sa as v,Wb as j,X as D,Xb as U,Y as R,Ya as T,Yb as z,aa as y,ac as M,cc as X,db as w,dc as Y,eb as p,eh as te,ha as s,ia as d,ob as m,pb as u,qb as h,ta as r,tc as S,ub as O,yb as V,zc as Q}from"./chunk-GKQGDBUU.js";import{i as l}from"./chunk-QVFSZZWQ.js";var N=class{_document;_textarea;constructor(e,a){this._document=a;let t=this._textarea=this._document.createElement("textarea"),i=t.style;i.position="fixed",i.top=i.opacity="0",i.left="-999em",t.setAttribute("aria-hidden","true"),t.value=e,t.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(t);}copy(){let e=this._textarea,a=!1;try{if(e){let t=this._document.activeElement;e.select(),e.setSelectionRange(0,e.value.length),a=this._document.execCommand("copy"),t&&t.focus();}}catch{}return a;}destroy(){let e=this._textarea;e&&(e.remove(),this._textarea=void 0);}},A=(()=>{let e=class e{_document=y(Q);constructor(){}copy(t){let i=this.beginCopy(t),n=i.copy();return i.destroy(),n;}beginCopy(t){return new N(t,this._document);}};l(e,"\u0275fac",function(i){return new(i||e)();}),l(e,"\u0275prov",R({token:e,factory:e.ɵfac,providedIn:"root"}));let o=e;return o;})();var ie=["*"],re=(o,e)=>({"is-input-group":o,"with-border":e}),oe=(()=>{let e=class e{notifier=y(te);clipboard=y(A);value=r(void 0);elementContent=r(void 0);title=r(void 0);notification=r(void 0);withBorder=r(!1,{transform:S});isInputGroup=r(!1,{transform:S});copy(){this.clipboard.copy(this.value()||this.elementContent()?.innerText);let t=this.notification();t&&this.notifier.success(t);}};l(e,"\u0275fac",function(i){return new(i||e)();}),l(e,"\u0275cmp",v({type:e,selectors:[["my-copy-button"]],inputs:{value:[1,"value"],elementContent:[1,"elementContent"],title:[1,"title"],notification:[1,"notification"],withBorder:[1,"withBorder"],isInputGroup:[1,"isInputGroup"]},features:[M([A])],ngContentSelectors:ie,decls:3,vars:5,consts:[["type","button",1,"btn","copy-button",3,"click","ngClass"],["iconName","copy"]],template:function(i,n){i&1&&(F(),m(0,"button",0),g("click",function(){return n.copy();}),h(1,"my-global-icon",1),G(2),u()),i&2&&(p("ngClass",Y(2,re,n.isInputGroup(),n.withBorder())),w("title",n.title()));},dependencies:[I,x],styles:[`button[_ngcontent-%COMP%]:not(.with-border,.is-input-group){border:0}.is-input-group[_ngcontent-%COMP%]{--bs-btn-border-color: var(--input-border-color);--bs-btn-hover-border-color: var(--input-border-color);border-top-left-radius:0;border-bottom-left-radius:0}my-global-icon[_ngcontent-%COMP%]{display:inline-block;width:15px;height:15px;line-height:15px;margin-inline-end:.3125rem}
/*# sourceMappingURL=copy-button.component-FYOMQUHM.css.map */`]}));let o=e;return o;})();var ae=["input"],pe=o=>({"input-error":o});function le(o,e){o&1&&h(0,"my-global-icon",10);}function ce(o,e){o&1&&h(0,"my-global-icon",11);}function ue(o,e){if(o&1){let a=O();m(0,"button",7),g("click",function(){s(a);let i=C();return d(i.toggle());}),T(1,le,1,0,"my-global-icon",8)(2,ce,1,0,"my-global-icon",9),u();}if(o&2){let a=C();p("title",a.toggleTitle),c(),p("ngIf",a.show()),c(),p("ngIf",!a.show());}}function se(o,e){if(o&1&&(m(0,"my-copy-button",12),V(1,1),u()),o&2){C();let a=P(2);p("value",a.value)("isInputGroup",!0);}}function de(o,e){if(o&1&&(m(0,"div",13),B(1),u()),o&2){let a=C();c(),$(a.formError());}}var je=(()=>{let e=class e{inputElement=k("input");inputId=r.required();value=E("");autocomplete=r("off");placeholder=r("");tabindex=r(0);withToggle=r(!0);withCopy=r(!1);readonly=r(!1);show=E(!1);formError=r(void 0);autofocus=r(!1);ariaLabel=r(void 0);get inputType(){return this.show()?"text":"password";}get toggleTitle(){return this.show()?"\u975E\u8868\u793A":"\u8868\u793A";}ngAfterViewInit(){this.autofocus()===!0&&this.inputElement().nativeElement.focus({preventScroll:!0});}toggle(){this.show.set(!this.show());}propagateChange=t=>{};writeValue(t){this.value.set(t);}registerOnChange(t){this.propagateChange=t;}registerOnTouched(){}update(){this.propagateChange(this.value());}focus(){this.inputElement().nativeElement.focus({preventScroll:!0});}};l(e,"\u0275fac",function(i){return new(i||e)();}),l(e,"\u0275cmp",v({type:e,selectors:[["my-input-text"]],viewQuery:function(i,n){i&1&&L(n.inputElement,ae,5),i&2&&H();},inputs:{inputId:[1,"inputId"],value:[1,"value"],autocomplete:[1,"autocomplete"],placeholder:[1,"placeholder"],tabindex:[1,"tabindex"],withToggle:[1,"withToggle"],withCopy:[1,"withCopy"],readonly:[1,"readonly"],show:[1,"show"],formError:[1,"formError"],autofocus:[1,"autofocus"],ariaLabel:[1,"ariaLabel"]},outputs:{value:"valueChange",show:"showChange"},features:[M([{provide:Z,useExisting:D(()=>e),multi:!0}])],decls:6,vars:16,consts:()=>{let t;t="\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F";let i;return i="\u30B3\u30D4\u30FC",[["input",""],i,[1,"input-group"],[1,"form-control",3,"ngModelChange","click","input","change","id","name","autocomplete","value","placeholder","tabindex","ngModel","readonly","type","ngClass"],["type","button","class","btn",3,"title","click",4,"ngIf"],["notification",t,3,"value","isInputGroup",4,"ngIf"],["class","form-error","role","alert",4,"ngIf"],["type","button",1,"btn",3,"click","title"],["iconName","eye-open",4,"ngIf"],["iconName","eye-close",4,"ngIf"],["iconName","eye-open"],["iconName","eye-close"],["notification",t,3,"value","isInputGroup"],["role","alert",1,"form-error"]];},template:function(i,n){if(i&1){let f=O();m(0,"div",2)(1,"input",3,0),z("ngModelChange",function(_){return s(f),U(n.value,_)||(n.value=_),d(_);}),g("ngModelChange",function(){return s(f),d(n.update());})("click",function(){s(f);let _=P(2);return d(_.select());})("input",function(){return s(f),d(n.update());})("change",function(){return s(f),d(n.update());}),u(),T(3,ue,3,3,"button",4)(4,se,2,2,"my-copy-button",5),u(),T(5,de,2,1,"div",6);}i&2&&(c(),p("id",n.inputId())("name",n.inputId())("autocomplete",n.autocomplete())("value",n.value())("placeholder",n.placeholder())("tabindex",n.tabindex()),j("ngModel",n.value),p("readonly",n.readonly())("type",n.inputType)("ngClass",X(14,pe,n.formError())),w("aria-label",n.ariaLabel()),c(2),p("ngIf",n.withToggle()),c(),p("ngIf",n.withCopy()),c(),p("ngIf",n.formError()));},dependencies:[ee,q,K,J,I,W,x,oe],styles:[`input[_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:auto;max-width:auto;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[_ngcontent-%COMP%]:focus, input[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width: calc(auto + 40px)){input[_ngcontent-%COMP%]{width:100%}}.btn[_ngcontent-%COMP%], my-copy-button[_ngcontent-%COMP%]     .btn{background-color:var(--input-bg);border-left:1px solid var(--bg)}.btn[_ngcontent-%COMP%]:hover, my-copy-button[_ngcontent-%COMP%]     .btn:hover{opacity:.8}.btn[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{position:relative;top:0;right:0;display:inline-block;width:18px;height:18px;line-height:18px}.btn[_ngcontent-%COMP%]:not(.icon-only)   my-global-icon[_ngcontent-%COMP%]{margin-inline-end:.1875rem}.copy-text[_ngcontent-%COMP%]{font-size:14px;margin-left:5px;vertical-align:top}
/*# sourceMappingURL=input-text.component-VGICJNC6.css.map */`]}));let o=e;return o;})();export{oe as a,je as b};/**i18n:42345378061bf3c93df67acfa161b751a7b03cc91f3ede7c1f1cdf2bba62fe26*///# sourceMappingURL=chunk-XMYCMRMC.js.map