PageSourceSearch

https://www.raiffeisendigital.com/etc.clientlibs/rbi/clientlibs/cl…/chunk-currencyexchange.1788431024728.js

js raiffeisendigital.com collected 2026-10-01 14:53:18 UTC 14,666 bytes, 1 lines download raw bytes

1var e=Object.defineProperty,t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,i=(t,r,a)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[r]=a,n=(e,n)=>{for(var c in n||(n={}))r.call(n,c)&&i(e,c,n[c]);if(t)for(var c of t(n))a.call(n,c)&&i(e,c,n[c]);return e};import{d as c,x as s,y as o,z as l,D as d,Q as u,r as m,C as p,P as y,V as g,E as h,W as f,_ as b,R as F,S as C,U as T,H as v,B as D,ae as S}from"./chunk-chunk-vendor.1788431024728.js";import{_,f as x,F as P,c as k,d as $,e as j,D as q,g as w,h as N,i as O}from"/etc.clientlibs/rbi/clientlibs/clientlib-site.lc-dab781d7544ad4cb4581dac4f4afd7be-lc.min.js";import{g as R}from"./chunk-currency.1788431024728.js";import{m as I,d as L}from"./chunk-lodash.1788431024728.js";import{D as A}from"./chunk-dateinput.1788431024728.js";import{T as E}from"./chunk-tabs.1788431024728.js";import{f as H,a as V}from"./chunk-dateFormatter.1788431024728.js";import{f as M}from"./chunk-formatISO.1788431024728.js";import"./chunk-gsap.1788431024728.js";import"./chunk-vee-validate.1788431024728.js";import"./chunk-xstate.1788431024728.js";import"./chunk-dompurify.1788431024728.js";import"./chunk-mathjs.1788431024728.js";const z=_(c({name:"FieldtextCmp",props:{data:{type:String,required:!0},headerType:{type:String,default:"h2"},isHeading:{type:Boolean,default:!1}}}),[["render",function(e,t,r,a,i,n){return s(),o(m(e.isHeading?e.headerType:"span"),null,{default:l(()=>[d(u(e.data),1)]),_:1})}]]),B=c({name:"FieldflagCmp",inject:{injectedFlagPath:{from:"flagPath",default:""}},props:{data:{type:String,required:!0}},computed:{flagPath(){var e;return null==(e=this.injectedFlagPath)?void 0:e.replace("{0}",this.data)}}}),Y={class:"cmp-currencyexchangestacked__header--flag"},U=["src"];const G=_(B,[["render",function(e,t,r,a,i,n){return s(),p("span",Y,[y("img",{src:e.flagPath,alt:""},null,8,U)])}]]),Q=c({name:"FielddataCmp",props:{label:{type:String,required:!0},data:{type:[Number,String],required:!1}},computed:{dataToString(){return"number"==typeof this.data?this.data.toFixed(6):"string"==typeof this.data?this.data:""}},methods:{getFormattedNumber:e=>x(e,P)}}),W={class:"cmp-currencyexchangestacked__field-item__label"},J={class:"cmp-currencyexchangestacked__field-item__value"};const K=c({name:"CurrencyexchangestackedCmp",components:{FieldText:z,FieldFlag:G,FieldData:_(Q,[["render",function(e,t,r,a,i,n){return s(),p("div",null,[y("dt",W,u(e.label),1),y("dd",J,[e.dataToString?(s(),p(g,{key:0},[d(u(e.getFormattedNumber(e.dataToString)),1)],64)):h("",!0)])])}]])},inject:{flagPath:{default:""}},props:{category:{type:Object,required:!0},rate:{type:Object,required:!0},useTarget:{type:Boolean,required:!0},headerType:{type:String,default:"h2"}},computed:{categoryCurrencyFields(){return this.category.currencyProperties||[]},categoryRateFields(){return this.category.rateProperties||[]},categoryCurrencyInformation(){return this.category.currencyInformation||[]},currencyList(){const e=this.useTarget?"left":"right",t=t=>{const r="cmp-currencyexchangestacked__field-item";switch(t){case`currencyPair.${e}.iconCode`:return{component:"FieldFlag",$attrs:{class:`${r}--flag`}};case`currencyPair.${e}.name`:return{component:"FieldText",$attrs:{class:`${r}--name`,headerType:this.headerType,isHeading:!0}};case`currencyPair.${e}.code`:return{component:"FieldText",$attrs:{class:`${r}--code`}};default:return{component:"FieldData",$attrs:{class:`${r}--default`}}}};return(this.rate.currencyList||[]).map(r=>({currencyFields:[this.categoryCurrencyFields,this.categoryCurrencyInformation].flat().filter(t=>[`currencyPair.${e}.iconCode`,`currencyPair.${e}.name`,`currencyPair.${e}.code`].includes(t.id.toString())).map(e=>{var a;return n({currency:r,data:null==(a=R(r,e.id.toString()))?void 0:a.toString()},t(e.id.toString()))}),rateFields:this.categoryRateFields.filter((e,t)=>t<2).map(e=>n({currency:r,label:e.title,data:R(r,e.id.toString())},t(e.id.toString())))}))}}}),X={class:"cmp-currencyexchangestacked-container is-cmp-container"},Z={class:"cmp-currencyexchangestacked theme theme-on-surface-normal"},ee={class:"cmp-currencyexchangestacked__header"},te={class:"cmp-currencyexchangestacked__rates"};const re=_(K,[["render",function(e,t,r,a,i,n){return s(),p("div",X,[y("div",Z,[(s(!0),p(g,
1null,f(e.currencyList,(e,t)=>(s(),p("div",{key:t,class:"cmp-currencyexchangestacked__item"},[y("div",ee,[(s(!0),p(g,null,f(e.currencyFields,e=>(s(),o(m(e.component),b({key:e.id,class:[e.class,"cmp-currencyexchangestacked__field-item"],data:e.data},{ref_for:!0},e.$attrs),null,16,["class","data"]))),128))]),y("dl",te,[(s(!0),p(g,null,f(e.rateFields,e=>(s(),o(m(e.component),b({key:e.id,class:[e.class,"cmp-currencyexchangestacked__field-item"],data:e.data,label:e.label},{ref_for:!0},e.$attrs),null,16,["class","data","label"]))),128))])]))),128))])])}]]);const ae=_(c({name:"FielddataCmp",props:{data:{type:[String,Number],required:!1}},computed:{dataToString(){return"number"==typeof this.data?this.data.toFixed(6):"string"==typeof this.data?this.data:""}},methods:{getFormattedNumber:e=>x(e,P)}}),[["render",function(e,t,r,a,i,n){return s(),p("td",null,[e.dataToString?(s(),p(g,{key:0},[d(u(e.getFormattedNumber(e.dataToString)),1)],64)):h("",!0)])}]]),ie=c({name:"FieldflagCmp",inject:{injectedFlagPath:{from:"flagPath",default:""}},props:{data:{type:String,required:!0}},computed:{flagPath(){var e;return null==(e=this.injectedFlagPath)?void 0:e.replace("{0}",this.data)}}}),ne=["src"];const ce=_(ie,[["render",function(e,t,r,a,i,n){return s(),p("td",null,[y("img",{src:e.flagPath,width:"24",height:"24",alt:""},null,8,ne)])}]]);const se=_(c({name:"FieldtextCmp",props:{data:{type:[String,Number],required:!0}}}),[["render",function(e,t,r,a,i,n){return s(),p("td",null,[e.data?(s(),p(g,{key:0},[d(u(e.data),1)],64)):h("",!0)])}]]),oe=c({name:"FieldheadingCmp",props:{data:{type:String,required:!0}}}),le=["textContent"];const de=c({name:"CurrencyexchangetableCmp",components:{FieldData:ae,FieldFlag:ce,FieldText:se,FieldHeading:_(oe,[["render",function(e,t,r,a,i,n){return s(),p("th",{textContent:u(e.data)},null,8,le)}]])},props:{category:{type:Object,required:!0},rate:{type:Object,required:!0}},computed:{categoryCurrencyFields(){return this.category.currencyProperties||[]},categoryRateFields(){return this.category.rateProperties||[]},categoryInformationFields(){return this.category.currencyInformation||[]},headingFields(){const e=e=>{const t="cmp-currencyexchangetable__header-cell";switch(e){case"currencyPair.left.iconCode":case"currencyPair.right.iconCode":case"currencyPair.left.name":case"currencyPair.right.name":return{$attrs:{class:`${t}--currency`}};case"currencyPair.left.code":case"currencyPair.right.code":case"currencyPair.left.numericCode":case"currencyPair.right.numericCode":return{$attrs:{class:`${t}--currency-information`}};case"unit":return{$attrs:{class:`${t}--unit`}};default:return{$attrs:{class:`${t}--default`}}}},t=this.categoryCurrencyFields.filter((e,t)=>t<1).map(t=>I({data:this.category.currencyLabel,component:"FieldHeading",$attrs:{colspan:this.categoryCurrencyFields.length}},e(t.id.toString()))),r=this.categoryRateFields.map(t=>I({data:t.title,component:"FieldHeading"},e(t.id.toString())));return[...t,...this.categoryInformationFields.map(t=>I({data:t.title,component:"FieldHeading"},e(t.id.toString()))),...r]},dataRows(){const e=[...this.categoryCurrencyFields,...this.categoryInformationFields,...this.categoryRateFields];return(this.rate.currencyList||[]).map(t=>e.map(e=>n({currency:t,data:R(t,e.id.toString())},(e=>{const t="cmp-currencyexchangetable__cell";switch(e){case"currencyPair.left.iconCode":case"currencyPair.right.iconCode":return{component:"FieldFlag",$attrs:{class:`${t}--flag`}};case"currencyPair.left.name":case"currencyPair.right.name":return{component:"FieldText",$attrs:{class:`${t}--name`}};case"currencyPair.left.code":case"currencyPair.right.code":return{component:"FieldText",$attrs:{class:`${t}--code`}};case"currencyPair.left.numericCode":case"currencyPair.right.numericCode":return{component:"FieldText",$attrs:{class:`${t}--numeric-code`}};case"unit":return{component:"FieldText",$attrs:{class:`${t}--unit`}};default:return{component:"FieldData",$attrs:{class:`${t}--default`}}}})(e.id.toString()))))}}}),ue={class:"cmp-currencyexchangetable-container"},me={class:"cmp-currencyexchangetable"},pe={key:0},ye={key:0};const ge=_(de,[["render",function(e,t,r,a,i,n){return s(),p("div",ue,[y("div",me,[e.headingFields.length&&e.dataRows.length?(s(),p("table",pe,[e.headingFields.length?(s(),p("tr",ye,[(s(!0),p(g,
1null,f(e.headingFields,(e,t)=>(s(),o(m(e.component),b({key:t,data:e.data,class:"cmp-currencyexchangetable__header-cell"},{ref_for:!0},e.$attrs),null,16,["data"]))),128))])):h("",!0),(s(!0),p(g,null,f(e.dataRows,(e,t)=>(s(),p("tr",{key:t},[(s(!0),p(g,null,f(e,(e,t)=>(s(),o(m(e.component),b({key:t,data:e.data,class:"cmp-currencyexchangetable__cell"},{ref_for:!0},e.$attrs),null,16,["data"]))),128))]))),128))])):h("",!0)])])}]]),he=c({name:"CurrencyexchangeRateProviderCmp",props:{category:{type:Object,required:!0},inputDate:{type:String,required:!0}},data:()=>({showError:!1,isReady:!1,rate:null,errorResponse:{}}),methods:{debounceOnSubmit:L(function(e){this.getCurrencyData(e)},500,{leading:!0,trailing:!0}),getCurrencyData(e){var t;const r=null==(t=this.category.apiUrl)?void 0:t.replace("{0}",k(new Date(e),$));this.showError=!1,j.request({url:r,method:"GET",withCredentials:!0}).then(e=>{const t=e.data;this.rate=t.rates[0]}).catch(()=>{this.showError=!0}).finally(()=>{this.isReady=!0})}},mounted(){this.getCurrencyData(this.inputDate)},watch:{inputDate(e,t){e!==t&&this.debounceOnSubmit(e)}}}),fe={key:0,class:"cmp-form__feedback"};const be=_(he,[["render",function(e,t,r,a,i,n){const c=F("v-alert");return C((s(),p("div",null,[e.showError?(s(),p("div",fe,[v(c,{class:"cmp-form__error",tag:"p"},{default:l(()=>[d(u(e.errorResponse.errorMessage),1)]),_:1})])):D(e.$slots,"default",{rate:e.rate},void 0,void 0,1)],512)),[[T,e.isReady]])}]]),Fe=c({name:"CurrencyinformationCmp",setup:()=>({DISPLAY_TIME_FORMAT:w,DISPLAY_DATETIME_FORMAT:q}),props:{listNumber:{type:Number,default:NaN},createdTime:{type:String,default:""},validityDate:{type:String,default:""},categoriesSetup:{type:Object,required:!0}},methods:{formatDate:H},computed:{isListNumber(){return this.categoriesSetup.listNumber.active&&!Number.isNaN(this.listNumber)},isValDate(){return this.categoriesSetup.validityDate.active&&""!==this.validityDate},isCreatedDate(){return this.categoriesSetup.creationDate.active&&""!==this.createdTime},isCreatedTime(){return this.categoriesSetup.creationTime.active&&""!==this.createdTime},isCreatedDateAndTime(){return this.categoriesSetup.creationDate.active&&this.categoriesSetup.creationTime.active&&""!==this.createdTime},localizedCreatedTime(){return V(this.createdTime)},localizedValidityDate(){return V(this.validityDate)}}}),Ce={class:"cmp-currencyinformation"},Te={key:0,class:"cmp-currencyinformation--item"},ve={key:1,class:"cmp-currencyinformation--item"},De={key:2,class:"cmp-currencyinformation--item"},Se={key:3,class:"cmp-currencyinformation--item"},_e={key:4,class:"cmp-currencyinformation--item"};const xe=c({name:"CurrencyexchangeCmp",components:{Currencyexchangetable:ge,Currencyexchangestacked:re,Dateinput:A,CurrencyexchangeRateProvider:be,Tabs:E,Currencyinformation:_(Fe,[["render",function(e,t,r,a,i,n){var c,o,l,d,m,y,g,f,b,F;return s(),p("div",Ce,[e.isListNumber?(s(),p("span",Te,u(`${null==(o=null==(c=e.categoriesSetup)?void 0:c.listNumber)?void 0:o.title} ${e.listNumber}`),1)):h("",!0),e.isValDate?(s(),p("span",ve,u(`${null==(d=null==(l=e.categoriesSetup)?void 0:l.validityDate)?void 0:d.title} ${e.formatDate(e.localizedValidityDate)}`),1)):h("",!0),e.isCreatedDate&&!e.isCreatedTime?(s(),p("span",De,u(`${null==(y=null==(m=e.categoriesSetup)?void 0:m.creationDate)?void 0:y.title} ${e.formatDate(e.localizedCreatedTime)}`),1)):h("",!0),e.isCreatedTime&&!e.isCreatedDate?(s(),p("span",Se,u(`${null==(f=null==(g=e.categoriesSetup)?void 0:g.creationTime)?void 0:f.title} ${e.formatDate(e.localizedCreatedTime,e.DISPLAY_TIME_FORMAT)}`),1)):h("",!0),e.isCreatedDateAndTime?(s(),p("span",_e,u(`${null==(F=null==(b=e.categoriesSetup)?void 0:b.creationDate)?void 0:F.title} ${e.formatDate(e.localizedCreatedTime,e.DISPLAY_DATETIME_FORMAT)}`),1)):h("",!0)])}]])},props:{flagPath:{type:String,required:!0},useTarget:{type:Boolean,required:!0},i18n:{type:Object,required:!0},categories:{type:Object,required:!0},showHistory:{type:Boolean,required:!0},latestDate:{type:String,required:!1},oldestDate:{type:String,required:!1},categoriesSetup:{type:Object,required:!0},headerType:{type:String,default:"h2"}},data(){return{inputDate:this.latestDate||M(new Date,{representation:"date"})}},provide(){return{i18n:this.i18n,flagPath:this.flagPath}},computed:{showHeader(){return this.showHistory}},methods:{getCategoryForIndex(e){return this.categories[e]},mapCategoriesToTabs:e=>e.map(e=>({title:e.title}))},setup:()=>({stackedView:N(O).smaller("small")})}),Pe={key:0,class:"cmp-currencyexchange__options"};const ke=_(xe,[["render",function(e,t,r,a,i,n){const c=F("Dateinput"),d=F("Currencyinformation"),u=F("Currencyexchangestacked"),m=F("Currencyexchangetable"),y=F("CurrencyexchangeRateProvider"),b=F("Tabs");return s(),p("div",null,[e.showHeader?(s(),p("header",Pe,[e.showHistory?(s(),o(c,{key:0,class:"cmp-currencyexchange__date-input",modelValue:e.inputDate,"onUpdate:modelValue":t[0]||(t[0]=t=>
1e.inputDate=t),"max-date":e.latestDate,"min-date":e.oldestDate},null,8,["modelValue","max-date","min-date"])):h("",!0)])):h("",!0),v(b,{items:e.mapCategoriesToTabs(e.categories),i18nAccessibilityLabel:"aria-label",i18nPrevious:e.i18n.previousTabLabel,i18nNext:e.i18n.nextTabLabel},S({_:2},[f(e.categories,(t,r)=>({name:`tabsPanel-${r}`,fn:l(()=>[v(y,{category:t,inputDate:e.inputDate},{default:l(({rate:t})=>{var a,i,n;return[t?(s(),p(g,{key:0},[v(d,{categoriesSetup:e.categoriesSetup,listNumber:null==(a=t.currencyList[0])?void 0:a.listNumber,validityDate:null==(i=t.currencyList[0])?void 0:i.validityDate,createdTime:null==(n=t.currencyList[0])?void 0:n.listCreationDateTime},null,8,["categoriesSetup","listNumber","validityDate","createdTime"]),e.stackedView?(s(),o(u,{key:0,category:e.getCategoryForIndex(r),rate:t,"use-target":e.useTarget,headerType:e.headerType},null,8,["category","rate","use-target","headerType"])):(s(),o(m,{key:1,category:e.getCategoryForIndex(r),rate:t},null,8,["category","rate"]))],64)):h("",!0)]}),_:2},1032,["category","inputDate"])])}))]),1032,["items","i18nPrevious","i18nNext"])])}]]);export{ke as default};

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.