PageSourceSearch

https://www.matterhorngotthardbahn.ch/_nuxt/Button.fhvNspso.js

js matterhorngotthardbahn.ch collected 2026-10-02 03:10:32 UTC 5,299 bytes, 1 lines download raw bytes

1import{G as j,_ as v}from"./generic-link.koezWb8b.js";import{L as p,N as o,O as s,U as a,T as d,ba as g,bb as _,R as u,a6 as I,a7 as y,a8 as B,S,bt as h,a_ as k,P as f,aK as C}from"./entry.EKnbqgTX.js";import{I as w}from"./icon-svg.V2h_sL4l.js";const L={props:{loaderType:{type:String,default:"pulse"},align:{type:String,default:"center"}},computed:{computedAlignClass(){if(this.align==="start")return"j-pulse--start";if(this.align==="center")return"j-pulse--center";if(this.align==="end")return"j-pulse--end"}}},c=n=>(g("data-v-beb205bd"),n=n(),_(),n),T={class:"j-loader"},O={key:0,class:"j-spinner"},q=c(()=>u("div",{class:"j-spinner__icon"},null,-1)),x=[q],A=c(()=>u("div",{class:"j-pulse__circle"},null,-1)),M=c(()=>u("div",{class:"j-pulse__circle"},null,-1)),N=c(()=>u("div",{class:"j-pulse__circle"},null,-1)),P=[A,M,N];function z(n,l,t,m,i,e){return o(),s("div",T,[t.loaderType==="spinner"?(o(),s("div",O,x)):a("",!0),t.loaderType==="pulse"?(o(),s("div",{key:1,class:d(["j-pulse",t.align])},P,2)):a("",!0)])}const D=p(L,[["render",z],["__scopeId","data-v-beb205bd"]]),K={name:"JButton",components:{GenericLink:j,LoadingIcon:D,IconSvg:w},props:{label:{type:String,default:null},href:{type:String,required:!1,default:null},icon:{default:null,type:String},iconSvg:{type:String,default:null},iconOnly:{type:Boolean,default:!1},primary:{type:Boolean,required:!1},secondary:{type:Boolean,required:!1},neutral:{type:Boolean,required:!1},danger:{type:Boolean,required:!1},outlineColor:{type:Boolean,required:!1},outlineDark:{type:Boolean,required:!1},outlineLight:{type:Boolean,required:!1},sm:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},loading:{type:Boolean,default:!1},noIconBg:{type:Boolean,default:!1},page:{type:Object,default:null},route:{type:Object,default:null},target:{type:String,default:null},justifyLeft:{type:Boolean,default:!1},to:{type:String,default:void 0},buttonType:{type:String,default:"button"},focusable:{type:Boolean,default:!0}},data(){return{outlineAllowed:!0}},computed:{tabIndex(){return this.focusable?"0":"-1"},dynamicProps(){const n={};return this.to&&(n.to=this.to),this.isButtonTag&&(n.type=this.buttonType),n},ringClasses(){return{ring:!0,"ring-justify-left":this.justifyLeft}},hasNonIconContent(){return!!this.label||!!this.$slots.default},hasIcon(){return!!this.icon||!!this.iconSvg},hasOnlyIcon(){return this.iconOnly?!0:(!!this.computedIcon||!!this.iconSvg)&&!this.hasNonIconContent},computedIcon(){return this.disabled?"disabled":this.icon},tag(){return this.href||this.page||this.route?"GenericLink":this.to?v:"button"},isButtonTag(){return this.tag==="button"},disabledComputed(){return this.disabled||this.loading},buttonClasses(){return{"j-button--outline-allowed":this.outlineAllowed,"j-button--icon":!!this.icon||this.iconOnly,"j-button--icon-only":this.hasOnlyIcon,"j-button--primary":this.primary,"j-button--loading":this.loading,"j-button--secondary":this.secondary,"j-button--neutral":this.neutral,"j-button--danger":this.danger,"j-button--outline-color":this.outlineColor,"j-button--outline-dark":this.outlineDark,"j-button--outline-light":this.outlineLight,"j-button--outline":this.outlineColor||this.outlineDark||this.outlineLight,"j-button--sm":this.sm,"j-button--disabled":this.disabledComputed,"j-button--no-icon-bg":this.noIconBg,"j-button--link":!this.isButtonTag}}}},G=n=>(g("data-v-277f57c6"),n=n(),_(),n),J={key:0,class:"j-button--loading-container"},H=G(()=>u("div",{class:"j-button--loading-icon"},null,-1)),V=[H],E=["data-cy-icon"],F={key:2,class:"j-button--content"},R=["data-cy-icon"],U=["data-cy-label","innerHTML"],Q={key:2,class:"j-button--label"};function W(n,l,t,m,i,e){const b=I("IconSvg");return t.loading&&t.sm?a("",!0):(o(),y(k(e.tag),S({key:0,url:t.href,class:"j-button",page:t.page,route:t.route,target:t.target},e.dynamicProps,{"data-abstract-init":t.primary?"primary button":"secondary button",class:e.buttonClasses,disabled:e.disabledComputed,tabindex:e.tabIndex,onBlur:l[0]||(l[0]=r=>i.outlineAllowed=!0),onKeyup:l[1]||(l[1]=h(r=>i.outlineAllowed=!0,["enter"])),onKeydown:l[2]||(l[2]=h(r=>i.outlineAllowed=!0,["space"])),onMousedown:l[3]||(l[3]=r=>i.outlineAllowed=!0),onMouseup:l[4]||(l[4]=r=>i.outlineAllowed=!1)}),{default:B(()=>[u("span",{class:d(e.ringClasses)}
1,[t.loading?(o(),s("span",J,V)):a("",!0),e.hasOnlyIcon?(o(),s(f,{key:1},[e.computedIcon?(o(),s("span",{key:0,class:d(`j-button--icon-span james-icon-${e.computedIcon}`),"data-cy-icon":e.computedIcon},null,10,E)):t.iconSvg?(o(),y(b,{key:1,icon:t.iconSvg,size:"24"},null,8,["icon"])):a("",!0)],64)):(o(),s("span",F,[e.hasIcon?(o(),s(f,{key:0},[e.computedIcon?(o(),s("span",{key:0,class:d(`j-button--icon-span james-icon-${e.computedIcon}`),"data-cy-icon":e.computedIcon},null,10,R)):t.iconSvg?(o(),y(b,{key:1,icon:t.iconSvg,size:"24"},null,8,["icon"])):a("",!0)],64)):a("",!0),t.label?(o(),s("span",{key:1,"data-cy-label":t.label,class:"j-button--label",innerHTML:t.label},null,8,U)):(o(),s("span",Q,[C(n.$slots,"default",{},void 0,!0)]))]))],2)]),_:3},16,["url","page","route","target","data-abstract-init","class","disabled","tabindex"]))}const X=p(K,[["render",W],["__scopeId","data-v-277f57c6"]]),tt=Object.freeze(Object.defineProperty({__proto__:null,default:X},Symbol.toStringTag,{value:"Module"}));export{tt as B,X as J,D as L};

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.