PageSourceSearch

https://stauff.co.nz/assets/ade1673896f68c8b7edccacda04d533e5f198d…tauff_platform.delivery-detail-positions.js

js stauff.co.nz collected 2026-10-06 20:41:44 UTC 2,602 bytes, 1 lines download raw bytes

1"use strict";(self.webpackJsonp_stauff_platform=self.webpackJsonp_stauff_platform||[]).push([[1766],{7096:(t,e,r)=>{r.d(e,{Z:()=>o});var a=r(97337);class o extends a.Z{constructor(){super(...arguments),this.activeSortColumn="",this.sortDirectionAscending=!0,this.sortLinks=void 0}readyCallback(){}makeTableSortable(t){this.sortDirectionAscending="1"===t.dataset.sortDirectionAscending,this.sortLinks=t.querySelectorAll("thead a.label"),this.sortLinks.forEach((t=>{"sortActive"in t.dataset&&("1"===t.dataset.sortActive&&(this.activeSortColumn=t.dataset.sortColumn),t.addEventListener("click",(t=>{this.onSortColumnClick(t)})))}))}onSortColumnClick(t){t.preventDefault();var e=t.currentTarget,r=e.closest("table").querySelector("tbody"),a=r.querySelectorAll(":scope > tr.table__tr"),o=Array.from([]);for(var s of Array.from(a)){var i=s.dataset.group,n=r.querySelectorAll("tr.group-by-"+i);o.push({mainRow:s,groupedRows:n})}var l=e.dataset.sortColumn,c=this.getNewSortDirectionByColumn(l);this.sortGroups(o,l,c).forEach((t=>{for(var e of(r.appendChild(t.mainRow),Array.from(t.groupedRows)))r.appendChild(e)})),this.updateSortIndicators(e,c),this.sortDirectionAscending=c,this.activeSortColumn=l}getNewSortDirectionByColumn(t){return t===this.activeSortColumn&&!this.sortDirectionAscending}sortGroups(t,e,r){var a=r?1:-1;return Array.from(t).sort(((t,r)=>{var s=o.getGroupValue(t,e),i=o.getGroupValue(r,e);return o.compareValues(s,i)*a}))}static getGroupValue(t,e){return t.mainRow.dataset["sortData_"+e]}static compareValues(t,e){var r=Number(t),a=Number(e);return isNaN(r)||isNaN(a)?t.toString().localeCompare(e):r-a}updateSortIndicators(t,e){this.sortLinks.forEach((r=>{var a,o;r===t?e?(a="svg:not(.is-hidden):not(.js-upward-active)",o="svg.js-upward-active"):(a="svg:not(.is-hidden):not(.js-downward-active)",o="svg.js-downward-active"):(a="svg:not(.is-hidden):not(.js-upward-inactive)",o="svg.js-upward-inactive"),r.querySelectorAll(a).forEach((t=>{t.classList.add("is-hidden")})),r.querySelector(o).classList.remove("is-hidden")}))}makeTableRowsClickable(t){var e=t.getElementsByTagName("tbody");if(0!==e.length){var r=e.item(0),a=Array.from(r.getElementsByTagName("tr")),o=function(t){t.addEventListener("click",(e=>{for(var r=e.currentTarget.getAttribute("data-link"),a=e.target;a!=t;){if(a instanceof HTMLAnchorElement)return;a=a.parentElement}r&&(e.preventDefault(),location.href=r)}))};for(var s of a)o(s)}}}},51845:(t,e,r)=>{r.r(e),r.d(e,{default:()=>o});var a=r(7096);class o extends a.Z{init(){var t=this.getElementsByClassName("table--debitor-order").item(0);this.makeTableSortable(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.