PageSourceSearch

https://techsafetylines.netlify.app/_next/static/chunks/pages/training/courses/[course]-08f458cdb1494b8b.js

js techsafetylines.netlify.app collected 2026-10-03 11:30:15 UTC 14,104 bytes, 211 lines download raw bytes

1(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([[7488,1044,7130,7997],{
2
3/***/ 19720:
4/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
5
6
7    (window.__NEXT_P = window.__NEXT_P || []).push([
8      "/training/courses/[course]",
9      function () {
10        return __webpack_require__(42290);
11      }
12    ]);
13    if(false) {}
14  
15
16/***/ }),
17
18/***/ 42290:
19/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
20
21"use strict";
22__webpack_require__.r(__webpack_exports__);
23/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24/* harmony export */   __N_SSG: function() { return /* binding */ __N_SSG; }
25/* harmony export */ });
26/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85893);
27/* harmony import */ var _prismicio_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(40814);
28/* harmony import */ var _slices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23190);
29/* harmony import */ var _slices_ProductList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67997);
30/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(69723);
31/* harmony import */ var _slices_ProductInfo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50296);
32/* harmony import */ var _slices_CardGrid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28868);
33/* harmony import */ var _Utility_extractSlices__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(16098);
34
35
36
37
38
39
40
41
42const Course = (param)=>{
43    let { page, products, courseCards, equipmentCards, equipmentCategoriesCards, courseId } = param;
44    var _page_data, _page, _page_data1, _page1, _page_data2, _page2, _page_data_meta_image, _page_data3, _page3;
45    const courseCardData = (0,_Utility_extractSlices__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(courseCards.data.slices, "courses");
46    const equipmentCardsData = (0,_Utility_extractSlices__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(equipmentCards.data.slices, "equipment");
47    const equipmentCategoriesCardsData = (0,_Utility_extractSlices__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(equipmentCategoriesCards.data.slices, "equipmentCategories");
48    const breadcrumbs = [
49        {
50            label: "Courses",
51            link: {
52                link_type: "Document",
53                url: "/training/courses"
54            }
55        },
56        (_page = page) === null || _page === void 0 ? void 0 : (_page_data = _page.data) === null || _page_data === void 0 ? void 0 : _page_data.card_title
57    ];
58    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
59        children: [
60            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components__WEBPACK_IMPORTED_MODULE_3__/* .Meta */ .h_, {
61                metaTitle: (_page1 = page) === null || _page1 === void 0 ? void 0 : (_page_data1 = _page1.data) === null || _page_data1 === void 0 ? void 0 : _page_data1.meta_title,
62                metaDescription: (_page2 = page) === null || _page2 === void 0 ? void 0 : (_page_data2 = _page2.data) === null || _page_data2 === void 0 ? void 0 : _page_data2.meta_description,
63                socialShareImage: (_page3 = page) === null || _page3 === void 0 ? void 0 : (_page_data3 = _page3.data) === null || _page_data3 === void 0 ? void 0 : (_page_data_meta_image = _page_data3.meta_image) === null || _page_data_meta_image === void 0 ? void 0 : _page_data_meta_image.url
64            }),
65            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("main", {
66                children: [
67                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components__WEBPACK_IMPORTED_MODULE_3__/* .Breadcrumbs */ .Oo, {
68                        breadcrumbs: breadcrumbs,
69                        style: {
70                            paddingTop: "120px"
71                        }
72                    }),
73                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_prismicio_react__WEBPACK_IMPORTED_MODULE_7__/* .SliceZone */ .p, {
74                        slices: page.data.slices,
75                        components: {
76                            ..._slices__WEBPACK_IMPORTED_MODULE_1__/* .components */ .w,
77                            product_list: (props)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_slices_ProductList__WEBPACK_IMPORTED_MODULE_2__["default"], {
78                                    products: products,
79                                    categories: equipmentCategories,
80                                    ...props
81                                }),
82                            product_info: (props)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_slices_ProductInfo__WEBPACK_IMPORTED_MODULE_4__["default"], {
83                                    ...props,
84                                    courseId: courseId
85                                }),
86                            card_grid: (props)=>{
87                                var _props_slice, _props, _props_slice1, _props1, _props_slice2, _props2;
88                                if (((_props = props) === null || _props === void 0 ? void 0 : (_props_slice = _props.slice) === null || _props_slice === void 0 ? void 0 : _props_slice.variation) == "courses") return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_slices_CardGrid__WEBPACK_IMPORTED_MODULE_5__["default"], {
89                                    ...props,
90                                    courseCards: courseCardData
91                                });
92                                if (((_props1 = props) === null || _props1 === void 0 ? void 0 : (_props_slice1 = _props1.slice) === null || _props_slice1 === void 0 ? void 0 : _props_slice1.variation) == "equipment") return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_slices_CardGrid__WEBPACK_IMPORTED_MODULE_5__["default"], {
93                                    ...props,
94                                    equipmentCards: equipmentCardsData
95                                });
96                                if (((_props2 = props) === null || _props2 === void 0 ? void 0 : (_props_slice2 = _props2.slice) === null || _props_slice2 === void 0 ? void 0 : _props_slice2.variation) == "equipmentCategories") return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_slices_CardGrid__WEBPACK_IMPORTED_MODULE_5__["default"], {
97                                    ...props,
98                                    equipmentCategoriesCards: equipmentCategoriesCardsData
99                                });
100                                else return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_slices_CardGrid__WEBPACK_IMPORTED_MODULE_5__["default"], {
101                                    ...props
102                                });
103                            }
104                        }
105                    })
106                ]
107            })
108        ]
109    });
110};
111var __N_SSG = true;
112/* harmony default export */ __webpack_exports__["default"] = (Course);
113
114
115/***/ }),
116
117/***/ 67997:
118/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
119
120"use strict";
121__webpack_require__.r(__webpack_exports__);
122/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85893);
123/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69723);
124/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11163);
125/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_2__);
126/* harmony import */ var _prismicio_next__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65217);
127/* harmony import */ var _prismicio_next__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_prismicio_next__WEBPACK_IMPORTED_MODULE_4__);
128/* harmony import */ var _ProductList_module_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(76877);
129/* harmony import */ var _ProductList_module_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_ProductList_module_css__WEBPACK_IMPORTED_MODULE_3__);
130
131
132
133
134
135/**
136 * @typedef {import("@prismicio/client").Content.ProductListSlice} ProductListSlice
137 * @typedef {import("@prismicio/react").SliceComponentProps<ProductListSlice>} ProductListProps
138 * @param {ProductListProps}
139 */ const ProductList = (param)=>{
140    let { products, categories, slice } = param;
141    const { query } = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)();
142    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("section", {
143        className: (_ProductList_module_css__WEBPACK_IMPORTED_MODULE_3___default().wrapper),
144        children: [
145            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
146                className: (_ProductList_module_css__WEBPACK_IMPORTED_MODULE_3___default().categoryContainer),
147                "data-contain": "true",
148                children: categories.sort((a, b)=>{
149                    var _a_data, _a, _b_data, _b;
150                    return (((_a = a) === null || _a === void 0 ? void 0 : (_a_data = _a.data) === null || _a_data === void 0 ? void 0 : _a_data.priority_order) || Infinity) - (((_b = b) === null || _b === void 0 ? void 0 : (_b_data = _b.data) === null || _b_data === void 0 ? void 0 : _b_data.priority_order) || Infinity);
151                }).map((category, index)=>{
152                    var _category, _category1, _category_data, _category2, _category_data1, _category3;
153                    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components__WEBPACK_IMPORTED_MODULE_1__/* .UptownLink */ .Bm, {
154                        link: {
155                            link_type: "Document",
156                            url: (_category = category) === null || _category === void 0 ? void 0 : _category.url
157                        },
158                        className: (_ProductList_module_css__WEBPACK_IMPORTED_MODULE_3___default().categoryLink),
159                        active: query.category == ((_category1 = category) === null || _category1 === void 0 ? void 0 : _category1.uid),
160                        children: [
161                            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
162                                className: (_ProductList_module_css__WEBPACK_IMPORTED_MODULE_3___default().categoryImageWrapper),
163                                children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_prismicio_next__WEBPACK_IMPORTED_MODULE_4__.PrismicNextImage, {
164                                    field: (_category2 = category) === null || _category2 === void 0 ? void 0 : (_category_data = _category2.data) === null || _category_data === void 0 ? void 0 : _category_data.category_image,
165                                    className: (_ProductList_module_css__WEBPACK_IMPORTED_MODULE_3___default().categoryImage)
166                                })
167                            }),
168                            (_category3 = category) === null || _category3 === void 0 ? void 0 : (_category_data1 = _category3.data) === null || _category_data1 === void 0 ? void 0 : _category_data1.category_title
169                        ]
170                    }, index);
171                })
172            }),
173            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
174                className: (_ProductList_module_css__WEBPACK_IMPORTED_MODULE_3___default().cardContainer),
175                "data-contain": "true",
176                children: products.sort((a, b)=>{
177                    var _b_data, _b, _a_data, _a;
178                    return (((_b = b) === null || _b === void 0 ? void 0 : (_b_data = _b.data) === null || _b_data === void 0 ? void 0 : _b_data.priority) === true) - (((_a = a) === null || _a === void 0 ? void 0 : (_a_data = _a.data) === null || _a_data === void 0 ? void 0 : _a_data.priority) === true);
179                }).map((product, index)=>{
180                    var _product_data_equipment_category, _product_data, _product;
181                    // Check if product matches the category of the current page
182                    if (query.category == ((_product = product) === null || _product === void 0 ? void 0 : (_product_data = _product.data) === null || _product_data === void 0 ? void 0 : (_product_data_equipment_category = _product_data.equipment_category) === null || _product_data_equipment_category === void 0 ? void 0 : _product_data_equipment_category.uid)) return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components__WEBPACK_IMPORTED_MODULE_1__/* .ProductCard */ .Il, {
183                        product: product
184                    }, index);
185                })
186            })
187        ]
188    });
189};
190/* harmony default export */ __webpack_exports__["default"] = (ProductList);
191
192
193/***/ }),
194
195/***/ 76877:
196/***/ (function(module) {
197
198// extracted by mini-css-extract-plugin
199module.exports = {"wrapper":"ProductList_wrapper__BcUL2","categoryContainer":"ProductList_categoryContainer___qahX","categoryLink":"ProductList_categoryLink__wFGjw","categoryImageWrapper":"ProductList_categoryImageWrapper__eoQ5G","categoryImage":"ProductList_categoryImage__oww_3","cardContainer":"ProductList_cardContainer___VJCp"};
200
201/***/ })
202
203},
204/******/ function(__webpack_require__) { // webpackRuntimeModules
205/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
206/******/ __webpack_require__.O(0, [1624,8868,9852,296,9774,2888,179], function() { return __webpack_exec__(19720); });
207/******/ var __webpack_exports__ = __webpack_require__.O();
208/******/ _N_E = __webpack_exports__;
209/******/ }
210]);
211//# sourceMappingURL=[course]-08f458cdb1494b8b.js.map

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.