1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5824],{76489:function(e,t){"use strict";/*! 2 * cookie 3 * Copyright(c) 2012-2014 Roman Shtylman 4 * Copyright(c) 2015 Douglas Christopher Wilson 5 * MIT Licensed 6 */t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var r={},a=e.split(i),o=(t||{}).decode||n,s=0;s<a.length;s++){var c=a[s],l=c.indexOf("=");if(!(l<0)){var u=c.substr(0,l).trim(),d=c.substr(++l,c.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),void 0==r[u]&&(r[u]=function(e,t){try{return t(e)}catch(t){return e}}(d,o))}}return r},t.serialize=function(e,t,n){var i=n||{},o=i.encode||r;if("function"!=typeof o)throw TypeError("option encode is invalid");if(!a.test(e))throw TypeError("argument name is invalid");var s=o(t);if(s&&!a.test(s))throw TypeError("argument val is invalid");var c=e+"="+s;if(null!=i.maxAge){var l=i.maxAge-0;if(isNaN(l))throw Error("maxAge should be a Number");c+="; Max-Age="+Math.floor(l)}if(i.domain){if(!a.test(i.domain))throw TypeError("option domain is invalid");c+="; Domain="+i.domain}if(i.path){if(!a.test(i.path))throw TypeError("option path is invalid");c+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw TypeError("option expires is invali
6d");c+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(c+="; HttpOnly"),i.secure&&(c+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:case"strict":c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;default:throw TypeError("option sameSite is invalid")}return c};var n=decodeURIComponent,r=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},34535:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.hasCookies=function(){var e=new s;try{var t="__test";e.setItem(t,"1");var n=e.getItem(t);return e.removeItem(t),"1"===n}catch(e){return!1}};var a=(r=n(76489))&&r.__esModule?r:{default:r},o="lS_",s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this.cookieOptions=Object.assign({path:"/"},t),o=void 0===t.prefix?o:t.prefix}return i(e,[{key:"getItem",value:function(e){var t=a.default.parse(document.cookie);return t&&t.hasOwnProperty(o+e)?t[o+e]:null}},{key:"setItem",value:function(e,t){return document.cookie=a.default.serialize(o+e,t,this.cookieOptions),t}},{key:"removeItem",value:function(e){var t=Object.assign({},this.cookieOptions,{maxAge:-1});return document.cookie=a.default.serialize(o+e,"",t),null}},{key:"clear",value:function(){var e=a.default.parse(document.cookie);for(var t in e)0===t.indexOf(o)&&this.removeItem(t.substr(o.length));return null}}]),e}();t.default=s},90145:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=function(){function e(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this._data={}}return n(e,[{key:"getItem",value:function(e){return this._data.hasOwnProperty(e)?this._data[e]:null}},{key:"setItem",value:function(e,t){return this._data[e]=String(t)}},{key:"removeItem",value:function(e){return delete this._data[e]}},{key:"clear",value:function(){return this._data={}}}]),e}();t.default=r},12795:function(e,t,n){"use strict";var r=o(n(62089)),i=o(n(34535)),a=o(n(90145));function o(e){return e&&e.__esModule?e:{default:e}}var s=null;s=(0,r.default)("localStorage")?window.localStorage:(0,r.default)("sessionStorage")?window.sessionStorage:(0,r.default)("cookieStorage")?new i.default:new a.default,t.ZP=s,r.default,i.default,a.default},62089:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"localStorage",t=String(e).replace(/storage$/i,"").toLowerCase();if("local"===t)return a("localStorage");if("session"===t)return a("sessionStorage");if("cookie"===t)return(0,r.hasCookies)();if("memory"===t)return!0;throw Error("Storage method `"+e+"` is not available.\n Please use one of the following: localStorage, sessionStorage, cookieStorage, memoryStorage.")};var r=n(34535),i="__test";function a(e){try{var t=window[e];return t.setItem(i,"1"),t.removeItem(i),!0}catch(e){return!1}}},9297:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/incident-reports",function(){return n(66340)}])},34204:function(e,t,n){"use strict";n.d(t,{PV:function(){return l},X2:function(){return u}});var r=n(85893);n(67294);var i=n(20640),a=n.n(i),o=n(51717);let s=(e,t,n)=>{a()("".concat(t).concat(e),{message:"Copy this link",format:"text/plain",onCopy:n})},c=(e,t,n)=>
6{if(navigator.share){navigator.share({text:t,url:e}).catch(r=>{"AbortError"!==r.name&&s(e,t,n)});return}s(e,t,n)},l=(e,t,n)=>{c(t,"Help ".concat(e," take part in an Outward Bound course by contributing")+" to the cost of the course.\n\nThank you for your support!\n\n",()=>{n({type:"Success",title:"Copied Link",body:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"This link has been copied for you to share with friends and family to ask for help funding your course."}),(0,r.jsx)("p",{className:"mt-3",children:(0,r.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",children:t})})]})})})},u=e=>{let{name:t,incidentId:n,showNotification:i,copyLink:a}=e,l=(0,o.SO)(n),u="".concat(t," has shared this incident report with you"),d=()=>{i({type:"Success",title:"Copied Link",body:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"This link has been copied for you to share with other linked reporters."}),(0,r.jsx)("p",{className:"mt-3",children:(0,r.jsx)("a",{href:l,target:"_blank",rel:"noreferrer",children:l})})]})})};a?s(l,u,d):c(l,u,d)}},7760:function(e,t,n){"use strict";var r=n(85893),i=n(35474);n(67294);var a=n(94184),o=n.n(a),s=n(82015),c=n(85192),l=n(47709);let u={Draft:"exclamation-orange",Pending:"check-circle-orange",Completed:"check-circle-green",Archived:"check-circle"};t.Z=e=>{let{className:t,reportType:n,participant:a,dateOfIncident:d,createdDate:f,status:h,onClick:p,onCopyUrl:m,onClone:v}=e,y=e=>(0,r.jsxs)("button",{type:"button",className:o()("btn btn-link incident-card__action-button text-uppercase",e),onClick:e=>{e.stopPropagation(),null==v||v()},children:[(0,r.jsx)("span",{className:"d-none d-md-inline",children:"Clone"})," ",(0,r.jsx)(l.Z,{mask:!0,icon:"clipboard",width:16,height:16})]});return(0,r.jsxs)(c.Z,{className:o()("incident-card",t),onClick:p,children:[(0,r.jsxs)("div",{className:"incident-card__header",children:[(0,r.jsxs)("p",{className:"incident-card__type mb-0",children:[(0,r.jsx)("span",{className:"incident-card__type-report",children:n}),(0,r.jsxs)("span",{className:o()((0,s.wH)("incident-card__type-status",{[h]:!!h})),children:[(0,r.jsx)(l.Z,{icon:u[h],width:12,height:12}),(0,r.jsx)("span",{className:"d-inline-block mt-1",children:h})]})]}),(0,r.jsx)("p",{className:"incident-card__participants mb-0",children:a}),!!d&&(0,r.jsxs)("p",{className:"incident-card__date-of-incident mb-0",children:["Date of incident: ",(0,i.p6)(d)]}),!!f&&(0,r.jsxs)("p",{className:"incident-card__created-date mb-0",children:["Report created: ",(0,i.p6)(f)]})]}),(0,r.jsxs)("div",{className:"incident-card__footer",children:[(0,r.jsx)("div",{children:y("d-none d-md-inline")}),(0,r.jsxs)("div",{children:[y("me-3 d-md-none"),(0,r.jsxs)("button",{type:"button",className:"btn btn-link incident-card__action-button text-uppercase",onClick:e=>{e.stopPropagation(),null==m||m()},children:[(0,r.jsx)("span",{className:"d-none d-md-inline",children:"Copy URL"})," ",(0,r.jsx)(l.Z,{mask:!0,icon:"link",width:16,height:16})]})]})]})]})}},80126:function(e,t,n){"use strict";n(67294);var r=n(47150),i=n(28703),a=n(41905),o=n(84579),s=n(86396),c=n(85392),l=n(38296),u=n(55315),d=n(91390),f=n(85893);function h(e){let{title:t,eventKey:n,disabled:r,tabClassName:i,tabAttrs:a,id:c}=e.props;return null==t?null:(0,f.jsx)(s.Z,{as:"li",role:"presentation",children:(0,f.jsx)(o.Z,{as:"button",type:"button",eventKey:n,disabled:r,id:c,className:i,...a,children:t})})}let p=e=>{let t;let{id:n,onSelect:o,transition:s,mountOnEnter:p=!1,unmountOnExit:m=!1,variant:v="tabs",children:y,activeKey:x=((0,u.Ed)(y,e=>{null==t&&(t=e.props.eventKey)}),t),...g}=(0,r.Ch)(e,{activeKey:"onSelect"});return(0,f.jsxs)(i.Z,{id:n,activeKey:x,onSelect:o,transition:(0,d.Z)(s),mountOnEnter:p,unmountOnExit:m,children:[(0,f.jsx)(a.Z,{id:n,...g,role:"tablist",as:"ul",variant:v,children:(0,u.UI)(y,h)}),(0,f.jsx)(c.Z,{children:(0,u.UI)(y,e=>{let t={...e.props};return delete t.title,delete t.disabled,delete t.tabClassName,delete t.tabAttrs,(0,f.jsx)(l.Z,{...t})})})]})};p.displayName="Tabs",t.Z=p},66340:function(e,t,n){"use strict";n.r(t);var r=n(85893),i=n(51717),a=n(19490),o=n(28035),s=n(74771),c=n(7760),l=n(23898),u=n(84381),d=n(52587),f=n(94184),h=n.n(f),p=n(11163),m=n(67294),v=n(85192),y=n(80126),x=n(68041),g=n(23855),b=n(46037),k=n(34204);let j="Draft",w="Pending",_="Completed";t.default=(0,s.t)(e=>{let{user:t}=e,n=(0,p.useRouter)(),s=n.query.incidentId,{showNotification:f}=(0,a.lm)(),{incidents:S,name:C}=t,[N,E]=(0,m.useState)(!1),[Z,O]=(0,m.useState)(),[I,T]=(0,m.useState)("All"),P=(0,m.useCallback)(async e=>{try{let t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.json();throw new g.Gs(e.message,{customData:{statusCode:t.status}})}return await t.json()}catch(t){throw f({type:"Danger",title:"Error",body:a.Ex}),(0,g.ZP)({error:t,customData:{url:e}}),t}},[f]),A=(0,m.useCallback)(async e=>{let{id:t,forClone:n}=e;return E(!0),O(t),P((0,i.L7)(t)).then(e=>{let{incidentId:t,incident:r,status:i}=e,{DisplayName:a,...s}=r;return(0,o.iE)({incidentId:n?void 0:t,status:n?void 0:i,formData:n?s:r}),!0}).catch(()=>!1).finally(()=>E(!1))},[P]),D=(0,m.useCallback)(async e=>{!N&&await A({id:e})&&n.push(i.ty)},[A,N,n]);return(0,m.useEffect)(()=>{(async()=>{s&&b.hB.validateSync(s)&&await D(s)})()},[D,s]),(0,r.jsxs)(u.Z,{withAccountMenu:!0,children:[(0,r.jsx)("h4",{children:"Incident Reports"}),(0,r.jsxs)(v.Z,{className:"incident-report-card mt-5",children:[(0,r.jsx)(v.Z.Header,{className:"heading",children:"Incident Reporting Form"}),(0,r.jsxs)(v.Z.Body,{children:["This form is used to record details of an incident involving a student, staff member, or visitor. Please provide accurate information about what happened, the actions taken, and any key learnings to help improve safety and prevent future incidents.",(0,r.jsx)("div",{className:"mt-3",children:(0,r.jsx)(l.Z,{className:"btn btn-sm btn-primary theme--accent text-uppercase",href:o.K0[0].url,onClick:o.O2,children:"Create New"})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)(y.Z,{className:"gap-5 my-5",activeKey:I,variant:"underline",onSelect:e=>T(null!=e?e:"All"),children:[(0,r.jsx)(x.Z,{eventKey:"All",title:"All"}),(0,r.jsx)(x.Z,{eventKey:j,title:j}),(0,r.jsx)(x.Z,{eventKey:w,title:w}),(0,r.jsx)(x.Z,{eventKey:_,title:_})]}),null==S?void 0:S.filter(e=>"All"===I||e.status===I).map(e=>{let{id:t,displayName:a,relationship:s,incidentDate:l,createdTime:u,status:p="Draft"}=e;return!!t&&(0,r.jsx)(c.Z,{className:h()("mt-3",{focus:Z===t}),status:p,participant:a,reportType:s&&d.ys[s],dateOfIncident:l,createdDate:u,onClick:async()=>{!N&&await A({id:t})&&n.push(i.ty)},onCopyUrl:()=>(0,k.X2)({name:C,incidentId:t,showNotification:f,copyLink:!0}),onClone:async()=>{(0,o.O2)(),!N&&await A({id:t,forClone:!0})&&n.push(i.ty)}},t)})]})]})})}},function(e){e.O(0,[2311,4380,8521,5756,120,6310,408,6196,6037,1104,2888,9774,179],function(){return e(e.s=9297)}),_N_E=e.O()}]);
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.