1"use strict"; 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2edbdd07-0411-5c55-8bc1-c97c67444d20")}catch(e){}}(); 3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4800],{11232:(n,t,e)=>{e.d(t,{U:()=>l});var o=e(85966),i=e(26626),r=e(80336);function a(){let n=(0,o._)(["\n fragment ConditionExpression on ConditionExpression {\n id\n customPropertyId\n operand\n operator\n}\n "]);return a=function(){return n},n}let c=(0,i.Ay)(a());function s(){let n=(0,o._)(["\n fragment FlowDocumentAction on FlowDocumentAction {\n id\n type\n url\n multilingualUrl {\n ...ContentLanguage\n }\n goToStep {\n id\n name\n }\n startFlow {\n id\n name\n }\n runInterests {\n keepUninterestedFlows\n }\n newTab\n addTrackingParams\n addFallbackUtmSource\n startFlowId\n conditions {\n ...ConditionExpression\n }\n}\n ","\n",""]);return s=function(){return n},n}let l=(0,i.Ay)(s(),r.i,c)},19694:(n,t,e)=>{e.d(t,{$:()=>s});var o=e(85966),i=e(26626),r=e(11232),a=e(56063);function c(){let n=(0,o._)(["\n fragment Trigger on Trigger {\n id\n type\n value\n state\n timeUntilActions\n clearInputAfterFire\n anchorAriaDescription\n actions {\n ...FlowDocumentAction\n }\n selector {\n ...Selector\n }\n navLinkId\n isNavLinkDisabled\n}\n ","\n",""]);return c=function(){return n},n}let s=(0,i.Ay)(c(),r.U,a.e)},22784:(n,t,e)=>{e.r(t),e.d(t,{injectWebCaptureEditor:()=>m,modifyWebCaptures:()=>h});var o=e(23397),i=e(82494),r=e(39720);let a={brand:"#6366f1",green:"#16a34a",amber:"#d97706",red:"#dc2626",gray:"#9ca3af"};function c(n){return n.name||n.id}function s(n,t){let e=String(t).length;return"".concat(String(n).padStart(e," "),"/").concat(t)}var l=e(96487);let u={limit:100,workers:1,period:60};async function d(n,t){let e=await (0,l.Hq)(n.nodeKey);if(!await t(e))return"unchanged";if(!await (0,l.p9)(n,e))throw Error("Upload failed for capture ".concat(n.id));return"modified"}async function h(n){var t,e,o,r;let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=null!=(t=h.collectionId)?t:(0,l.hE)(),m=await (0,l.oZ)(f),p={totalCaptures:m.length,capturesModified:0,capturesUnchanged:0,errors:0},g=(r=m.length,{start:()=>{console.log("%c\uD83D\uDEE0 Modifying ".concat(r," web capture").concat(1===r?"":"s"," %cin collection ").concat(f),"color:".concat(a.brand,";font-weight:bold;font-size:13px"),"color:".concat(a.gray,";font-weight:normal"))},empty:()=>{console.log("%câ¹ No web captures found in collection ".concat(f),"color:".concat(a.gray))},modified:(n,t)=>{console.log("%câ [".concat(s(t,r),"] Modified %c").concat(c(n)),"color:".concat(a.green,";font-weight:bold"),"color:".concat(a.gray))},unchanged:(n,t)=>{console.log("%c\xb7 [".concat(s(t,r),"] Unchanged %c").concat(c(n)),"color:".concat(a.gray),"color:".concat(a.gray))},retry:(n,t,e)=>{console.warn("%câ» Retrying %c".concat(c(n)," %c(attempt ").concat(t,"/").concat(e,")"),"color:".concat(a.amber,";font-weight:bold"),"color:inherit","color:".concat(a.gray))},failed:(n,t,e)=>{console.error("%câ [".concat(s(t,r),"] Failed %c").concat(c(n)),"color:".concat(a.red,";font-weight:bold"),"color:inherit",e)},summary:n=>{let t=n.capturesModified+n.capturesUnchanged;console.log("%c⨠Done %c".concat(function(n){let t=Math.round(24*n);return"".concat("â".repeat(t)).concat("â".repeat(24-t)," ").concat(Math.round(100*n),"%")}(n.totalCaptures?t/n.totalCaptures:1)),"color:".concat(a.brand,";font-weight:bold;font-size:13px"),"color:".concat(n.errors?a.amber:a.green,";font-weight:bold")),console.table({"â Modified":n.capturesModified,"\xb7 Unchanged":n.capturesUnchanged,"â Failed":n.errors,"Σ Total":n.totalCaptures})}});if(0===m.length)return g.empty(),p;g.start();let w=new i.c(null!=(e=h.queueOptions)?e:u),y=null!=(o=h.maxRetries)?o:3,b=0,v=()=>{var n;return b++,null==(n=h.onProgress)||n.call(h,b,p.totalCaptures),b};for(let t of m)!function n(t){let{capture:e,queue:o,callback:i,result:r,logger:a,maxRetries:c,settle:s,retries:l=0}=t;o.enqueue(async()=>{try{let n=await d(e,i);"modified"===n?(r.capturesModified++,a.modified(e,s())):(r.capturesUnchanged++,a.unchanged(e,s()))}catch(t){if(l>=c){r.errors++,a.failed(e,s(),t);return}a.retry(e,l+1,c),n({capture:e,queue:o,callback:i,result:r,logger:a,maxRetries:c,settle:s,retries:l+1}
3)}})}({capture:t,queue:w,callback:n,result:p,logger:g,maxRetries:y,settle:v});return await w.done(),g.summary(p),p}globalThis.dfs=r.a,globalThis.NodeType=o.Z6A;let f=Symbol("webCaptureEditor"),m=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis;n[f]||(n[f]=!0,n.modifyWebCaptures=h)}},26365:(n,t,e)=>{e.d(t,{i:()=>r});var o=e(85966);function i(){let n=(0,o._)(["\n fragment WebBasedCaptureVersion on WebBasedCaptureVersion {\n id\n createdAt\n creator {\n id\n email\n firstName\n lastName\n fullName\n }\n nodeKey\n recordId\n deviceTemplate\n customTemplateHeight\n customTemplateWidth\n deviceBgColor\n deviceBgImage\n deviceBgImageSize\n}\n "]);return i=function(){return n},n}let r=(0,e(26626).Ay)(i())},56063:(n,t,e)=>{e.d(t,{e:()=>r});var o=e(85966);function i(){let n=(0,o._)(["\n fragment Selector on Selector {\n screenshotHeight\n screenshotWidth\n pixelRatio\n dimensions {\n height\n bottom\n top\n left\n width\n right\n }\n freeSelectDimensions {\n height\n bottom\n top\n left\n width\n right\n }\n cssSelector\n imageUrl\n nv_id\n nv_roots\n roots\n}\n "]);return i=function(){return n},n}let r=(0,e(26626).Ay)(i())},72618:(n,t,e)=>{e.d(t,{x:()=>s});var o=e(85966),i=e(26626),r=e(56063),a=e(11232);function c(){let n=(0,o._)(["\n fragment Beacon on Beacon {\n id\n position\n selector {\n ...Selector\n }\n actions {\n ...FlowDocumentAction\n }\n offset {\n mainAxis\n crossAxis\n }\n size\n showAnchorHighlight\n hideBeaconCircle\n anchorAriaDescription\n navLinkId\n isNavLinkDisabled\n}\n ","\n",""]);return c=function(){return n},n}let s=(0,i.Ay)(c(),r.e,a.U)},82494:(n,t,e)=>{e.d(t,{c:()=>a});var o=e(22391),i=e(11994);function r(n){var t,e,o;return 429===(null!=(o=null!=(e=null==n?void 0:n.code)?e:null==n?void 0:n.statusCode)?o:null==n?void 0:n.status)||"string"==typeof(null==n?void 0:n.message)&&n.message.includes("429")||(null==n||null==(t=n.body)?void 0:t.errorType)==="RATE_LIMIT"}class a extends i.O{async onJobStart(){do{let n=Date.now(),t=n-this.period,e=this.timestamps.findIndex(n=>n>t);if(-1===e?(this.timestamps=[],this.pointer=0):(this.timestamps=this.timestamps.slice(e),this.pointer=Math.min((0,o.qE)(this.pointer-e),this.timestamps.length)),this.timestamps.length+this.numRunningJobs>=this.limit){let t=this.pointer>=this.timestamps.length?this.period:this.period-(n-this.timestamps[this.pointer++]);await (0,o.yy)(t)}}while(this.timestamps.length+this.numRunningJobs>=this.limit);++this.numRunningJobs}async onJobEnd(){this.timestamps.push(Date.now()),--this.numRunningJobs}backoff(n){let t=Date.now();this.timestamps=[],this.pointer=0;for(let e=0;e<this.limit;e++)this.timestamps.push(t+n-this.period)}enqueueWithRetry(n){return 0===this.maxRateLimitRetries?this.enqueue(n):this.enqueue(async()=>{let t;for(let e=0;e<=this.maxRateLimitRetries;e++)try{return await n()}catch(i){if(t=i,!this.isRetryableError(i)||e===this.maxRateLimitRetries)throw i;let n=this.period*(e+1);this.backoff(n),await (0,o.yy)(n)}throw t})}constructor({limit:n,period:t=1,maxRateLimitRetries:e=0,isRetryableError:o=r,workers:i,...a}){super({...a,workers:Math.min(n,null!=i?i:1/0)}),this.timestamps=[],this.pointer=0,this.numRunningJobs=0,this.limit=n,this.period=1e3*t,this.maxRateLimitRetries=e,this.isRetryableError=o}}},96487:(n,t,e)=>{e.d(t,{bK:()=>f,Hq:()=>y,iC:()=>h,d3:()=>p,hE:()=>w,cg:()=>g,oZ:()=>m,p9:()=>v});var o=e(75687),i=e(1415),r=e(78386),a=e(98248),c=e(67322),s=e(34584),l=e(85053),u=e(95743);async function d(n){var t;let{doc:e,variables:o}=n,i=new URL((0,s.sJP)(),window.location.origin),r=(0,u.y)(e);if(!r)throw Error("Missing body");let a="name"in e.definitions[0]&&(null==(t=e.definitions[0].name)?void 0:t.value);if(!a)throw Error("Missing operationName");let c=JSON.stringify({operationName:a,query:r,variables:o}),d=await fetch(i,{method:l.A.POST,body:c,cache:"no-cache",headers:{"Content-Type":"application/json"}}),h=await d.json();if(h.errors)throw Error(JSON.stringify(h.errors));return h.data}async function h(n,t){let e=(await p(n)).listCaptureCollections;
3if(!e)throw Error("No capture collections found");let o=e.map(n=>n.id).filter(n=>!t||n===t);return(await Promise.all(o.map(m))).flat()}async function f(n){let{captureCollection:t}=await d({doc:i.y,variables:{collectionId:n}});if(!t)throw Error("Capture collection ".concat(n," not found"));return t}async function m(n){return(await f(n)).captures.filter(n=>{var t,e;return!!(null==(e=n.webData)||null==(t=e.version)?void 0:t.nodeKey)}).map(n=>({nodeKey:n.webData.version.nodeKey,id:n.id,name:n.name,screenshotUrl:n.webData.screenshot,collectionId:n.collectionId}))}async function p(n){return await d({doc:r.Z,variables:{projectId:n}})}function g(){let n=location.pathname.split("product-demos/")[1];if(!n)throw Error("Project ID not found in URL");return n}function w(){let n=new URLSearchParams(location.search).get("collectionId");if(!n)throw Error("No capture collection selected. Open a specific collection before running this.");return n}async function y(n){return await fetch("".concat("https://c.navattic.com/api","/").concat(n)).then(n=>n.json())}async function b(n){if(!n)return;let t=await fetch(n);if(!t.ok)return;let e=await t.blob();return new Promise(n=>{let t=new FileReader;t.onloadend=()=>n(t.result),t.readAsDataURL(e)})}async function v(n,t){let e=(0,a.f)(),i=await b(n.screenshotUrl),r=await c.A.uploadCapture({node:t,captureId:e,screenshot:i});return r.ok?(await d({doc:o.O,variables:{input:{recordId:n.id,nodeKey:e}}}),!0):(console.error("Failed to upload capture ".concat(n.id,":"),r),!1)}}}]); 4//# sourceMappingURL=4800.6430645ef4e9c2f0.js.map 5//# debugId=2edbdd07-0411-5c55-8bc1-c97c67444d20
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.