PageSourceSearch

https://dev.app.uscore.no/assets/ExternalOfferButton-VHRVR6Bx.js

js uscore.no collected 2026-10-09 17:06:23 UTC 2,599 bytes, 1 lines download raw bytes

1import{D as e,L as t,U as n,V as r,_ as i,c as a,m as o,nt as s,tt as c,u as l,y as u}from"./runtime-core.esm-bundler-jrQIZ0n_.js";import{Ct as d,Ht as f,It as p,P as m,W as h,c as g}from"./auth-DEAosf1V.js";import{a as _,i as v}from"./vue-router-BxtTBrF6.js";import"./helpers-BQcJ6iQz.js";import{t as y}from"./useReactiveWidth-B9KibZVu.js";import{t as b}from"./useTracker-CJIyshR9.js";import{t as x}from"./UButton-CNGFEYVU.js";import{t as S}from"./ArrowNarrowRightIcon-CRWEtLHg.js";import{a as C,c as w,r as T,s as E,t as D}from"./useWhiteLabelModal-D-9-7c1I.js";var O=/^(?!u\.)(?:[a-z0-9-]+\.)*uscore\.(no|se|fi)$/;function k(e){try{let{hostname:t,pathname:n}=new URL(e);return O.test(t)&&n.startsWith(`/dashboard`)}catch{return!1}}function A(e){return new URL(e).pathname.replace(/^\/dashboard/,``)}var j=u({__name:`ExternalOfferButton`,props:{id:{},link:{},partnerId:{},productId:{},placement:{},location:{},variant:{},size:{},iconPosition:{},to:{},target:{},label:{},disabled:{type:Boolean},uppercase:{type:Boolean},fullWidth:{type:Boolean},isLoading:{type:Boolean},callback:{type:Function},disableTargetHref:{type:Boolean},hideIcon:{type:Boolean}},setup(u){let O=u,{isMobileWidth:j}=y(),M=_(),N=a(()=>k(O.link??``)),{setPartner:P}=w(),{openModal:F}=E(),I=v(),L=()=>C(O.link??``),R=a(()=>{if(!(N.value||L())&&!O.disableTargetHref)return O.link}),z=b(),B=f(p.newTrackingEnabled,!1),V=e=>{if(N.value){e.preventDefault(),M.push(`/dashboard${A(O.link??``)}`);return}if(O.callback&&O.callback(),L()){let t=T(O.link||``)?.partner||``;P(t),e.preventDefault(),D(O.link??``),F()}m({id:O.id,link:O.link??``,partnerId:O.partnerId,placement:O.placement,productId:O.productId}),z.enqueue(`uscore-backend`,{name:d.OFFER_CTA_CLICKED,params:{key:d.OFFER_CTA_CLICKED,payload:{offerId:O.id,partnerId:O.partnerId,productId:O.productId,location:I.path,offerUrl:O.link}}})};function H(){if(B.value){if(!O.id||!O.partnerId||!O.productId){g(`[Tracking] Error: offerId, partnerId and productId are required for tracking`,`error`,{offerId:O.id,partnerId:O.partnerId,productId:O.productId,location:I.path,offerUrl:O.link??``});return}h({id:O.id,link:O.link??``,partnerId:O.partnerId,productId:O.productId,location:I.path})}}let U=a(()=>(j.value,`_blank`));return(a,d)=>{let f=n(`intersect`);return s((t(),l(x,e(a.$props,{href:R.value,target:U.value,"data-testid":`offerButton`,onClick:V}),o({default:c(()=>[r(a.$slots,`default`)]),_:2},[u.hideIcon?void 0:{name:`icon`,fn:c(()=>[r(a.$slots,`icon`,{},()=>[i(S,{class:`text-heading-xs`})])]),key:`0`}]),1040,[`href`,`target`])),[[f,H,void 0,{once:!0}]])}}});export{j as t};

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.