PageSourceSearch

https://www.trademe.co.nz/a/static/salary-graph.component-DEWLXKBi.js

js trademe.co.nz collected 2026-09-24 08:41:58 UTC 5,434 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9da53f3e-1ff9-590f-b0b5-2d95c9c75bef")}catch(e){}}();
3import {a as ag}from'./chunk-CzpRWX72.js';import {f as fr}from'./chunk-BzMufgj4.js';import {p}from'./chunk-CzUcL0en.js';import {j as jM,J as JN,X as XN,bk as mq,f as bn,z,y,eP as UI,I as Ia,q as _D,p as bf,Q as Qx,u as nx,s as yx,C as X_,O as rE,D as TD,N as Af,G as rx}from'./main-CAjEjBVh.js';var $=(a,n)=>n.date;function j(a,n){a&1&&(Ia(0,"div",0),_D(1,"div",1)(2,"div",2),bf());}function P(a,n){if(a&1&&(Ia(0,"tr")(1,"td"),Qx(2),bf(),Ia(3,"td"),Qx(4),bf()()),a&2){let r=n.$implicit;X_(2),rE(r.payDateDisplay),X_(2),rE(r.averageSalaryDisplay);}}function E(a,n){if(a&1&&(Ia(0,"h2",3),Qx(1),bf(),Ia(2,"div",4),_D(3,"tm-line-chart",5),bf(),Ia(4,"table",6)(5,"caption"),Qx(6),bf(),Ia(7,"thead")(8,"tr")(9,"th",7),Qx(10,"Period"),bf(),Ia(11,"th",7),Qx(12),bf()()(),Ia(13,"tbody"),nx(14,P,5,2,"tr",null,$),bf()()),a&2){let r=yx();X_(),rE(r.chartHeading()),X_(2),TD("chartData",r.trendsChartData())("chartStyling",r.trendsStylingOverrides)("yAxis",r.trendsYAxes())("xAxis",r.trendsXAxes()),X_(3),Af(" ",r.chartHeading()," "),X_(6),Af("Average ",r.isAnnual()?"annual salary":"hourly rate"),X_(2),rx(r.payHistory());}}function B(a){return a.toFixed(1).replace(/\.0$/,"")}var G=(()=>{let n=class n{constructor(){this.isLoading=mq(false),this.payHistory=mq([]),this.isAnnual=mq(true),this.displayName=mq(void 0),this.chartHeading=bn(()=>{let e=this.displayName();return e?`Average salary for ${e} over time`:"Average salary over time"}),this.trendsChartData=bn(()=>{let e=this.payHistory();return {datasets:[{label:"Average salary",data:e.map(t=>t.averageSalary),borderColor:"#279BE9",borderWidth:2,pointRadius:0,pointHoverBackgroundColor:"#007ACD",pointHoverBorderColor:"#007ACD",pointHoverRadius:5,fill:{target:"origin"},backgroundColor:t=>{let s=t.chart,{ctx:y,chartArea:f}=s;if(!f)return "rgba(39, 155, 233, 0.15)";let b=y.createLinearGradient(0,f.top,0,f.bottom);return b.addColorStop(0,"rgba(39, 155, 233, 0.25)"),b.addColorStop(1,"rgba(39, 155, 233, 0.02)"),b},tension:.1}],labels:e.map(t=>p(t.date)?fr(t.date,"MMM yyyy"):"")}}),this.trendsYAxes=bn(()=>{let e=this.isAnnual();return z(y({},ag.YAxisDefaultConfig),{grid:{display:true,drawBorder:false,borderDash:[4,4],color:"rgba(0, 0, 0, 0.08)"},ticks:{callback:t=>e?this.annualFormatter(t):this.hourlyFormatter(t),autoSkip:true,autoSkipPadding:10,color:"#6B6B6B",font:{size:13}}})}),this.trendsXAxes=bn(()=>{let e=this.payHistory();return z(y({},ag.XAxisDefaultConfig),{grid:{display:false,drawBorder:false},ticks:{callback:t=>{let s=e[t]?.date;if(!s||!p(s))return null;let y=e[t-1]?.date;return t>0&&s.getFullYear()===y?.getFullYear()?null:fr(s,"yyyy")},autoSkip:true,autoSkipPadding:1,maxRotation:0,maxTicksLimit:7,color:"#6B6B6B",font:{size:13}}})}),this.trendsStylingOverrides=z(y({},ag.ChartStylingDefault),{toolTipConfiguration:{enabled:true,displayColors:false,backgroundColor:"#FFFFFF",borderColor:"#DADADA",borderWidth:1,titleColor:"#229B4B",titleFont:{size:14,weight:"500"},padding:12,titleAlign:"center",bodyAlign:"center",callbacks:{title:e=>UI(e[0].parsed.y,"en-NZ","$","","1.0-0"),label:e=>e.label,labelTextColor:()=>"#44413D"}},fontWeight:"500",legendConfiguration:{display:false}});}annualFormatter(e){let t=e/1e3;return t>=999.95?`$${B(e/1e6)}
3M`:t>=.9995?`$${B(t)}k`:`$${Math.round(e)}`}hourlyFormatter(e){return `$${Math.round(e)}/hr`}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=jM({type:n,selectors:[["tm-jobs-salary-graph"]],inputs:{isLoading:[1,"isLoading"],payHistory:[1,"payHistory"],isAnnual:[1,"isAnnual"],displayName:[1,"displayName"]},decls:2,vars:1,consts:[[1,"tm-jobs-salary-graph__skeleton"],[1,"tm-jobs-salary-graph__skeleton-title"],[1,"tm-jobs-salary-graph__skeleton-chart"],[1,"p-h3"],["aria-hidden","true",1,"tm-jobs-salary-graph__chart-container"],[1,"tm-jobs-salary-graph__chart",3,"chartData","chartStyling","yAxis","xAxis"],[1,"tm-jobs-salary-graph__data-table"],["scope","col"]],template:function(t,s){t&1&&JN(0,j,3,0,"div",0)(1,E,16,7),t&2&&XN(s.isLoading()?0:1);},dependencies:[ag],styles:["@keyframes _ngcontent-%COMP%_skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.tm-jobs-salary-graph__chart-container[_ngcontent-%COMP%]{position:relative;height:350px}.tm-jobs-salary-graph__data-table[_ngcontent-%COMP%]{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip:rect(0,0,0,0)}.tm-jobs-salary-graph__skeleton[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.tm-jobs-salary-graph__skeleton-title[_ngcontent-%COMP%]{background:linear-gradient(90deg,#f6f5f4 25%,#e8e6e3,#f6f5f4 75%);background-size:200% 100%;animation:_ngcontent-%COMP%_skeleton-shimmer 1.5s ease-in-out infinite;border-radius:4px;width:50%;height:20px}.tm-jobs-salary-graph__skeleton-chart[_ngcontent-%COMP%]{background:linear-gradient(90deg,#f6f5f4 25%,#e8e6e3,#f6f5f4 75%);background-size:200% 100%;animation:_ngcontent-%COMP%_skeleton-shimmer 1.5s ease-in-out infinite;border-radius:4px;height:350px}"]});let a=n;return a})();export{G as SalaryGraphComponent};//# sourceMappingURL=salary-graph.component-DEWLXKBi.js.map
4
5//# debugId=9da53f3e-1ff9-590f-b0b5-2d95c9c75bef

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.