"use strict";(self.webpackChunkfindagrave_frontend=self.webpackChunkfindagrave_frontend||[]).push([[8551],{69917(e,t,o){o.d(t,{Ri:()=>n,TV:()=>a,kQ:()=>i});o(71757);function a(e,t,o,a){let n="",i=`path= ${a&&a.length>0?a:"/"};`,r=`domain=.${location.hostname.split(".").slice(-2).join(".")};`;if(o){let e=new Date;e.setTime(e.getTime()+24*o*60*60*1e3),n=`expires=${e.toUTCString()};`}document.cookie=`${e}=${t};${n}${i}${r}SameSite=Lax;Secure;`}function n(e){let t=document.cookie.split("; ").find(t=>t.split("=")[0]===e);return t?t.split("=")[1]:""}function i(){var e=n("consentSettings"),t={pref:!1,ga:!1,aa:!1};try{t=JSON.parse(e)}catch(e){}return t}},99376(e,t,o){o.d(t,{v:()=>a});o(71757);function a(e){return e&&["city","county","state","country"].map(t=>e[t]).filter(e=>e).join(", ")}},56533(e,t,o){o.d(t,{Ay:()=>h});var a=o(71757),n=o.n(a),i=(o(62427),o(29462)),r=o.n(i),l=o(39708),d=function(e,t,o,a){return new(o||(o=Promise))(function(n,i){function r(e){try{d(a.next(e))}catch(e){i(e)}}function l(e){try{d(a.throw(e))}catch(e){i(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(r,l)}d((a=a.apply(e,t||[])).next())})};const s=o(18510),c=o(53547);function h(){return{singleTypeahead:function(e){this.settings=n().extend({},this.defaults,e),this.changed=!1;const t=this,o=new TextEncoder;let a=new(r())({datumTokenizer:function(e){return r().tokenizers.whitespace(e.text)},queryTokenizer:r().tokenizers.whitespace,remote:{url:"/graphql/q=%prefix",wildcard:"%prefix",prepare:(e,t)=>(t.skipLoad=!/^\d+$/.test(e.trim())&&o.encode(e).length<3,t.name=e,t.url=t.url.replace("%prefix",e),t),transform:function(e){var o;return(null===(o=e.locationsByTypeahead)||void 0===o?void 0:o.locations.map(function(o){(o=Object.assign({},o)).text=["cemetery","city","county","state","country"].map(e=>o.locations[0][e]).filter(e=>e).join(", ").replace(/&/g,"&"),t.settings.displayId&&(o.text+=` (${o.id})`);const a=e.query.trim().split(/[\p{P}\s]+/u).filter(e=>e).map(e=>e.toLocaleLowerCase()),n=o.text.toLocaleLowerCase();return!a.every(e=>n.includes(e))&&o.highlight&&(o.text+=` (${o.highlight})`),o}))||[]},transport:(e,t,o)=>d(this,void 0,void 0,function*(){if(e.skipLoad)t([]);else{const{errors:a,data:n}=yield this.settings.apolloClient.query({query:l.J1` query locationTypeahead($search: LocationSearchInput) { locationsByTypeahead(search: $search) { total locations { ... on Location { id locations(format: short){ city county state country continent } names { name } coordinates { lat lon } highlight } ... on Cemetery { id locations(format: short){ cemetery city county state country continent } names { name } coordinates { lat lon } highlight } } } } `,variables:{search:{name:e.name,autocomplete:this.settings.autocomplete,categories:this.settings.type,havingCoordinates:this.settings.havingCoordinates,returnHighlight:!0}},errorPolicy:"all"});a?o(a):t(Object.assign(Object.assign({},n),{query:e.name.toLocaleLowerCase()}))}})}});this.typeaheadEl=n()(this.settings.inputId),this.typeahead=this.typeaheadEl.typeahead(this.settings.displayOptions,{name:this.settings.inputId.replace(/[#.]/,""),source:a.ttAdapter(),displayKey:"text",limit:5,templates:{notFound:function({query:e}){return!/^\d+$/.test(e.trim())&&o.encode(e).length<3?c.render():s.render()}}});const i=``;return this.typeaheadEl.addClass("form-control").after(i).parent().addClass("form-floating"),this.clearLocation=this.typeaheadEl.parents(".btn-group, .input-group").find(".clear-search"),this.targetId=n()(this.settings.targetId),this.typeahead.on("typeahead:autocomplete typeahead:select",function(e,o){t.targetId.val(null==o?void 0:o.id).data("d",o),t.typeahead.trigger("typeahead:set",[o]),t.targetId.trigger("change"),t.topSuggestion=o,t.clearLocation.removeClass("hidden")}).on("typeahead:change",function(e){var a;t.settings.onChange.call(t,e),!t.targetId.val().trim()&&o.encode(t.typeahead.typeahead("val").trim()).length>=3&&(t.changed=!0,null===(a=t.settings.onEmpty)||void 0===a||a.call(t))}).on("typeahead:render",function(e,o){o&&o.length>0&&o[0]&&(t.topSuggestion=o[0])}),t.typeahead.typeahead("val")&&t.typeahead.typeahead("val").trim().length>0&&t.clearLocation.removeClass("hidden"),t.clearLocation.on("click",function(){t.typeahead.typeahead("val",""),t.typeahead.trigger("typeahead:clear"),t.typeahead.trigger("focus"),t.targetId.val("").removeData("d"),t.targetId.trigger("change"),t.topSuggestion=null,n()(this).addClass("hidden")}),t.typeaheadEl.on("keydown",function(e){var a;if(13==e.which||9==e.which){o.encode(t.typeahead.typeahead("val").trim()).length>=3?t.topSuggestion?(t.targetId.val(t.topSuggestion.id).data("d",t.topSuggestion),t.typeahead.typeahead("val",t.topSuggestion.text),t.typeahead.trigger("typeahead:set",[t.topSuggestion]),t.targetId.trigger("change"),t.clearLocation.removeClass("hidden")):e.preventDefault():t.typeahead.typeahead("val","")}else["arrowup","arrowdown","arrowleft","arrowright","end","home","pagedown","pageup","meta","control","alt"].includes(null===(a=e.key)||void 0===a?void 0:a.toLowerCase())||e.metaKey||e.ctrlKey||(t.topSuggestion=null);return n()(this).val().trim().length>0?t.clearLocation.removeClass("hidden"):t.clearLocation.addClass("hidden"),t.settings.enterSubmitsForm||13!=e.which}).on("click",function(e){t.topSuggestion&&t.typeahead.typeahead("val").trim().length>=3&&(t.targetId.val(t.topSuggestion.id).data("d",t.topSuggestion),t.typeahead.typeahead("val",t.topSuggestion.text),t.typeahead.trigger("typeahead:set",[t.topSuggestion]),t.targetId.trigger("change"),t.typeahead.typeahead("close"),t.clearLocation.removeClass("hidden"))}),t},defaults:{inputId:"#location",targetId:"#locationId",type:p,autocomplete:"location",enterSubmitsForm:!0,noContinents:!1,displayId:!1,displayOptions:{hint:!0,highlight:!0,minLength:1},onEmpty:!1,clearEmpty:!1,onChange:function(e){this.typeahead.typeahead("val").trim().length>=3?(this.topSuggestion?(this.targetId.val(this.topSuggestion.id).data("d",this.topSuggestion),this.typeahead.trigger("typeahead:set",[this.topSuggestion]),this.targetId.trigger("change"),this.typeahead.typeahead("val",this.topSuggestion.text),this.typeahead.typeahead("close")):this.targetId.val("").removeData("d"),this.clearLocation.removeClass("hidden")):(this.targetId.val("").removeData("d"),this.typeahead.trigger("typeahead:clear"),this.targetId.trigger("change"),this.clearLocation.addClass("hidden"))}}}}const p=["loc"];o.d(t,["Xw",0,["cem"]])},96068(e,t,o){var a=o(50898),n=o(71757),i=o.n(n),r=o(54802),l=o(69917),d=o(71757);function s(e){var t;e||(e=null===(t=/page=(\d+)/.exec(window.location.href))||void 0===t?void 0:t[1]),d("#gotoPage").val(e||"1")}function c(e){if(e.length>0){const t=d(e),o=d(window),a=o.scrollTop(),n=a+o.height(),i=t.offset().top,r=i+t.height();return t.height()>o.height()?r<=n&&r>=a||i>=a&&i<=n:r<=n&&i>=a}return!1}function h(e){const t=d(window).scrollTop(),o=d(window).height(),a=d(e).offset().top,n=d(e).height();return a+n-.25*n>t&&a500&&(y=500),f>1&&m("#back-to-top").removeClass("d-none"),"click"==g?(m("#load-next-page").closest("div").removeClass("hidden"),m("#load-previous-page").closest("div").removeClass("hidden")):"scroll"==g&&m("#content-placeholder").find("div").removeClass("invisible"),t>0&&0===m(window).scrollTop()&&m(window).scrollTop(1),s(),function({rowSelector:e,itemSelector:t,focusSelectorNext:o,focusSelectorPrevious:a,loadNextFunction:n,loadPreviousFunction:i,type:r}){m(document).on("click",t,function(t){!function(e){const t=new URL(window.location.href),o=new URLSearchParams(x);let a=e.closest(".list-item-page").attr("data-url").replace("page=","");e.attr("id")&&(a+="#"+e.attr("id"));const n=e.offset().top-m(window).scrollTop();o.set("page",a),history.replaceState({distanceFromTopFold:n},null,`${t.pathname}?${o.toString().replace(/%23/g,"#")}`)}(m(this).closest(e))});let d=0;m(window).on("scroll",function(){var t;"scroll"==g&&v{q(r,o,v)})),"scroll"==g&&d>m(window).scrollTop()&&f>1&&!C&&c(`${e}:first`)&&(C=!0,m("#loadpreviousajaxloader").show(),f--,i(f,L(f),b).then(e=>{I(r,a,f)})),Math.abs(m(window).scrollTop()-S)>.1*m(window).height()&&("normal"==r?(t=e,S=m(window).scrollTop(),m(".list-item-page").each(function(e){if(h(this)){const e=new URL(window.location.href),o=new URLSearchParams(x);let a=m(this).attr("data-url").replace("page=",""),n=m(this).attr("data-url");m(this).find(t).each(function(t){if(c(m(this)))return m(this).attr("id")&&(a+="#"+m(this).attr("id")),m(this).attr("id")&&m(this).attr("id").length>3&&(/page=1$/.test(n)?m("#back-to-top").addClass("d-none"):m("#back-to-top").removeClass("d-none"),o.set("page",a),history.replaceState(null,null,`${e.pathname}?${o.toString().replace(/%23/g,"#")}`),s()),!1})}})):"suggestedEdits"==r&&function(e){S=m(window).scrollTop(),m(e).each(function(e){if(h(this)){const e=new URL(window.location.href),t=new URLSearchParams(x);let o=m(this).attr("data-url").replace("page=",""),a=m(this).attr("data-url");m(this).find("tr").each(function(n){if(c(m(this)))return m(this).attr("id")&&(o+="#"+m(this).attr("id")),m(this).attr("id")&&m(this).attr("id").length>3&&(/page=1$/.test(a)?m("#back-to-top").addClass("d-none"):m("#back-to-top").removeClass("d-none"),t.set("page",o),history.replaceState(null,null,`${e.pathname}?${t.toString().replace(/%23/g,"#")}`),s()),!1})}})}(e)),d=m(window).scrollTop()}),m(document).on("click","#load-next-page",function(e){e.preventDefault(),"click"==g&&(w=!0,m("#loadmoreajaxloader").show(),v++,n(v,L(v),b).then(e=>{q(r,o,v)}))}),m(document).on("click","#load-previous-page",function(e){e.preventDefault(),"click"==g&&(C=!0,m("#loadpreviousajaxloader").show(),f--,i(f,L(f),b).then(e=>{I(r,a,f)}))}),"click"==g?(m("#load-next-page").closest("div").removeClass("hidden"),m("#load-previous-page").closest("div").removeClass("hidden")):"scroll"==g&&m("#content-placeholder").find("div").removeClass("invisible");m(document).on("change","#scrollLists",function(e){if(e.preventDefault(),e.stopPropagation(),m("#scrollLists").is(":checked")){g="scroll",f>1&&m("#content-placeholder").find("div").removeClass("invisible"),m("#load-next-page").closest("div").addClass("hidden"),m("#load-previous-page").closest("div").addClass("hidden"),(0,l.kQ)().pref&&(0,l.TV)("pageLoadType","scroll",365)}else{g="click",m("#content-placeholder").find("div").addClass("invisible"),v1&&m("#load-previous-page").closest("div").removeClass("hidden"),(0,l.kQ)().pref&&(0,l.TV)("pageLoadType","click",365)}})}({itemSelector:i,rowSelector:n,focusSelectorNext:r,focusSelectorPrevious:d,loadNextFunction:p,loadPreviousFunction:u,type:e})}function L(e){return e*b-b}function q(e,t,o){v>=y&&m("#load-next-page").closest("div").addClass("hidden"),m("#loadmoreajaxloader").hide(),"normal"==e?m(t).trigger("focus"):"suggestedEdits"==e&&m(`tbody[data-page=${o}]`).next().find("a.fw-bold").trigger("focus"),w=!1}function I(e,t,o){if(f<=1&&(m("#content-placeholder").addClass("hidden"),m("#load-previous-page").closest("div").addClass("hidden")),m("#loadpreviousajaxloader").hide(),m(".list-item-page").addClass("in"),"normal"==e){const e=m("div.list-item-page:first").outerHeight();window.scrollTo({top:m(window).scrollTop()+e,left:0,behavior:"instant"}),m(t).trigger("focus")}else if("suggestedEdits"==e){const e=m(`tbody[data-page=${o}]`).first().offset().top,t=m(`tbody[data-page=${o+1}]`).first().offset().top-e;window.scrollTo({top:m(window).scrollTop()+t,left:0,behavior:"instant"}),m(`tbody[data-page=${o+1}]`).prev().find("a.fw-bold").trigger("focus")}C=!1}var T=o(8747);o.dn(P);var R=o(71757);function P(){var e=R("#rapGeneralProblem"),t="";function o(t,o,a){var n=t.find(".prob-number");n.html(n.html().replace("#index#",a)),t.find(".prob-general-reason").html(e.find('[value="'+o.generalReason+'"]').text()),t.find(".prob-detailed-reason").html(o.detailedReason);var i=document.createElement("a"),r=document.createTextNode(o.publicName);i.appendChild(r),i.target="_blank",i.href=o.contributorLink,t.find(".prob-reported-by-link").html(i),o.siteSponsorAcknowledgement&&findagrave.showSiteSponsorIcon?t.find("#problem-sponsor").removeClass("hidden"):t.find("#problem-sponsor").addClass("hidden"),t.find(".prob-reported-by-date").text(o.dateCreatedFormatted),o.contributorId==findagrave.contributorId?t.find(".prob-reported-delete").removeClass("hidden").attr("data-id",o.photoRequestProblemId):t.find(".prob-reported-delete").remove()}function a(o){var a=e.val(),n=R("#rapDetailedReason").val();R.ajax({url:"/photo-request/"+t+"/report-problem",data:{generalReason:a,detailedReason:n,doDelete:o,ajax:!0},method:"POST",success:function(){window.location.reload()},error:function(){window.location.reload()}})}R(document).on("click",".btn-modal-List-problems",function(e){var t=R(e.currentTarget).data("photorequestid");R.ajax({url:"/photo-request/"+t+"/problems",data:{ajax:!0},success:function(e){for(var t=R("#modal-List-problems").find(".modal-body"),a=t.find(".prob-template"),n=e.result.photoRequestProblems,i=0;inew T.m_(t))}})}),R(document).on("click",".prob-reported-delete",function(e){R(e.currentTarget).closest(".prob-template").find(".delete-problem-error").addClass("hidden");var t=R(e.currentTarget).data("id");R.ajax({url:"/photo-request/"+t+"/delete-problem",method:"DELETE",success:function(t){"success"==t.status?window.location.reload():R(e.currentTarget).closest(".prob-template").find(".delete-problem-error").removeClass("hidden")},error:function(t){R(e.currentTarget).closest(".prob-template").find(".delete-problem-error").removeClass("hidden")}})}),R(document).on("hide.bs.modal","#modal-List-problems",function(){R(this).find(".modal-body").find(".prob-template").not(".hidden").remove()}),R(document).on("click",".show-reportProblemModal",function(e){t=R(e.currentTarget).data("photorequestid")}),R("#btn-submit-reportProblem").on("click",function(){R("#problem-error-div").parent().removeClass("has-error"),R("#problem-error-div").hasClass("hidden")||R("#problem-error-div").addClass("hidden"),e.val().trim()?(R(this).attr("disabled"),a("no")):(R("#problem-error-div").parent().addClass("has-error"),R("#problem-error-div").removeClass("hidden"))}),R("#btn-submit-reportProblem-delete").on("click",function(){R("#problem-error-div").parent().removeClass("has-error"),R("#problem-error-div").hasClass("hidden")||R("#problem-error-div").addClass("hidden"),e.val().trim()?(R(this).attr("disabled"),a("yes")):(R("#problem-error-div").parent().addClass("has-error"),R("#problem-error-div").removeClass("hidden"))})}var N=o(56533),$=o(44162),j=o(3959),D=function(e,t,o,a){return new(o||(o=Promise))(function(n,i){function r(e){try{d(a.next(e))}catch(e){i(e)}}function l(e){try{d(a.throw(e))}catch(e){i(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(r,l)}d((a=a.apply(e,t||[])).next())})};let B=!1;const F=o(9921);i()(function(){var e;new r.A,P(),e=findagrave.tabId,i()("#"+e).addClass("in"),i()("#"+e).addClass("active"),i()("li a[tab-target="+e+"]").addClass("active");const t=(0,$.H)({name:"findagrave-frontend-memorial-edit"});i()('[data-bs-toggle="tooltip"]').each((e,t)=>new T.m_(t)),k({totalRecords:findagrave.total,currentPage:findagrave.page||1,rowSelector:".photo-request-item",itemSelector:".photo-request-item a",focusSelectorNext:".list-item-page:last .photo-request-item:first a:first",focusSelectorPrevious:".list-item-page:first .photo-request-item:last a:first",loadNextFunction:function(e,t,o){return D(this,void 0,void 0,function*(){let a=yield i().ajax({url:window.location.pathname,data:{ajax:!0,skip:t,limit:o,sortBy:i()("#orderby").val(),searchRadius:i()("#searchRadius").val(),type:i()("#type").val(),includeProblems:findagrave.includeProblems}});findagrave.skip=a.loadmore.next,a.page=e,a.contributorId=findagrave.contributorId,i()(".photo-requests-list").append(F.render(a)),i()('[data-bs-toggle="popover"]').popover(),i()('[data-bs-toggle="tooltip"]').each((e,t)=>new T.m_(t))})},loadPreviousFunction:function(e,t,o){return D(this,void 0,void 0,function*(){let a=yield i().ajax({url:window.location.pathname,data:{ajax:!0,skip:t,limit:o,sortBy:i()("#orderby").val(),searchRadius:i()("#searchRadius").val(),type:i()("#type").val(),includeProblems:findagrave.includeProblems}});findagrave.prev=a.loadmore.prev,a.page=e,a.contributorId=findagrave.contributorId,i()(".photo-requests-list").prepend(F.render(a)),i()('[data-bs-toggle="popover"]').popover(),i()('[data-bs-toggle="tooltip"]').each((e,t)=>new T.m_(t))})}});let o=new a.A("pr",findagrave.lat,findagrave.lon,function(e,t){window.location.href="/photo-request/location/custom/"+e+"/"+t+h()},10,5,15.99,null,null,t,()=>{T.aF.getInstance(document.querySelector("#prplotCemetery")).show()}),n=i()("#cemetery-sort");if(i()('[data-bs-toggle="popover"]').popover({html:!0}),i()("#prplotCemetery").on("shown.bs.modal",function(){o.makeOrShowMap(o)}),findagrave.searchBy||(findagrave.searchBy="currentLocation"),"unknown"===findagrave.searchBy?l(s,function(e){B=!1,i()("#loading-location").hide(),findagrave.searchBy="otherLocation",d(findagrave.searchBy,!1)}):d(findagrave.searchBy,!0),window.location.hash){const e=window.location.hash.substring(1);"inaccurateLocation"==e?(i()("#inaccurateLocation").addClass("in"),history.replaceState("",document.title,window.location.pathname+window.location.search)):"photoRequestDeleted"==e?(i()("#photoRequestDeleted").addClass("in"),history.replaceState("",document.title,window.location.pathname+window.location.search)):"photoRequestDeletedFailed"==e&&(i()("#photoRequestDeletedFailed").addClass("in"),history.replaceState("",document.title,window.location.pathname+window.location.search))}function l(e,t){navigator.geolocation?(B=!0,setTimeout(function(){B&&i()("#loading-location").show()},200),navigator.geolocation.getCurrentPosition(e,t||function(e){B=!1,i()("#loading-location").hide(),i()("#locationError").addClass("in"),console.log(e)},{maximumAge:6e5,enableHighAccuracy:!0,timeout:2e3})):i()("#locationUnsupported").addClass("in")}function d(e,o){if("cemetery"==e){i()("#searchRadiusContainer").addClass("hidden"),i()("#orderby option[value='distance']").is(":selected")&&i()("#orderby option[value='memorialName']").attr("selected","selected"),i()("#orderby option[value='distance']").addClass("hidden"),i()("#searchContainer").html(htmlSnippets.cemeterySearch);const e=(0,N.Ay)();e.singleTypeahead({inputId:"#cemetery-input",targetId:"#cemeteryid",type:N.Xw,autocomplete:"name",apolloClient:t,onChange:function(t){const o=i()("#cemetery-input").typeahead("val").trim();/^\d+$/.test(o)?i()("#cemeteryid").val(o):e.defaults.onChange.call(e,t)}}),i()("#cemetery-input").on("typeahead:set",function(e,{id:t}){t=t.replace("cemetery_","");new RegExp("cemetery/"+t+"[?/]").test(window.location.href)||(window.location.href="/photo-request/search/cemetery/"+t+h())}),findagrave.cemetery||i()("#cemetery-input").trigger("focus"),n.detach()}else 0===i()("#cemetery-sort").length&&i()("#orderby").append(n);"contributor"==e&&(i()("#searchRadiusContainer").addClass("hidden"),i()("#orderby option[value='distance']").is(":selected")&&i()("#orderby option[value='memorialName']").attr("selected","selected"),i()("#orderby option[value='distance']").addClass("hidden"),i()("#searchContainer").html(htmlSnippets.contributorSearch),findagrave.contributor||i()("#contributorid").trigger("focus")),"currentLocation"==e&&(i()("#searchRadiusContainer").removeClass("hidden"),i()("#orderby option[value='distance']").removeClass("hidden"),i()("#searchContainer").html(""),o||-1===window.location.pathname.indexOf("/current/")&&l(s)),"homeLocation"==e&&(i()("#searchRadiusContainer").removeClass("hidden"),i()("#orderby option[value='distance']").removeClass("hidden"),i()("#searchContainer").html(""),o||"/photo-request/location/home"!==window.location.pathname&&(window.location.href="/photo-request/location/home"+h())),"otherLocation"==e&&(i()("#searchRadiusContainer").removeClass("hidden"),i()("#orderby option[value='distance']").removeClass("hidden"),o||i()("#prplotCemetery").modal("show"),i()("#searchContainer").html(htmlSnippets.mapSearch)),"volunteerCemeteries"==e&&(o||(window.location.href="/photo-request/volunteer-cemeteries"))}function s(e){B=!1,i()("#loading-location").hide();const t=e.coords.latitude,o=e.coords.longitude,a=e.coords.accuracy;window.location.href=a>3e3?"/photo-request/location/current/"+t+"/"+o+h()+"#inaccurateLocation":"/photo-request/location/current/"+t+"/"+o+h()}function c(){window.location.href=window.location.pathname+h()}function h(){let e="";return i()("#orderby").val()&&(e="?sortBy="+i()("#orderby").val()),"tab-byLocation"===findagrave.tabId&&i()("#searchRadius").val()&&(e+=(e.length?"&":"?")+"searchRadius="+i()("#searchRadius").val()),"tab-myRequest"===findagrave.tabId&&i()("#type").val()&&(e+=(e.length?"&":"?")+"type="+i()("#type").val()),findagrave.includeProblems&&(e+=(e.length?"&":"?")+"includeProblems=true"),e}function p(e){i().ajax({url:window.location.pathname,data:{ajax:!0,skip:0,limit:1e3,sortBy:i()("#orderby").val(),searchRadius:i()("#searchRadius").val(),type:i()("#type").val(),includeProblems:findagrave.includeProblems},success:function(t){if(t.photoRequests.length>0){const o=t.photoRequests.map(e=>{const t="memorial"===e.latLonMethod;return{memorialId:e.memorialId,firstName:e.firstName,lastName:e.lastName,birthDate:e.birthDate,deathDate:e.deathDate,latitude:t?e.latitude:void 0,longitude:t?e.longitude:void 0,plot:e.longPlot,notes:e.notes,cemeteryId:e.cemeteryId,cemeteryName:e.cemeteryName,cemeteryLatitude:t?void 0:e.latitude,cemeteryLongitude:t?void 0:e.longitude,cityName:e.cityName,countyName:e.countyName,stateName:e.stateName,countryName:e.countryName,dateCreated:e.dateCreated,dateClaimed:e.dateClaimed,claimedBy:e.claimedBy,fullPublicName:e.fullPublicName,problems:e.problems,problemDetail:e.problemDetail}});let a=["memorialId","firstName","lastName","birthDate","deathDate","latitude","longitude","plot","notes","cemeteryId","cemeteryName","cityName","countyName","stateName","countryName","cemeteryLatitude","cemeteryLongitude"],n=j.Wp.json_to_sheet(o,{header:a}),i={SheetNames:[],Sheets:{}};i.SheetNames.push("Photo Requests"),i.Sheets["Photo Requests"]=n,(0,j._h)(i,"photo-requests."+e)}},error:function(){}})}"tab-byLocation"==findagrave.tabId&&function(){if(findagrave.searchMethod)if(i()("#tab-byLocation").find("input[name=search-method][value="+findagrave.searchMethod+"]").prop("checked",!0),findagrave.lat&&findagrave.lon){if("currentLocation"==findagrave.searchMethod){var e=" Latitude : "+findagrave.lat+", Longitude : "+findagrave.lon+"";i()("#lb-current-location").html(e)}}else if(findagrave.zipCode)i()("#zip-code").val(findagrave.zipCode);else if(findagrave.contributor)i()("#contributorid").val(findagrave.contributor);else if(findagrave.cemetery){const e=i()("