1"use strict";(self.webpackChunk_vndr_ship_client=self.webpackChunk_vndr_ship_client||[]).push([[7534],{47534(e,t,i){i.r(t),i.d(t,{default:()=>v});var a=i(98477),s=i(67252),l=i(71288),n=i(39698),o=i(57863),r=i(84489),d=i(11697),c=i(26600),p=i(28872);const u=s.memo(e=>{var t;let i=e.component,a=e.type,l=e.isPublic,u=e.isPrivate;const v=(0,o.useHistory)(),y=(0,s.useState)(!(!l&&!u)),h=(0,n.A)(y,2),A=h[0],_=h[1],g=(0,s.useState)({}),E=(0,n.A)(g,2),C=E[0],f=E[1],m=(0,d.A)({initialUrl:"/privacy-policy/v1/?type=".concat(a),skip:!A}),S=(0,n.A)(m,1)[0].data;(0,s.useEffect)(()=>{var e;null!==S&&void 0!==S&&null!==(e=S.policy)&&void 0!==e&&e.length&&f(S.policy[0])},[S]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{onClick:()=>{_(!0)},children:i}),(0,p.jsx)(r.aF,{open:A,maxWidth:"lg",title:(0,p.jsx)("div",{style:{width:"100%"},dangerouslySetInnerHTML:{__html:(null===C||void 0===C?void 0:C.title)||""}}),handleClose:l?void 0:()=>{_(!1),u&&v.push("/dashboard")},paperStyle:{height:"100%"},children:null!==(t=Object.keys(C))&&void 0!==t&&t.length?"privacy_policy"===a?(0,p.jsx)("iframe",{width:"100%",height:"100%",title:"privacy_policy",src:"".concat(c.nv,"/Assets/privacy_policy.pdf")}):"dpa"===a?(0,p.jsx)("iframe",{width:"100%",height:"100%",title:"privacy_policy",src:"".concat(c.nv,"/Assets/dpa.pdf")}):(0,p.jsx)("div",{dangerouslySetInnerHTML:{__html:(null===C||void 0===C?void 0:C.body)||""}}):(0,p.jsx)("div",{style:{display:"flex",justifyContent:"center",minHeight:250,alignItems:"center"},children:(0,p.jsx)(r.P,{})})})]})}),v=()=>{var e,t,i,n,o,r;const d={};(0,l.useSelector)(e=>{var t,i;return null===e||void 0===e||null===(t=e.auth)||void 0===t||null===(i=t.user)||void 0===i?void 0:i._id})?d.isPrivate=!0:d.isPublic=!0;let c="privacy_policy";return null!==(e=window)&&void 0!==e&&null!==(t=e.location)&&void 0!==t&&null!==(i=t.pathname)&&void 0!==i&&i.includes("terms")?c="terms":null!==(n=window)&&void 0!==n&&null!==(o=n.location)&&void 0!==o&&null!==(r=o.pathname)&&void 0!==r&&r.includes("dpa")&&(c="dpa"),(0,s.useEffect)(()=>{document.title="Policies"},[]),(0,p.jsx)(u,(0,a.A)({type:c},d))}},11697(e,t,i){i.d(t,{A:()=>c});var a=i(39698),s=i(98477),l=i(67252),n=i(57863),o=i(14618),r=i(97939);const d=(e,t)=>{switch(t.type){case"FETCH_INIT":return(0,s.A)((0,s.A)({},e),{},{isLoading:!0,isError:!1});case"FETCH_SUCCESS":return(0,s.A)((0,s.A)({},e),{},{isLoading:!1,isError:!1,data:t.payload});case"FETCH_FAILURE":return(0,s.A)((0,s.A)({},e),{},{isLoading:!1,isError:t.error});case"UPDATE_DATA":return(0,s.A)((0,s.A)({},e),{},{data:t.payload});default:throw new Error("no useGet.js switch action type found")}},c=e=>{let t=e.initialUrl,i=e.initialData,s=e.skip,c=e.apiVersion;const p=(0,l.useState)(t),u=(0,a.A)(p,2),v=u[0],y=u[1],h=(0,n.useHistory)(),A=(0,l.useReducer)(d,{isLoading:!0,isError:null,data:i}),_=(0,a.A)(A,2),g=_[0],E=_[1];(0,l.useEffect)(()=>{let e=!1;return v&&!s&&(async()=>{E({type:"FETCH_INIT"});try{let t;t="axiosV1"===c?await o.Km.get(v):await o.FH.get(v),e||E({type:"FETCH_SUCCESS",payload:t.data})}catch(a){var t,i;let s="";s=null!==a&&void 0!==a&&null!==(t=a.response)&&void 0!==t&&t.statusText?a.response.statusText:null!==a&&void 0!==a&&null!==(i=a.response)&&void 0!==i&&i.data&&"string"===typeof a.response.data?a.response.data:"Something Went Wrong",e||E({type:"FETCH_FAILURE",error:s})}})(),s&&E({type:"FETCH_SUCCESS",payload:{}}),()=>{e=!0}},[v,s,c]);return[g,{setUrl:y,updateData:e=>{E({type:"UPDATE_DATA",payload:e})},refetchData:async e=>{try{const t=(0,r.Ay)({history:h}),i=(null===t||void 0===t?void 0:t.page)||1;if(!i||i<=1){let t;t="axiosV1"===e?await o.Km.get(v):await o.FH.get(v),E({type:"FETCH_SUCCESS",payload:t.data})}else h.push(h.location.pathname)}catch(a){var t,i;let e="";e=null!==a&&void 0!==a&&null!==(t=a.response)&&void 0!==t&&t.statusText?a.response.statusText:null!==a&&void 0!==a&&null!==(i=a.response)&&void 0!==i&&i.data&&"string"===typeof a.response.data?a.response.data:"Something Went Wrong",E({type:"FETCH_FAILURE",error:e})}}}]}}}]);
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.