PageSourceSearch

https://conservationtalkhca.ca/_next/static/chunks/pages/admin/reporting/custom_reports-d8d4603070a7ffe5.js

js conservationtalkhca.ca collected 2026-09-28 13:16:50 UTC 37,055 bytes, 2 lines download raw bytes

1!function(){try{var t="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="7549ab5c-5abd-41f4-a779-beed1622171b",t._sentryDebugIdIdentifier="sentry-dbid-7549ab5c-5abd-41f4-a779-beed1622171b")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43936],{13468:(t,e,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/reporting/custom_reports",function(){return r(50006)}])},21014:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(96501),o=r(37876);let s=(0,n.A)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline")},37900:(t,e,r)=>{"use strict";r.d(e,{A:()=>P});var n=r(42969),o=r(59234),s=r(46783),i=r(14232),a=r(7194),c=r(63857),l=r(60180),u=r.n(l),d=r(40259),p=r(14221),h=r(79753),f=r(60578),m=r(73614),x=r(98512),g=r(21471),b=r(50225),v=r(66035),j=r(40553),A=r(45911),y=r(31123);let w=function(t,e,r){var n="";switch(t){case"twitter":return"https://twitter.com/intent/tweet?url=".concat(e,"&text=").concat(r);case"facebook":return"https://www.facebook.com/sharer/sharer.php?u=".concat(e,"&quote=").concat(r);case"mail":return"mailto:?body=".concat(r," ").concat(e);case"linkedin":return"https://www.linkedin.com/sharing/share-offsite/?url=".concat(e);default:return n}};var R=r(54237),S=r(17580),k=r(37876),C=r(31777),O=r(83129);let E=(0,C.Ng)(null,function(t){return(0,O.zH)({fetchSite:a.Cc,launchSite:a.$p},t)})(function(t){var e,r=t.fetchSite,n=t.launchSite,a=t.showBanner,l=(0,R.useTranslation)(["common","site-settings","errors"]).t,C=(0,S.Sf)(),O=(0,i.useState)(!1),E=O[0],D=O[1],_=(0,i.useState)(!1),P=_[0],T=_[1],H=(0,i.useId)(),z=(0,i.useId)(),B=window.location.origin,I=function(t){var e=l("site-settings:siteSettings.socialShareLink"),r=w(t,window.location.origin,e);window.open(r)},L=function(){var t=w("mail",window.location.origin,l("site-settings:siteSettings.mailLinkText"));window.open(t)},W=(e=(0,c.A)(u().mark(function t(){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:if(t.sent){t.next=6;break}return C.error(l("errors:errors.500.title")),t.abrupt("return");case 6:return t.next=8,r();case 8:D(!1),T(!0);case 10:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)});return(0,k.jsxs)(k.Fragment,{children:[(void 0===a||a)&&(0,k.jsxs)(x.A,{severity:"info",sx:{mx:3,mt:2,mb:0,alignItems:"center"},action:(0,k.jsx)(g.A,{variant:"contained","data-testid":"confirm-modal-button",onClick:function(){return D(!0)},children:l("site-settings:siteSettings.launchYourSite")}),children:[(0,k.jsx)(s.A,{variant:"body1",sx:{fontWeight:500},children:l("site-settings:siteSettings.launchSite.title")}),(0,k.jsx)(s.A,{variant:"body2",color:"text.secondary",children:l("site-settings:siteSettings.launchSite.descriptionTwo")})]}),(0,k.jsxs)(b.A,{open:E,onClose:function(){return D(!1)},maxWidth:"sm",fullWidth:!0,role:"alertdialog","aria-labelledby":H,children:[(0,k.jsx)(A.A,{id:H,children:l("site-settings:siteSettings.launchSite")}),(0,k.jsxs)(j.A,{children:[(0,k.jsx)(s.A,{variant:"body2",sx:{mb:2},children:l("site-settings:siteSettings.launchSiteDescription")}),(0,k.jsx)(s.A,{variant:"body2",children:l("site-settings:siteSettings.launchSitePrompt")})]}),(0,k.jsxs)(v.A,{children:[(0,k.jsx)(g.A,{onClick:function(){return D(!1)},children:l("site-settings:siteSettings.no")}),(0,k.jsx)(g.A,{variant:"contained","data-testid":"launch-button",onClick:function(){W()},children:l("site-settings:siteSettings.yes")})]})]}),(0,k.jsxs)(b.A,{open:P,onClose:function(){return T(!1)},maxWidth:!1,fullWidth:!0,"aria-labelledby":z,slotProps:{paper:{sx:{maxWidth:410,width:"100%",p:3.5}}},children:[(0,k.jsxs)(A.A,{id:z,sx:{display:"flex",alignItems:"center",gap:1,p:0},children:[(0,k.jsx)(p.A,{color:"info",fontSize:"small","aria-hidden":!0}),l("site-settings:siteSettings.congratulations")]}),(0,k.jsxs)(j.A,{sx:{p:3.5},children:[(0,k.jsx)(s.A,{variant:"body2",component:"h3",fontWeight:500,sx:{mt:2,mb:1},children:l("site-settings:siteSettings.launchSite.paraOne")}),(0,k.jsx)(o.A,{sx:{bgcolor:"grey.50",px:1,py:1,minHeight:40,display:"flex",alignItems:"center",borderRadius:1},children:(0,k.jsx)(s.A,{variant:"body2",children:B})}),(0,k.jsx)(g.A,{variant:"outlined","data-testid":"visit-site",onClick:function(){return window.open(B)},sx:{mt:1,minWidth:136},children:l("site-settings:siteSettings.visitSite")}),(0,k.jsx)(s.A,{variant:"body2",component:"h3",fontWeight:500,sx:{mt:3,mb:1},children:l("site-settings:siteSettings.launchSite.paraTwo")}),(0,k.jsx)(g.A,{"data-testid":"create-project",variant:"outlined",onClick:function(){return window.open("/admin/projects")},children:l("site-settings:siteSettings.createAProject")}),(0,k.jsx)(s.A,{variant:"body2",component:"h3",fontWeight:500,sx:{mt:3,mb:1},children:l("site-settings:siteSettings.launchSite.paraThree")}),(0,k.jsxs)(o.A,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:[(0,k.jsx)(y.A,{"data-testid":"twitter","aria-label":"Twitter",onClick:function(){return I("twitter")},sx:{width:40,height:40,color:"#1da1f2",bgcolor:"rgba(29, 161, 242, 0.12)"},children:(0,k.jsx)(m.A,{})}),(0,k.jsx)(y.A,{"data-testid":"facebook","aria-label":"Facebook",onClick:function(){return I("facebook")}
1,sx:{width:40,height:40,color:"#4267b2",bgcolor:"rgba(66, 103, 178, 0.12)"},children:(0,k.jsx)(d.A,{})}),(0,k.jsx)(y.A,{"data-testid":"linkedin","aria-label":"LinkedIn",onClick:function(){return I("linkedin")},sx:{width:40,height:40,color:"#0e76a8",bgcolor:"rgba(14, 118, 168, 0.12)"},children:(0,k.jsx)(h.A,{})}),(0,k.jsx)(y.A,{"data-testid":"mail","aria-label":"Email",onClick:function(){return L()},sx:{width:40,height:40,color:"text.secondary",bgcolor:"rgba(89, 89, 89, 0.12)"},children:(0,k.jsx)(f.A,{})})]})]}),(0,k.jsx)(v.A,{sx:{pr:1.5},children:(0,k.jsx)(g.A,{variant:"outlined",onClick:function(){return T(!1)},children:l("site-settings:siteSettings.close")})})]})]})});function D(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?D(Object(r),!0).forEach(function(e){(0,n.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}let P=function(t){var e=t.title,r=t.actions,n=t.filters,a=t.navigation,c=t.bulkActions,l=t.content,u=t.isSiteSettingsPage,d=void 0!==u&&u,p=t.isSiteLaunched,h=t.stretchContentHeight,f=void 0!==h&&h,m=t.contentCardMaxWidth,x=t.contentCardAlign,g=t.contentSx,b=d&&void 0!==p&&p,v=i.Children.toArray(r).some(Boolean);return(0,k.jsxs)(o.A,{sx:_({height:"100%"},f&&{flex:1,minHeight:0,display:"flex",flexDirection:"column"}),children:[(0,k.jsxs)(o.A,{component:"header",display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",gap:{xs:1.5,sm:2},bgcolor:"background.paper",px:{xs:2,sm:3},py:2,children:[(0,k.jsx)(s.A,{component:"h1",variant:"h5",color:"text.primary",fontWeight:500,minWidth:0,py:.5,children:e}),v&&(0,k.jsx)(o.A,{display:"flex",alignItems:"center",justifyContent:{xs:"flex-start",sm:"flex-end"},flexWrap:"wrap",flexShrink:0,gap:1,width:{xs:"100%",sm:"auto"},children:r})]}),n&&(0,k.jsx)(o.A,{sx:{px:{xs:2,sm:3},bgcolor:"background.paper"},children:n}),a&&(0,k.jsx)(o.A,{sx:{bgcolor:"background.paper"},children:a}),d&&(0,k.jsx)(E,{showBanner:b}),c?(0,k.jsx)(o.A,{flexShrink:0,children:c}):null,(0,k.jsx)(o.A,{sx:_(_(_(_({bgcolor:"background.paper",p:{xs:1.5,sm:"18px 24px"},position:"relative",boxSizing:"border-box"},null!=m&&m>0?_({maxWidth:m,width:"100%"},"left"===(void 0===x?"center":x)?f?{marginTop:0,marginBottom:0,marginLeft:{xs:1.5,sm:3},marginRight:"auto",alignSelf:"flex-start"}:{marginTop:{xs:1.5,sm:3},marginBottom:{xs:1.5,sm:3},marginLeft:{xs:1.5,sm:3},marginRight:"auto"}:{marginTop:f?0:{xs:1.5,sm:3},marginBottom:f?0:{xs:1.5,sm:3},marginLeft:"auto",marginRight:"auto"}):{m:{xs:1.5,sm:3}}),f?{flex:1,minHeight:0,display:"flex",flexDirection:"column"}:{minHeight:{xs:"calc(100dvh - 140px)",sm:"calc(100vh - 140px)"}}),b?{mt:2}:{}),g),children:l})]})}},40259:(t,e,r)=>{"use strict";r.d(e,{A:()=>s}),r(14232);var n=r(96501),o=r(37876);let s=(0,n.A)((0,o.jsx)("path",{d:"M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z"}),"Facebook")},40561:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(96501),o=r(37876);let s=(0,n.A)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},43531:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(96501),o=r(37876);let s=(0,n.A)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit")},50006:(t,e,r)=>{"use strict";r.r(e),r.d(e,{__N_SSP:()=>ty,default:()=>tw});var n=r(20640),o=r(31777),s=r(23745),i=r(67251),a=r(29898),c=r(52672),l=r(76966),u=r(42969),d=r(47091),p=r.n(d),h=r(14232),f=r(54237),m=r(77328),x=r.n(m),g=r(40561),b=r(59234),v=r(71858),j=r(46783),A=r(21471),y=r(74679),w=r(83129),R=r(55024),S=r(59105),k=r(63857),C=r(60180),O=r.n(C),E=r(33713),D=r(34626),_=r(37876);function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function T(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(T=function(){return!!t})()}var H=function(t){function e(t){var r,n,o,s;return(0,i.default)(this,e),n=e,o=[t],n=(0,c.default)(n),r=(0,a.default)(this,T()?Reflect.construct(n,o||[],(0,c.default)(this).constructor):n.apply(this,o)),(0,u.default)(r,"handleChange",function(t){return function(e){var n=e.target?e.target.value:e,o={fieldErrors:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};
1e%2?P(Object(r),!0).forEach(function(e){(0,u.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},r.state.fieldErrors)};switch(t){case"title":o.title=n,delete o.fieldErrors.title;break;case"description":o.description=n;break;case"embedLink":o.embedLink=n,delete o.fieldErrors.embed}r.setState(o)}}),(0,u.default)(r,"componentDidMount",(0,k.A)(O().mark(function t(){return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.props.reportId){t.next=3;break}return t.next=3,r.props.fetchDashboard(r.props.reportId);case 3:r.props.triggerNewForm?r.props.updateReport("id",""):r.setState({title:r.props.dashboard.title||"",description:r.props.dashboard.description||"",embedLink:r.props.dashboard.embedLink||""});case 4:case"end":return t.stop()}},t)}))),(0,u.default)(r,"validateFields",function(){var t=r.props.t,e={},n=(r.state.title||"").trim(),o=(r.state.embedLink||"").trim();if(n||(e.title=t("custom-reports:customReports.report.formFieldBlankError")),o)if(o.length<30)e.embed=t("custom-reports:customReports.report.embedLinkUrlLimit");else try{new URL(o)}catch(r){e.embed=t("custom-reports:customReports.report.embedLinkUrlCheck")}else e.embed=t("custom-reports:customReports.report.formFieldBlankError");return r.setState({fieldErrors:e}),0===Object.keys(e).length}),(0,u.default)(r,"handleSubmit",(s=(0,k.A)(O().mark(function t(e){var n;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),r.validateFields()){t.next=3;break}return t.abrupt("return");case 3:return r.props.updateReport("title",r.state.title),r.props.updateReport("description",r.state.description),r.props.updateReport("embedLink",r.state.embedLink),r.props.updateReport("sequence",r.props.dashboards.length+1),t.next=9,r.props.createReport();case 9:if(r.props.saveError){t.next=14;break}return t.next=12,r.props.fetchDashboards();case 12:r.props.dashboards.length>0&&(n=r.props.dashboards[0],r.props.fetchDashboard(n.id)),r.props.triggerDrawerClose();case 14:case"end":return t.stop()}},t)})),function(t){return s.apply(this,arguments)})),(0,u.default)(r,"render",function(){var t,e=r.props.t,n=r.state.fieldErrors;return(0,_.jsx)(b.A,{component:"form",onSubmit:r.handleSubmit,noValidate:!0,children:(0,_.jsxs)(E.A,{spacing:2,children:[(0,_.jsx)(D.A,{required:!0,id:"title",name:"title",label:e("custom-reports:customReports.report.title"),placeholder:e("custom-reports:customReports.report.title.placeholder"),value:r.state.title,onChange:r.handleChange("title"),inputProps:{maxLength:255},disabled:r.props.saving,error:!!n.title,helperText:null!=(t=n.title)?t:"".concat(r.state.t
1itle.length,"/255"),fullWidth:!0,margin:"normal"}),(0,_.jsx)(D.A,{id:"description",name:"description",label:e("custom-reports:customReports.report.description"),placeholder:e("custom-reports:customReports.report.description.placeholder"),value:r.state.description,onChange:r.handleChange("description"),inputProps:{maxLength:500},disabled:r.props.saving,helperText:"".concat(r.state.description.length,"/500"),fullWidth:!0,margin:"normal",multiline:!0,minRows:3,maxRows:5}),(0,_.jsx)(D.A,{required:!0,id:"embed",name:"embed",label:e("custom-reports:customReports.report.embed"),placeholder:e("custom-reports:customReports.report.embed.placeholder"),value:r.state.embedLink,onChange:r.handleChange("embedLink"),disabled:r.props.saving,error:!!n.embed,helperText:n.embed,fullWidth:!0,margin:"normal",multiline:!0,minRows:3,maxRows:5}),(0,_.jsx)(b.A,{sx:{pt:1},children:(0,_.jsx)(A.A,{type:"submit",variant:"contained",disabled:r.props.saving||!r.state.title.trim()||!r.state.embedLink.trim(),children:e("custom-reports:customReports.report.saveClose")})})]})})}),r.state={title:"",description:"",embedLink:"",fieldErrors:{}},r}return(0,l.default)(e,t),(0,s.default)(e)}(h.Component);let z=(0,f.withTranslation)(["custom-reports","errors"])(H),B=(0,o.Ng)(function(t){return{dashboards:t.dashboards.dashboards,dashboard:t.dashboard.dashboard,saving:t.dashboard.saving,saveError:t.dashboard.saveError,errors:t.dashboard.errors}},function(t){return(0,w.zH)({createReport:R.LU,updateReport:R.A0,fetchDashboard:R.f7,fetchDashboards:S.S},t)})(z);var I=r(86085),L=r(92105),W=r(31123);function U(t){var e=t.open,r=t.onClose,n=t.title,o=t.width,s=t.children;return(0,_.jsx)(L.Ay,{anchor:"right",open:e,onClose:r,PaperProps:{sx:{width:void 0===o?"40%":o,maxWidth:"100vw",boxSizing:"border-box"}},children:(0,_.jsxs)(b.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,_.jsxs)(b.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,px:2.5,py:2,borderBottom:1,borderColor:"divider",flexShrink:0},children:[(0,_.jsx)(j.A,{component:"h2",variant:"h6",sx:{pr:1},children:n}),(0,_.jsx)(W.A,{"aria-label":"close",onClick:r,edge:"end",size:"small",children:(0,_.jsx)(I.A,{})})]}),(0,_.jsx)(b.A,{sx:{flex:1,overflow:"auto",px:"5%",py:2.5},children:e?s:null})]})})}function F(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(F=function(){return!!t})()}var M=function(t){function e(){(0,i.default)(this,e);for(var t,r,n,o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return r=e,n=[].concat(s),r=(0,c.default)(r),t=(0,a.default)(this,F()?Reflect.construct(r,n||[],(0,c.default)(this).constructor):r.apply(this,n)),(0,u.default)(t,"state",{visible:!1}),(0,u.default)(t,"toggle",function(){return t.setState({visible:!t.state.visible})}),t}return(0,l.default)(e,t),(0,s.default)(e,[{key:"render",value:function(){var t=this.state.visible,e=this.props.t;return(0,_.jsxs)("div",{children:[(0,_.jsx)(A.A,{variant:"contained",size:"large",onClick:this.toggle,children:e("custom-reports:customReports.addReport")}),(0,_.jsx)(U,{open:t,onClose:this.toggle,width:"40%",title:e("custom-reports:customReports.addReport"),children:(0,_.jsxs)(b.A,{sx:{mt:2.5},children:[(0,_.jsx)(y.A,{}),(0,_.jsx)(B,{triggerDrawerClose:this.toggle,triggerNewForm:!0})]})})]})}}])}(h.Component);(0,u.default)(M,"displayName","AddReport");let N=(0,f.withTranslation)(["custom-reports"])(M);var V=r(21014),q=r(82803),K=r(69364),Q=r.n(K),G=r(43531);function $(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return($=function(){return!!t})()}var X=function(t){function e(){(0,i.default)(this,e);for(var t,r,n,o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return r=e,n=[].concat(s),r=(0,c.default)(r),t=(0,a.default)(this,$()?Reflect.construct(r,n||[],(0,c.default)(this).constructor):r.apply(this,n)),(0,u.default)(t,"state",{visible:!1}),(0,u.default)(t,"toggle",function(){return t.setState({visible:!t.state.visible})}),t}return(0,l.default)(e,t),(0,s.default)(e,[{key:"render",value:function(){var t=this.state.visible,e=this.props.t;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(A.A,{variant:"outlined",size:"small",startIcon:(0,_.jsx)(G.A,{}),onClick:this.toggle,children:e("common:common.edit")}),(0,_.jsx)(U,{open:t,onClose:this.toggle,width:"35%",title:e("custom-reports:customReports.editReport"),children:(0,_.jsx)(B,{reportId:this.props.reportId,triggerDrawerClose:this.toggle})})]})}}])}(h.Component);(0,u.default)(X,"displayName","EditButton");let Y=(0,f.withTranslation)(["custom-reports"])(X);function J(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(J=function(){return!!t})()}var Z=function(t){function e(){(0,i.default)(this,e);for(var t,r,n,o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return r=e,n=[].concat(s),r=(0,c.default)(r),t=(0,a.default)(this,J()?Reflect.construct(r,n||[],(0,c.default)(this).constructor):r.apply(this,n)),(0,u.default)(t,"state",{visible:!1,snackbarOpen:!1,snackbarMessage:""}),(0,u.default)(t,"toggle",function(){return t.setState({visible:!t.state.visible})}),(0,u.default)(t,"showSnackbar",function(e){t.setState({snackbarOpen:!0,snackbarMessage:e})}),(0,u.default)(t,"renderDashboards",function(){var e=t.props,r=e.t;return e.dashboards.map(function(e){return(0,_.jsxs)(b.A,{sx:{bgcolor:"#ebf6fe",p:2,fontSize:14,border:"1px solid #ebf6fe",borderRadius:1,mb:1.25},children:[(0,_.jsx)(j.A,{sx:{color:"#6d7278"},variant:"body2",children:(0,_.jsx)("strong",{children:Q()(e.title,{length:60})})}),(0,_.jsx)(j.A,{sx:{color:"#6d7278",mt:.5},variant:"body2",children:Q()(e.description,{length:140})}),(0,_.jsxs)(E.A,{direction:"row",flexWrap:"wrap",useFlexGap:!0,spacing:1,sx:{mt:1.25},children:[(0,_.jsx)(Y,{reportId:e.id}),(0,_.jsx)(A.A,{variant:"outlined",size:"small",startIcon:(0,_.jsx)(V.A,{}),onClick:t.handleClick(e.id),children:r("common:common.delete")})]})]},e.id)})}),(0,u.default)(t,"handleClick",function(e){return(0,k.A)(O().mark(function r(){var n;return O().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.props.deleteDashboard(e);case 2:if(t.props.deleteError){r.next=8;break}return r.next=5,t.props.fetchDashboards();case 5:t.props.dashboards.length>1&&(n=t.props.dashboards[0],t.props.fetchDashboard(n.id),t.props.dashboards.map(function(e,r){t.props.updateReport("id",e.id),t.props.updateReport("title",e.title),t.props.updateReport("description",e.description),t.props.updateReport("embedLink",e.embedLink),t.props.updateReport("sequence",r+1),t.props.createReport()}
1)),t.toggle(),t.showSnackbar(t.props.t("custom-reports:customReports.report.deletedSuccess"));case 8:case"end":return r.stop()}},r)}))}),t}return(0,l.default)(e,t),(0,s.default)(e,[{key:"render",value:function(){var t=this,e=this.state,r=e.visible,n=e.snackbarOpen,o=e.snackbarMessage,s=this.props.t;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(A.A,{variant:"contained",size:"large",onClick:this.toggle,children:s("custom-reports:customReports.addEditReport")}),(0,_.jsx)(U,{open:r,onClose:this.toggle,width:"40%",title:s("custom-reports:customReports.addEditReport"),children:(0,_.jsxs)(b.A,{sx:{mt:2.5},children:[(0,_.jsx)(y.A,{}),(0,_.jsx)(b.A,{sx:{ml:"35%",mb:2,mt:-1.25},children:(0,_.jsx)(N,{})}),this.renderDashboards()]})}),(0,_.jsx)(q.A,{open:n,autoHideDuration:6e3,onClose:function(){return t.setState({snackbarOpen:!1})},message:o})]})}}])}(h.Component);(0,u.default)(Z,"displayName","AddEditReport");let tt=(0,f.withTranslation)(["common","custom-reports"])(Z),te=(0,o.Ng)(function(t){return{dashboards:t.dashboards.dashboards,deleteError:t.dashboard.deleteError,deleting:t.dashboard.deleting}},function(t){return(0,w.zH)({fetchDashboard:R.f7,updateReport:R.A0,createReport:R.LU,deleteDashboard:R.A_,fetchDashboards:S.S},t)})(tt);var tr=r(37900),tn=r(18847),to=r.n(tn);function ts(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ts=function(){return!!t})()}var ti=to()(function(){return r.e(4183).then(r.bind(r,4183))},{ssr:!1,loading:function(){return(0,_.jsx)(b.A,{sx:{display:"flex",justifyContent:"center",py:2},children:(0,_.jsx)(v.A,{})})},loadableGenerated:{webpack:function(){return[4183]}}}),ta=to()(function(){return Promise.resolve().then(r.bind(r,66999))},{ssr:!1,loadableGenerated:{webpack:function(){return[66999]}}}),tc=function(t){function e(){(0,i.default)(this,e);for(var t,r,n,o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return r=e,n=[].concat(s),r=(0,c.default)(r),t=(0,a.default)(this,ts()?Reflect.construct(r,n||[],(0,c.default)(this).constructor):r.apply(this,n)),(0,u.default)(t,"insightRow",function(e,r){return(0,_.jsxs)(b.A,{sx:{display:"flex",alignItems:"flex-start",gap:1.25,mt:3.125,color:"#444",fontSize:16,lineHeight:"22px"},children:[(0,_.jsx)(g.A,{color:"success",sx:{fontSize:22,flexShrink:0,mt:"2px"}}),(0,_.jsxs)(b.A,{component:"span",children:[(0,_.jsx)("strong",{children:t.props.t(e)})," - ",(0,_.jsx)(b.A,{component:"span",children:t.props.t(r)})]})]})}),(0,u.default)(t,"renderContent",function(){return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(j.A,{component:"h3",variant:"h6",sx:{color:"#444",fontSize:18,fontWeight:600,lineHeight:"24px",mb:2},children:t.props.t("custom-reports:customReports.overview")}),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px"},children:t.props.t("custom-reports:customReports.reportingAndAnalysing")}),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px"},children:t.props.t("custom-reports:customReports.engagementIQ")}),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px"},children:t.props.t("custom-reports:customReports.visualizeEngagement")}),(0,_.jsx)(j.A,{component:"h3",variant:"h6",sx:{color:"#444",fontSize:18,fontWeight:600,lineHeight:"24px",mt:5,mb:2},children:t.props.t("custom-reports:customReports.keyVisualInsights")}),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px"},children:t.props.t("custom-reports:customReports.keyVisualInsightsText")}),t.insightRow("custom-reports:customReports.whoParticipated","custom-reports:customReports.whoParticipatedKey"),t.insightRow("custom-reports:customReports.whatWasSaid","custom-reports:customReports.whatWasSaidKey"),t.insightRow("custom-reports:customReports.recommendations","custom-reports:customReports.recommendationsKey"),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px",mt:5},children:t.props.t("custom-reports:customReports.useCustomDashboard")}),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px"},children:t.props.t("custom-reports:customReports.thisServiceAllows")})]})}),(0,u.default)(t,"render",function(){return(0,_.jsx)(_.Fragment,{children:t.props.dashboards.length>0?(0,_.jsx)(tr.A,{title:t.props.t("custom-reports:customReports.heading"),actions:(0,_.jsx)(te,{}),navigation:(0,_.jsx)(ti,{}),content:(0,_.jsx)(ta,{})}):(0,_.jsx)(tr.A,{title:t.props.t("custom-reports:customReports.heading"),actions:(0,_.jsx)(N,{}),content:t.renderContent()})})}),t}return(0,l.default)(e,t),(0,s.default)(e)}(h.Component);let tl=(0,f.withTranslation)(["custom-reports"])(tc),tu=(0,o.Ng)(function(t){return{dashboards:t.dashboards.dashboards}})(tl);var td=r(66999);function tp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(tp=function(){return!!t})()}var th=to()(function(){return r.e(4183).then(r.bind(r,4183))},{ssr:!1,loading:function(){return(0,_.jsx)(b.A,{sx:{display:"flex",justifyContent:"center",py:2},children:(0,_.jsx)(v.A,{})})},loadableGenerated:{webpack:function(){return[4183]}}}),tf=function(t){function e(){(0,i.default)(this,e);for(var t,r,n,o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return r=e,n=[].concat(s),r=(0,c.default)(r),t=(0,a.default)(this,tp()?Reflect.construct(r,n||[],(0,c.default)(this).constructor):r.apply(this,n)),(0,u.default)(t,"insightRow",function(e,r){return(0,_.jsxs)(b.A,{sx:{display:"flex",alignItems:"flex-start",ga
1p:1.25,mt:3.125,color:"#444",fontSize:16,lineHeight:"22px"},children:[(0,_.jsx)(g.A,{color:"success",sx:{fontSize:22,flexShrink:0,mt:"2px"}}),(0,_.jsxs)(b.A,{component:"span",children:[(0,_.jsx)("strong",{children:t.props.t(e)})," - ",(0,_.jsx)(b.A,{component:"span",children:t.props.t(r)})]})]})}),(0,u.default)(t,"renderContent",function(){return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(j.A,{component:"h3",variant:"h6",sx:{color:"#444",fontSize:18,fontWeight:600,lineHeight:"24px",mb:2},children:t.props.t("custom-reports:customReports.overview")}),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px"},children:t.props.t("custom-reports:customReports.reportingAndAnalysing")}),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px"},children:t.props.t("custom-reports:customReports.engagementIQ")}),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px"},children:t.props.t("custom-reports:customReports.visualizeEngagement")}),(0,_.jsx)(j.A,{component:"h3",variant:"h6",sx:{color:"#444",fontSize:18,fontWeight:600,lineHeight:"24px",mt:5,mb:2},children:t.props.t("custom-reports:customReports.keyVisualInsights")}),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px"},children:t.props.t("custom-reports:customReports.keyVisualInsightsText")}),t.insightRow("custom-reports:customReports.whoParticipated","custom-reports:customReports.whoParticipatedKey"),t.insightRow("custom-reports:customReports.whatWasSaid","custom-reports:customReports.whatWasSaidKey"),t.insightRow("custom-reports:customReports.recommendations","custom-reports:customReports.recommendationsKey"),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px",mt:5},children:t.props.t("custom-reports:customReports.useCustomDashboard")}),(0,_.jsx)(j.A,{sx:{color:"#444",fontSize:16,lineHeight:"22px"},children:t.props.t("custom-reports:customReports.thisServiceAllows")}),(0,_.jsx)(b.A,{sx:{mt:5},children:t.renderButton("bottom")})]})}),(0,u.default)(t,"renderButton",function(e){var r=encodeURIComponent(t.props.t("custom-reports:customReports.mailSubject")),n=encodeURIComponent(t.props.t("custom-reports:customReports.mailBody")),o="mailto:[email protected]?subject=".concat(r,"&body=").concat(n);return(0,_.jsx)(A.A,{component:"a",href:o,target:"_blank",rel:"noopener noreferrer",variant:"contained",size:"large",children:"top"===e?t.props.t("custom-reports:customReports.getInTouch"):t.props.t("custom-reports:customReports.registerYourInterest")})}),(0,u.default)(t,"render",function(){return(0,_.jsx)(_.Fragment,{children:t.props.dashboards.length>0?(0,_.jsx)(tr.A,{title:t.props.t("custom-reports:customReports.heading"),navigation:(0,_.jsx)(th,{}),content:(0,_.jsx)(td.default,{})}):(0,_.jsx)(tr.A,{title:t.props.t("custom-reports:customReports.heading"),actions:t.renderButton("top"),content:t.renderContent()})})}),t}return(0,l.default)(e,t),(0,s.default)(e)}(h.Component);let tm=(0,f.withTranslation)(["custom-reports"])(tf),tx=(0,o.Ng)(function(t){return{dashboards:t.dashboards.dashboards}})(tm);function tg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(tg=function(){return!!t})()}var tb=function(t){function e(){(0,i.default)(this,e);for(var t,r,n,o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return r=e,n=[].concat(s),r=(0,c.default)(r),t=(0,a.default)(this,tg()?Reflect.construct(r,n||[],(0,c.default)(this).constructor):r.apply(this,n)),(0,u.default)(t,"renderContent",function(){return"platform_admin"===t.props.user.roleName?(0,_.jsx)(tu,{}):(0,_.jsx)(tx,{})}),(0,u.default)(t,"render",function(){return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(x(),{children:(0,_.jsx)("title",{className:"jsx-4215173132",children:t.props.t("custom-reports:customReports.title")})}),t.renderContent(),(0,_.jsx)(p(),{id:"4215173132",children:[".page.jsx-4215173132 .page-navigation.jsx-4215173132{margin-top:-10px;}"]})]})}),t}return(0,l.default)(e,t),(0,s.default)(e)}(h.Component);let tv=(0,f.withTranslation)(["custom-reports"])(tb),tj=(0,o.Ng)(function(t){return{user:t.currentUser.user}})(tv);var tA=(0,n.A)(tj),ty=!0;let tw=tA},51796:(t,e,r)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});var n=r(14232),o=n.useLayoutEffect,s=n.useEffect;function i(t){var e=t.headManager,r=t.reduceComponentsToState;function i(){if(e&&e.mountedInstances){var t=n.Children.toArray(Array.from(e.mountedInstances).filter(Boolean));e.updateHead(r(t))}}return o(function(){var r;return null==e||null==(r=e.mountedInstances)||r.add(t.children),function(){var r;null==e||null==(r=e.mountedInstances)||r.delete(t.children)}}),o(function(){return e&&(e._pendingUpdate=i),function(){e&&(e._pendingUpdate=i)}}),s(function(){return e&&e._pendingUpdate&&(e._pendingUpdate(),e._pendingUpdate=null),function(){e&&e._pendingUpdate&&(e._pendingUpdate(),e._pendingUpdate=null)}}),null}},55024:(t,e,r)=>{"use strict";r.d(e,{A0:()=>h,A_:()=>f,LU:()=>p,f7:()=>d});var n=r(42969),o=r(63857),s=r(60180),i=r.n(s),a=r(20126),c=r(57171);function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach(function(e){(0,n.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var d=function(t){var e;return e=(0,o.A)(i().mark(function e(r){var n;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r({type:a.A.FETCH_DASHBOARD_REQUEST}),e.prev=1,e.next=4,c.A.fetch(t);case 4:n=e.sent,r({type:a.A.FETCH_DASHBOARD_SUCCESS,dashboard:u({id:n.id},n.attributes())}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),r({type:a.A.FETCH_DASHBOARD_FAILURE,errorMessage:e.t0.statusText||e.t0.status});case 11:case"end":return e.stop()}},e,null,[[1,8]])})),function(t){return e.apply(this,arguments)}},p=function(){var t;return t=(0,o.A)(i().mark(function t(e,r){var n,o;return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e({type:a.A.CREATE_DASHBOARD_REPORT_REQUEST}),n=new c.A(r().dashboard.dashboard),t.prev=2,t.next=5,n.save();case 5:o=t.sent,e({type:a.A.CREATE_DASHBOARD_REPORT_SUCCESS,dashboard:u({id:o.id},o.attributes())}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),e({type:a.A.CREATE_DASHBOARD_REPORT_FAILURE,errorMessage:t.t0.message||t.t0.statusText||t.t0.status,errors:n.errors.extract()});case 12:case"end":return t.stop()}},t,null,[[2,9]])})),function(e,r){return t.apply(this,arguments)}},h=function(t,e){return{type:a.A.UPDATE_DASHBOARD_REPORT,key:t,value:e}},f=function(t){var e;return e=(0,o.A)(i().mark(function e(r){var n;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r({type:a.A.DELETE_DASHBOARD_REQUEST,id:t}),n=c.A.new({id:t}),e.prev=2,e.next=5,n.destroy();case 5:r({type:a.A.DELETE_DASHBOARD_SUCCESS,id:t}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),r({type:a.A.DELETE_DASHBOARD_FAILURE,id:t,errorMessage:e.t0.statusText||e.t0.status});case 11:case"end":return e.stop()}},e,null,[[2,8]])})),function(t){return e.apply(this,arguments)}}},66999:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>j});var n=r(31777),o=r(67251),s=r(23745),i=r(29898),a=r(52672),c=r(76966),l=r(42969),u=r(47091),d=r.n(u),p=r(14232),h=r(54237),f=r(95062),m=r.n(f),x=r(37876);function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(g=function(){return!!t})()}var b=function(t){function e(){var t,r;return(0,o.default)(this,e),t=e,r=arguments,t=(0,a.default)(t),(0,i.default)(this,g()?Reflect.construct(t,r||[],(0,a.default)(this).constructor):t.apply(this,r))}return(0,c.default)(e,t),(0,s.default)(e,[{key:"render",value:function(){var t=this.props.dashboard;return(0,x.jsxs)(p.Fragment,{children:[(0,x.jsx)("div",{className:"jsx-3488835778",children:(0,x.jsx)("iframe",{src:t.embedLink,frameBorder:0,className:"jsx-3488835778 iframe-report"})}),(0,x.jsx)(d(),{id:"3488835778",children:[".iframe-report.jsx-3488835778{width:100%;height:calc(100vh - 65px);}",".title.jsx-3488835778{font-size:18px;color:#4a5864;}",".description.jsx-3488835778{font-size:14px;color:#333333;margin-bottom:30px;}"]})]})}}])}(p.Component);(0,l.default)(b,"propStypes",{dashboard:m().object.isRequired,t:m().func.isRequired});let v=(0,h.withTranslation)(["custom-reports"])(b),j=(0,n.Ng)(function(t){return{dashboard:t.dashboard.dashboard}})(v)},70571:(t,e,r)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0});var n={default:function(){return m},defaultHead:function(){return d}};for(var o in n)Object.defineProperty(e,o,{enumerable:!0,get:n[o]});var s=r(72687),i=r(63732),a=r(37876),c=i._(r(14232)),l=s._(r(51796)),u=r(72563);function d(){return[(0,a.jsx)("meta",{charSet:"utf-8"},"charset"),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function p(t,e){return"string"==typeof e||"number"==typeof e?t:e.type===c.default.Fragment?t.concat(c.default.Children.toArray(e.props.children).reduce(function(t,e){return"string"==typeof e||"number"==typeof e?t:t.concat(e)},[])):t.concat(e)}r(75360);var h=["name","httpEquiv","charSet","itemProp"];function f(t){var e,r,n,o;return t.reduce(p,[]).reverse().concat(d().reverse()).filter((e=new Set,r=new Set,n=new Set,o={},function(t){var s=!0,i=!1;if(t.key&&"number"!=typeof t.key&&t.key.indexOf("$")>0){i=!0;var a=t.key.slice(t.key.indexOf("$")+1);e.has(a)?s=!1:e.add(a)}switch(t.type){case"title":case"base":r.has(t.type)?s=!1:r.add(t.type);break;case"meta":for(var c=0,l=h.length;c<l;c++){var u=h[c];if(t.props.hasOwnProperty(u))if("charSet"===u)n.has(u)?s=!1:n.add(u);else{var d=t.props[u],p=o[u]||new Set;("name"!==u||!i)&&p.has(d)?s=!1:(p.add(d),o[u]=p)}}}return s})).reverse().map(function(t,e){var r=t.key||e;return c.default.cloneElement(t,{key:r})})}var m=function(t){var e=t.children,r=(0,c.useContext)(u.HeadManagerContext);return(0,a.jsx)(l.default,{reduceComponentsToState:f,headManager:r,children:e})};("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},73614:(t,e,r)=>{"use strict";r.d(e,{A:()=>s}),r(14232);var n=r(96501),o=r(37876);let s=(0,n.A)((0,o.jsx)("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"}),"Twitter")},77328:(t,e,r)=>{t.exports=r(70571)},79753:(t,e,r)=>{"use strict";r.d(e,{A:()=>s}),r(14232);var n=r(96501),o=r(37876);let s=(0,n.A)((0,o.jsx)("path",{d:"M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3a3.26 3.26 0 0 0-3.26-3.26c-.85 0-1.84.52-2.32 1.3v-1.11h-2.79v8.37h2.79v-4.93c0-.77.62-1.4 1.39-1.4a1.4 1.4 0 0 1 1.4 1.4v4.93h2.79M6.88 8.56a1.68 1.68 0 0 0 1.68-1.68c0-.93-.75-1.69-1.68-1.69a1.69 1.69 0 0 0-1.69 1.69c0 .93.76 1.68 1.69 1.68m1.39 9.94v-8.37H5.5v8.37h2.77z"}),"LinkedIn")}},t=>{t.O(0,[62501,6853,65595,8145,40990,28672,23638,61284,26122,20640,90636,46593,38792],()=>t(t.s=13468)),_N_E=t.O()}]);
2//# sourceMappingURL=custom_reports-d8d4603070a7ffe5.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.