1const visitWidgetDomain = visitwidget.widget_subdomain; 2 3function getPlanItems() { 4 var planId = getCookieValue("planId"); 5 var script = document.createElement("script"); 6 var url = 7 visitWidgetDomain + 8 "/session_api/v1/plan_items.js?plan_id=" + 9 planId + 10 "&callback=onReceivedPlanItems&third_party_ids="; 11 const planItems = getCookieValue("ClientSitePlanItems"); 12 if (planItems != null) { 13 url = url + planItems; 14 } 15 16 script.setAttribute("src", url); 17 document.head.appendChild(script); 18} 19 20function onReceivedPlanItems(planItems) { 21 var thirdPartyIds = planItems.map((x) => x.third_party_id); 22 var cookieValue = encodeURIComponent(thirdPartyIds.join(",")); 23 document.cookie = "ClientSitePlanItems=" + cookieValue + ";path=/"; 24} 25 26function getCookieValue(name) { 27 var values = document.cookie.match("(^|;)\\s*" + name + "\\s*=\\s*([^;]+)"); 28 return values ? values.pop() : null; 29} 30 31function addPlanItemToVisitWidget(thirdPartyId, entityType) { 32 // entityType must be either 'Place' or 'Event' 33 var planId = decodeURIComponent(getCookieValue("planId")); 34 var url = 35 visitWidgetDomain + 36 "/session_api/v1/plan_items/create.js?third_party_id=" + 37 thirdPartyId + 38 "&type=" + 39 entityType + 40 "&plan_id=" + 41 planId + 42 "&callback=VisitWidgetLLC.visitWidgetControl.onAddedToPlan"; 43 44 var script = document.createElement("script"); 45 script.setAttribute("src", url); 46 document.head.appendChild(script); 47} 48 49function removePlanItemFromVisitWidget(thirdPartyId, entityType) { 50 // entityType must be either 'Place' or 'Event' 51 var planId = getCookieValue("planId"); 52 var url = 53 visitWidgetDomain + 54 "/session_api/v1/plan_items/delete.js?third_party_id=" + 55 thirdPartyId + 56 "&type=" + 57 entityType + 58 "&plan_id=" + 59 planId + 60 "&callback=VisitWidgetLLC.visitWidgetControl.setPlanItemCount"; 61 62 var script = document.createElement("script"); 63 script.setAttribute("src", url); 64 document.head.appendChild(script); 65} 66 67function plusIcon() { 68 return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> 69 <path 70 d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344V280H168c-13.3 0-24-10.7-24-24s10.7-24 24-24h64V168c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24H280v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z" 71 /> 72 </svg>`; 73} 74 75function minusIcon() { 76 return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> 77 <path 78 d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232H328c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z" 79 /> 80 </svg>`; 81} 82 83function checkIcon() { 84 return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"> 85 <path 86 d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" 87 /> 88 </svg>`; 89}
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.