PageSourceSearch

https://ads-api-reddit.netlify.app/assets/js/d06bfd36.12f21c4f.js

js ads-api-reddit.netlify.app collected 2026-10-03 10:28:56 UTC 39,163 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkreddit_ads_api_site=self.webpackChunkreddit_ads_api_site||[]).push([[8770],{97249:(e,t,n)=>{n.r(t),n.d(t,{default:()=>q});var a=n(96540),o=n(73500),r=n(40961);const i={container:"container_BWfT",header:"header_uOiC",subtitle:"subtitle_ZjtE",controls:"controls_mj4j",toolbarBtn:"toolbarBtn_mtgQ",downloadIcon:"downloadIcon__m9g",zoomInputGroup:"zoomInputGroup_UC3L",zoomPercentSuffix:"zoomPercentSuffix_y6Su",zoomInput:"zoomInput_LEc8",canvasWrapper:"canvasWrapper_zre8",canvas:"canvas_Ye34",entityCard:"entityCard_MmYs",expanded:"expanded__tRY",cardHeader:"cardHeader_V3Px",entityName:"entityName_kBo4",expandBadge:"expandBadge_vdpW",cardBody:"cardBody_UnVp",fieldItem:"fieldItem_RJPR",expandedField:"expandedField_HuQU",fadeSlideIn:"fadeSlideIn_uzn0",expandPrompt:"expandPrompt_xy_m",docLink:"docLink_a7jt",relationshipsSvg:"relationshipsSvg_PtDU",relationshipLine:"relationshipLine_sUsN",cardinalityMarker:"cardinalityMarker_O5YM",cardinalityCircle:"cardinalityCircle_Adr5",labelBg:"labelBg_Sw0v",labelText:"labelText_cvDq",legend:"legend_Ai7o",legendItem:"legendItem_Uzpv",toolbarRight:"toolbarRight_fTxk",fullscreenOverlay:"fullscreenOverlay_F46n",fullscreenContent:"fullscreenContent_fAHJ",fullscreenHeader:"fullscreenHeader_GKBP",closeFullscreenBtn:"closeFullscreenBtn_btJA",fullscreenControls:"fullscreenControls_VxET",fullscreenCanvasWrapper:"fullscreenCanvasWrapper_aybk"},s=JSON.parse('{"O5":{"business":{"name":"Business","docPath":"/docs/v3/api/businesses","featuredFields":["name","primary_contact_id","country"],"expandedFields":["agency_affiliated","created_at","creator_id","id","industry","modified_at","phone","website_url","two_fa_enforcement"],"totalFields":12},"adAccount":{"name":"Ad Account","docPath":"/docs/v3/api/ad-accounts","featuredFields":["attribution_type","primary_contact_member_id","time_zone_id"],"expandedFields":["admin_approval","app_attribution_type","app_click_attribution_window","app_view_attribution_window","business_id","click_attribution_window","created_at","currency","id","modified_at","name","pixel_partner_preferences","suspension_reason","type","view_attribution_window","excluded_communities","excluded_keywords","spend_cap_type","spend_cap_micros"],"totalFields":22},"member":{"name":"Member","docPath":"/docs/v3/api/members","featuredFields":["firstname","lastname","email","reddit_user_id"],"expandedFields":["id","phone","reddit_username","two_fa_setting"],"totalFields":8},"profile":{"name":"Profile","docPath":"/docs/v3/api/profiles","featuredFields":["name","reddit_user_id"],"expandedFields":["business_id","id","modified_at"],"totalFields":5},"campaign":{"name":"Campaign","docPath":"/docs/v3/api/campaigns","featuredFields":["objective","special_ad_categories","is_campaign_budget_optimization"],"expandedFields":["ad_account_id","configured_status","created_at","delivery_status","effective_status","funding_instrument_id","goal_type","goal_value","id","modified_at","name","spend_cap","start_time","end_time","optimization_goal","bid_strategy","bid_value","bid_type","app_id","view_through_conversion_type","priority","type","is_max","skadnetwork_metadata","age_restriction","invoice_label","conversion_pixel_id"],"totalFields":30},"adGroup":{"name":"Ad Group","docPath":"/docs/v3/api/ad-groups","featuredFields":["bid_strategy","bid_value","o
1ptimization_goal","schedule","targeting"],"expandedFields":["type","ad_account_id","bid_type","campaign_id","campaign_objective_type","configured_status","created_at","delivery_status","delivery_type","effective_status","end_time","frequency_caps","goal_type","goal_value","id","is_campaign_budget_optimization","is_processing","is_sponsored_pre_roll_highlight","content_partner_id","modified_at","name","priority","start_time","use_default_frequency_cap","view_through_conversion_type","conversion_pixel_id","app_id","cap_type","daily_cap_value","lifetime_cap_value","optimization_strategy_type","product_set_id","product_catalog_id","saved_audience_id","shopping_targeting","shopping_type","skadnetwork_metadata"],"totalFields":42},"ad":{"name":"Ad","docPath":"/docs/v3/api/ads","featuredFields":["event_trackers","preview_url","effective_status","rejection_reason"],"expandedFields":["ad_account_id","ad_group_id","campaign_id","campaign_objective_type","click_url","click_url_query_parameters","configured_status","created_at","delivery_status","id","modified_at","name","preview_expiry","skadnetwork_metadata"],"totalFields":18},"post":{"name":"Structured Post","docPath":"/docs/v3/api/structured-posts","featuredFields":["profile_id","creative","allow_comments"],"expandedFields":["id","url","created_at"],"totalFields":6},"pixel":{"name":"Pixel","docPath":"/docs/v3/api/pixels","featuredFields":["name","automatic_matching_config"],"expandedFields":["business_id","id","created_at","created_by","modified_at","modified_by","enhanced_signal_collection_config"],"totalFields":9},"catalog":{"name":"Catalog","docPath":"/docs/v3/api/product-catalogs","featuredFields":["event_sources","data_sources","summary"],"expandedFields":["id","business_id","name","default_currency","default_language","created_at","modified_at"],"totalFields":10},"audience":{"name":"Custom Audience","docPath":"/docs/v3/api/custom-audiences","featuredFields":["type","size_range_lower","size_range_upper"],"expandedFields":["name","id","status","ad_account_id","business_id","created_at","delivery_status","modified_at","engagement_audience_config","lookalike_config","pixel_audience_config","customer_list_config","cost"],"totalFields":16},"fundingInstrument":{"name":"Funding Instrument","docPath":"/docs/v3/api/funding-instruments","featuredFields":["billable_amount","credit_limit","is_servable","currency"],"expandedFields":["id","name","start_time","end_time","reasons_not_servable","invoice_group_status","authorize_status"],"totalFields":11}},"E3":[{"from":"business","to":"pixel","label":"can use asset","fromType":"zero-many","toType":"one-many"},{"from":"business","to":"catalog","label":"can use asset","fromType":"zero-many","toType":"one-only"},{"from":"business","to":"audience","label":"can use asset","fromType":"zero-many","toType":"one-only"},{"from":"business","to":"fundingInstrument","label":"is funded by","fromType":"zero-many","toType":"one-many"},{"from":"business","to":"member","label":"has","fromType":"one-many","toType":"one-many"},{"from":"business","to":"adAccount","label":"can use asset","fromType":"one-many","toType":"one-many"},{"from":"business","to":"profile","label":"can use asset","fromType":"one-many","toType":"one-many"},{"from":"adAccount","to":"member","label":"has role on","fromType":"one-many","toType":"one-many"},{"from":"adAccount","to":"profile","label":"can use asset","fromType":"one-many","toType":"one-many"},{"from":"adAccount","to":"campaign","label":"organizes","fromType":"zero-many","toType":"one-only"},{"from":"adAccount","to":"adGroup","label":"organizes","fromType":"zero-many","toType":"one-only"},{"from":"adAccount","to":"ad","label":"organizes","fromType":"zero-many","toType":"one-only"},{"from":"campaign","to":"adGroup","label":"organizes","fromType":"zero-many","toType":"one-only"},{"from":"profile","to":"ad","label":"runs","fromType":"zero-many","toType":"one-only"},{"from":"profile","to":"post","label":"authors","fromType":"zero-many","toType":"one-only"},{"from":"adGroup","to":"ad","label":"organizes","fromType":"zero-many","toType":"one-only"},{"from":"ad","to":"post","label":"promotes","fromType":"one-only","toType":"zero-many"},{"from":"fundingInstrument","to":"adAccount","label":"funds","fromType":"one-many","toType":"zero-many"},{"from":"audience","to":"adAccount","label":"can use asset","fromType":"one-only","toType":"zero-many"}]}');var l=n(28774);const c={nodeWidth:256,headerHeight:43.8,fieldHeight:28.8,moreHeight:36.8,docLinkHeight:36.8,cardBodyPadding:8,entityYOffset:2.5,gapX:180,gapY:110,padding:80,deliveryRowExtraY:100},d=[["audience","catalog","pixel"],["business"],["fundingInstrument","member","profile"],["adAccount","post"],["campaign","adGroup","ad"]];function u(e,t,n){const a=n?.omitCardChrome??!1,o=t?e.featuredFields.length+e.expandedFields.length:e.featuredFields.length,r=!a&&e.expandedFields.length>0;return c.headerHeight+c.cardBodyPadding+o*c.fieldHeight+(r?c.moreHeight:0)+(a?0:c.docLinkHeight)+c.entityYOffset}function y(e,t){const n={};let a=c.padding;d.forEach((o,r)=>
1{4===r&&(a+=c.deliveryRowExtraY);const i=o.map(e=>t(e)),s=Math.max(...i,0);o.forEach((t,o)=>{if(!e[t])return;const r=c.padding+o*(c.nodeWidth+c.gapX);n[t]={x:r,y:a}}),a+=s+c.gapY});const o=c.nodeWidth+c.gapX;if(n.pixel&&n.catalog&&n.audience){const e=(n.pixel.x+n.audience.x+c.nodeWidth)/2-c.nodeWidth/2;n.catalog={...n.catalog,x:e},n.audience={...n.audience,x:e-o},n.pixel={...n.pixel,x:e+o},n.business&&(n.business={...n.business,x:e})}n.business&&n.member&&(n.member={...n.member,x:n.business.x}),n.member&&n.fundingInstrument&&(n.fundingInstrument={...n.fundingInstrument,x:n.member.x-o}),n.member&&n.profile&&(n.profile={...n.profile,x:n.member.x+o}),n.member&&n.adAccount&&(n.adAccount={...n.adAccount,x:n.member.x}),n.profile&&n.post&&(n.post={...n.post,x:n.profile.x}),n.adAccount&&n.adGroup&&(n.adGroup={...n.adGroup,x:n.adAccount.x}),n.adGroup&&n.campaign&&(n.campaign={...n.campaign,x:n.adGroup.x-o}),n.adGroup&&n.ad&&(n.ad={...n.ad,x:n.adGroup.x+o});let r=1/0;if(Object.values(n).forEach(e=>{r=Math.min(r,e.x)}),Number.isFinite(r)&&r<c.padding){const e=c.padding-r;Object.keys(n).forEach(t=>{const a=n[t];n[t]={...a,x:a.x+e}})}return n}function m(e,t,n){let a=0,o=0;return Object.entries(e).forEach(([e,r])=>{if(!t[e])return;const i=n(e);a=Math.max(a,r.x+c.nodeWidth),o=Math.max(o,r.y+i)}),{width:a+2*c.padding,height:o+c.padding}}const h=c.nodeWidth;function x(e,t,n){return{x:(e+t)/2,y:n}}function p(e,t,n){return{x:e,y:(t+n)/2}}function f(e,t,n,a,o,r){return{fromPoint:e,toPoint:t,fromAngle:n,toAngle:a,midPoint:o,path:r}}const g=10,b=new Set(["many","one-many","zero-many","zero-one"]);function _(e,t,n,a,o){const r=Math.cos(n);return"to"===a&&r>.9&&b.has(o)?{ax:e,ay:t,drawAngle:Math.PI}:"one"===o||"one-only"===o?{ax:e+g*r,ay:t+g*Math.sin(n),drawAngle:n}:{ax:e,ay:t,drawAngle:n}}function $(e,t,n,a){const o={x:e,y:n},r={x:t,y:a},i=Math.PI/2,s=-Math.PI/2;if(Math.abs(e-t)<.5)return f(o,r,i,s,p(e,n,a),`M ${e} ${n} L ${t} ${a}`);const l=(n+a)/2;return f(o,r,i,s,{x:(e+t)/2,y:l},`M ${e} ${n} L ${e} ${l} L ${t} ${l} L ${t} ${a}`)}function v(e,t,n,a){return f(e,t,n,a,x(e.x,t.x,e.y),`M ${e.x} ${e.y} L ${t.x} ${t.y}`)}function w(e,t,n){const{positions:a,entities:o,entityDomHeights:r,expandedKeys:i,getEntityHeight:s}=n,l=a[e],c=a[t];if(!l||!c)return null;const d=o[e],u=o[t];if(!d||!u)return null;const y=i.has(e),m=i.has(t),g=r[e]??s(d,y),b=r[t]??s(u,m),_=s(d,!1),w=s(u,!1),k=l.y+3,M=l.y+g-3,j=c.y+3,P=c.y+b-3,L=l.x+h/2,I=l.y+g/2,F=c.x+h/2,C=c.y+b/2,E=l.y+_/2,T=c.y+w/2,z=h,A=Math.max(...["pixel","catalog","audience"].map(e=>{const t=a[e],n=o[e];return t&&n?t.y+(r[e]??s(n,i.has(e))):-1/0}))+52,R=Math.max(A,l.y-48),N=(e,t)=>e.x+z*t,W=(e,t)=>e.y+t/2,B=(e,t)=>e.y+t/2,S=.5,H=.3;if("business"===e&&"catalog"===t){const e=P,t=l.y,n=l.x+z/2,a=F,o={x:n,y:t},r={x:a,y:e},i=-Math.PI/2,s=Math.PI/2;return Math.abs(n-a)<.5?f(o,r,i,s,p(a,e,t),`M ${a} ${e} L ${a} ${t}`):f(o,r,i,s,x(a,n,e),`M ${a} ${e} L ${n} ${e} L ${n} ${t}`)}const O=(e,t,n)=>{const a=R;return f({x:n,y:l.y},{x:e,y:t},-Math.PI/2,Math.PI/2,x(e,n,a),`M ${e} ${t} L ${e} ${a} L ${n} ${a} L ${n} ${l.y}`)};if("business"===e&&"pixel"===t)return O(F,P,l.x+5*z/6);if("business"===e&&"audience"===t)return O(F,P,l.x+z/6);if("business"===e&&"fundingInstrument"===t){const e=l.y+.38*_;return f({x:l.x,y:e},{x:F,y:c.y},Math.PI,-Math.PI/2,x(l.x,F,e),`M ${F} ${c.y} L ${F} ${e} L ${l.x} ${e}`)}if("business"===e&&"member"===t)return $((e=>{const t=l.x+10,n=l.x+z-10;return Math.max(t,Math.min(n,e))})(F),F,M,j);if("business"===e&&"adAccount"===t){const e=l.x+z/2,t={x:e,y:M},n={x:F,y:j};if(Math.abs(e-F)<2)return f(t,n,Math.PI/2,-Math.PI/2,p(e,M,j),`M ${e} ${M} L ${F} ${j}`);const a=(M+j)/2;return f(t,n,Math.PI/2,-Math.PI/2,p(e,M,j),`M ${e} ${M} L ${e} ${a} L ${F} ${a} L ${F} ${j}`)}if("business"===e&&"profile"===t){const e=l.y+.38*_,t={x:l.x+z,y:e},n={x:F,y:c.y};return f(t,n,0,-Math.PI/2,x(t.x,n.x,t.y),`M ${t.x} ${t.y} L ${n.x} ${t.y} L ${n.x} ${n.y}`)}const Y=(e,t,n,a,o,r,i,s)=>{if(Math.abs(e-n)<2)return f(o,r,i,s,p(n,t,a),`M ${e} ${t} L ${n} ${a}`);const l=(t+a)/2;return f(o,r,i,s,p(e,t,a),`M ${e} ${t} L ${e} ${l} L ${n} ${l} L ${n} ${a}`)};if("fundingInstrument"===e&&"adAccount"===t){const e=c.x+.28*z;return Y(L,M,e,j,{x:L,y:M},{x:e,y:j},Math.PI/2,-Math.PI/2)}if("audience"===e&&"adAccount"===t){const e=Math.min(l.x,c.x)-28,t=W(l,_),n=W(c,w);return f({x:l.x,y:t},{x:c.x,y:n},Math.PI,0,p(e,t,n),`M ${l.x} ${t} L ${e} ${t} L ${e} ${n} L ${c.x} ${n}`)}if("adAccount"===e&&"member"===t){const e=l.x+z/2;return Y(F,P,e,k,{x:e,y:k},{x:F,y:P},-Math.PI/2,Math.PI/2)}if("adAccount"===e&&"profile"===t){const e=N(c,H),t=(D=.78,l.x+z*D),n=P,a=k,o=n+.68*(a-n),r=e+.55*(t-e);return f({x:t,y:a},{x:e,y:n},-Math.PI/2,Math.PI/2,{x:r,y:o},`M ${e} ${n} L ${e} ${o} L ${t} ${o} L ${t} ${a}`)}var D;if("adAccount"===e&&("campaign"===t||"adGroup"===t||"ad"===t)){const e=M,n=e=>Math.max(l.x+14,Math.min(l.x+z-14,e)),a=n(l.x+.22*z),o=n(l.x+.5*z),r=n(l.x+.78*z);if("adGroup"===t){const t=F,n=j,a={x:o,y:e},r={x:t,y:n};if(Math.abs(t-o)<2)return f(a,r,Math.PI/2,-Math.PI/2,p(t,n,e),`M ${t} ${n} L ${t} ${e}`);const i=n+.42*(e-n);return f(a,r,Math.PI/2,-Math.PI/2,x(t,o,i),`M ${t} ${n} L ${t} ${i} L ${o} ${i} L ${o} ${e}`)}if("campaign"===t){const t=j,n=a,o=F,r={x:n,y:e},i={x:o,y:t};
1if(Math.abs(n-o)<2)return f(r,i,Math.PI/2,-Math.PI/2,p(o,t,e),`M ${o} ${t} L ${o} ${e}`);const s=t+.42*(e-t);return f(r,i,Math.PI/2,-Math.PI/2,x(o,n,s),`M ${o} ${t} L ${o} ${s} L ${n} ${s} L ${n} ${e}`)}const i=c.x+.18*z,s=j,d=r,u=e+.4*(s-e);return f({x:d,y:e},{x:i,y:s},Math.PI/2,-Math.PI/2,x(d,i,u),`M ${d} ${e} L ${d} ${u} L ${i} ${u} L ${i} ${s}`)}if("profile"===e&&"post"===t){return $(N(l,S),F,M,j)}if("profile"===e&&"ad"===t){const e=Math.max(l.x+z,c.x+z)+28,t=B(l,_),n=B(c,w);return f({x:l.x+z,y:t},{x:c.x+z,y:n},0,Math.PI,p(e,t,n),`M ${l.x+z} ${t} L ${e} ${t} L ${e} ${n} L ${c.x+z} ${n}`)}const G=e=>Math.max(E,T)+e;if("ad"===e&&"post"===t){const e={x:l.x+.82*z,y:l.y+3},t={x:F,y:P},n=(e.y+t.y)/2;return f(e,t,-Math.PI/2,Math.PI/2,x(e.x,t.x,n),`M ${e.x} ${e.y} L ${e.x} ${n} L ${t.x} ${n} L ${t.x} ${t.y}`)}if("campaign"===e&&"adGroup"===t){const e=G(0);return v({x:l.x+z,y:e},{x:c.x,y:e},0,Math.PI)}if("adGroup"===e&&"ad"===t){const e=G(4);return v({x:l.x+z,y:e},{x:c.x,y:e},0,Math.PI)}const X=F-L,U=C-I;let Z,K,q,V;if(Math.abs(X)>Math.abs(U)){X>0?(Z={x:l.x+h,y:I},K={x:c.x,y:C},q=0,V=Math.PI):(Z={x:l.x,y:I},K={x:c.x+h,y:C},q=Math.PI,V=0);const e=(Z.x+K.x)/2;return f(Z,K,q,V,p(e,Z.y,K.y),`M ${Z.x} ${Z.y} L ${e} ${Z.y} L ${e} ${K.y} L ${K.x} ${K.y}`)}U>0?(Z={x:L,y:M},K={x:F,y:j},q=Math.PI/2,V=-Math.PI/2):(Z={x:L,y:l.y},K={x:F,y:P},q=-Math.PI/2,V=Math.PI/2);const J=(Z.y+K.y)/2;return f(Z,K,q,V,x(Z.x,K.x,J),`M ${Z.x} ${Z.y} L ${Z.x} ${J} L ${K.x} ${J} L ${K.x} ${K.y}`)}function k(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function M(e){const t=e.trim();
1return t?Math.min(c.nodeWidth,Math.max(78,Math.ceil(5.6*t.length)+22)):0}const j=12,P=31,L=6.5;function I(e,t,n,a,o,r,i){const{ax:s,ay:l,drawAngle:c}=_(t,n,a,o,e),d=Math.cos(c),u=Math.sin(c),y=(e,t)=>({x:s+e*d-t*u,y:l+e*u+t*d}),m=(e,t,n,a)=>`<line x1="${e}" y1="${t}" x2="${n}" y2="${a}" stroke="${r}" stroke-width="2" fill="none"/>`,h=[];switch(e){case"one":case"one-only":{const t=y(4,-7),n=y(4,7);if(h.push(m(t.x,t.y,n.x,n.y)),"one-only"===e){const e=y(10,-7),t=y(10,7);h.push(m(e.x,e.y,t.x,t.y))}break}case"zero-one":{const e=y(4,-7),t=y(4,7),n=y(18,0);h.push(m(e.x,e.y,t.x,t.y)),h.push(`<circle cx="${n.x}" cy="${n.y}" r="6" fill="${i}" stroke="${r}" stroke-width="2"/>`);break}case"many":case"one-many":{const t=y(14,0),n=y(0,-8),a=y(0,8);if(h.push(m(t.x,t.y,n.x,n.y)),h.push(m(t.x,t.y,a.x,a.y)),"one-many"===e){const e=y(18,-7),t=y(18,7);h.push(m(e.x,e.y,t.x,t.y))}break}case"zero-many":{const e=y(14,0),t=y(0,-8),n=y(0,8),a=y(26,0);h.push(m(e.x,e.y,t.x,t.y)),h.push(m(e.x,e.y,n.x,n.y)),h.push(`<circle cx="${a.x}" cy="${a.y}" r="6" fill="${i}" stroke="${r}" stroke-width="2"/>`);break}}return h.join("")}function F(e,t,n,a,o,r){const i=c.nodeWidth,s=c.headerHeight,l=c.fieldHeight,d=c.cardBodyPadding,u=t.featuredFields;let y=`<rect x="${n}" y="${a}" width="${i}" height="${o}" rx="8" fill="${r.cardBg}" stroke="${r.border}" stroke-width="2"/>`;y+=`<rect x="${n}" y="${a}" width="${i}" height="${s}" rx="8" fill="${r.headerBg}"/>`,y+=`<rect x="${n}" y="${a+s-8}" width="${i}" height="8" fill="${r.headerBg}"/>`,y+=`<text x="${n+12}" y="${a+s/2+5}" fill="${r.headerText}" font-family="Reddit Sans, sans-serif" font-size="14" font-weight="700">${k(t.name)}</text>`;let m=a+s+d/2;return u.forEach(e=>{const t=function(e,t){const n=t-2*j,a=Math.max(P,Math.floor(n/L));return e.length<=a?e:`${e.slice(0,a-1)}\u2026`}(e,i);y+=`<text x="${n+j}" y="${m+.72*l}" fill="${r.fieldText}" font-family="Reddit Mono, monospace" font-size="12">${k(t)}</text>`,m+=l}),y}async function C(e){const t=function(){const e=document.createElement("div");e.style.display="none",document.body.appendChild(e);const t=(t,n,a)=>{e.style.color=n;const o=getComputedStyle(e).color;return o&&"rgba(0, 0, 0, 0)"!==o?o:a},n={background:t(0,"var(--color-neutral-background)","#ffffff"),cardBg:t(0,"var(--color-neutral-background-strong)","#ffffff"),headerBg:t(0,"var(--color-neutral-content-strong)","#1a1a1b"),headerText:t(0,"var(--color-neutral-background-strong)","#ffffff"),fieldText:t(0,"var(--color-neutral-content)","#1a1a1b"),border:t(0,"var(--color-neutral-content-strong)","#1a1a1b"),line:t(0,"var(--color-neutral-content-strong)","#1a1a1b"),labelFill:t(0,"var(--color-neutral-background)","#ffffff"),labelStroke:t(0,"var(--color-neutral-border-weak)","#e5e5e5"),labelText:t(0,"var(--color-neutral-content-strong)","#1a1a1b")};return document.body.removeChild(e),n}(),n=function(e){const{width:t,height:n,positions:a,heights:o,entities:r,connections:i,theme:s}=e,l=[`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}" viewBox="0 0 ${t} ${n}">`,`<rect width="100%" height="100%" fill="${s.background}"/>`];for(const{conn:c}of i)l.push(`<path d="${c.path}" fill="none" stroke="${s.line}" stroke-width="2"/>`);for(const{rel:c,conn:d}of i)l.push(I(c.fromType,d.fromPoint.x,d.fromPoint.y,d.fromAngle,"from",s.line,s.labelFill)),l.push(I(c.toType,d.toPoint.x,d.toPoint.y,d.toAngle,"to",s.line,s.labelFill));for(const{rel:c,conn:d}of i){const e=c.label.trim();if(!e)continue;const t=M(e),n=20,a=d.midPoint.x,o=d.midPoint.y;l.push(`<rect x="${a-t/2}" y="${o-n/2}" width="${t}" height="${n}" rx="4" fill="${s.labelFill}" stroke="${s.labelStroke}" stroke-width="1"/>`,`<text x="${a}" y="${o}" text-anchor="middle" dominant-baseline="middle" fill="${s.labelText}" font-family="Reddit Sans, sans-serif" font-size="11" font-weight="600">${k(e)}</text>`)}for(const[c,d]of Object.entries(a)){const e=r[c],t=o[c];e&&null!=t&&l.push(F(0,e,d.x,d.y,t,s))}return l.push("</svg>"),l.join("")}({...e,theme:t});return function(e,t,n,a=2){return new Promise((o,r)=>{const i=new Image,s=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(s);i.onload=()=>{const e=document.createElement("canvas");e.width=Math.round(t*a),e.height=Math.round(n*a);const s=e.getContext("2d");if(!s)return URL.revokeObjectURL(l),void r(new Error("Canvas not supported"));s.drawImage(i,0,0,e.width,e.height),URL.revokeObjectURL(l),o(e.toDataURL("image/png"))},i.onerror=()=>{URL.revokeObjectURL(l),r(new Error("Failed to render diagram SVG"))},i.src=l})}(n,e.width,e.height,2)}var E=n(74848);const T=1,z=2,A=5,R=e=>({position:"absolute",top:0,left:0,overflow:"visible",pointerEvents:"none",zIndex:e});function N({canvasRef:e,width:t,height:n,pan:a,effectiveZoom:o,isPanning:r,idPrefix:s,connections:l,lineColor:c,renderCardinalityMarker:d,renderRelationshipLabel:u,children:y}){return(0,E.jsxs)("div",{ref:e,className:i.canvas,style:{width:t,height:n,transform:`translate(${a.x}px, ${a.y}px) scale(${o})`,transformOrigin:"0 0",cursor:r?"grabbing":"grab"},children:[(0,E.jsx)("svg",{width:t,height:n,style:R(T),children:l.map(({conn:e,index:t})=>(0,E.jsx)("path",{d:e.path,style:{fill:"none",stroke:c,strokeWidth:2}},`${s}-path-${t}`))}),(0,E.jsx)("svg",{width:t,height:n,style:R(z),children:l.map(({rel:e,conn:t,index:n})=>(0,E.jsxs)("g",{children:[d(e.fromType,t.fromPoint.x,t.fromPoint.y,t.fromAngle,"from",`${s}-from-${n}`),d(e.toType,t.toPoint.x,t.toPoint.y,t.toAngle,"to",`${s}-to-${n}`)]},`${s}-markers-${n}`))}),(0,E.jsx)("svg",{width:t,height:n,style:R(A),children:l.map(({rel:e,conn:t,index:n})=>u(e.label,t.midPoint,`${s}-label-${n}`))}),y]})}var W=n(86856),B=n(86025);function S(){const e=(0,B.Ay)("/img/erd-download.png");return(0,E.jsx)("span",{className:i.downloadIcon,style:{WebkitMaskImage:`url(${e})`,maskImage:`url(${e})`},"aria-hidden":!0})}function H({zoom:e,onZoomIn:t,onZoomOut:n,onZoomInput:a,hasExpandedEntities:o,onToggleExpandAll:r,onResetView:s,onDownload:l,isDownloading:c=!1,onFullscreen:d,fullscreenLayout:u=!1}
1){const y=u?i.fullscreenControls:i.controls;return(0,E.jsxs)("div",{className:y,children:[(0,E.jsx)("button",{type:"button",className:i.toolbarBtn,onClick:n,"aria-label":"Zoom out",title:"Zoom out",children:(0,E.jsx)(W.Ay,{glyph:"minus",label:"",size:"xl"})}),(0,E.jsxs)("div",{className:i.zoomInputGroup,children:[(0,E.jsx)("input",{type:"number",min:"50",max:"200",value:Math.round(100*e),onChange:a,className:i.zoomInput,"aria-label":"Zoom percent"}),(0,E.jsx)("span",{className:i.zoomPercentSuffix,"aria-hidden":"true",children:"%"})]}),(0,E.jsx)("button",{type:"button",className:i.toolbarBtn,onClick:t,"aria-label":"Zoom in",title:"Zoom in",children:(0,E.jsx)(W.Ay,{glyph:"add",label:"",size:"xl"})}),(0,E.jsx)("button",{type:"button",onClick:r,className:i.toolbarBtn,"aria-label":o?"Collapse all":"Expand all",title:o?"Collapse all":"Expand all",children:o?(0,E.jsx)(W.Ay,{glyph:"checkboxDismissFill",label:"",size:"xl"}):(0,E.jsx)(W.Ay,{glyph:"addSquareFill",label:"",size:"xl"})}),(0,E.jsx)("button",{type:"button",onClick:s,className:i.toolbarBtn,"aria-label":"Reset view",title:"Reset view",children:(0,E.jsx)(W.Ay,{glyph:"refresh",label:"",size:"xl"})}),l||d?(0,E.jsxs)("div",{className:i.toolbarRight,role:"group","aria-label":"Diagram actions",children:[l?(0,E.jsx)("button",{type:"button",onClick:l,className:i.toolbarBtn,disabled:c,"aria-label":"Download diagram",title:"Download diagram (PNG)",children:(0,E.jsx)(S,{})}):null,d?(0,E.jsx)("button",{type:"button",onClick:d,className:i.toolbarBtn,"aria-label":"Fullscreen",title:"Fullscreen",children:(0,E.jsx)(W.Ay,{glyph:"expandRight",label:"",size:"xl"})}):null]}):null]})}const O=c,Y=20,D=.7,G=100;function X(e,t,n,a,o){const r=n*o,i=a*o;let s,l,c,d;return r<=e?(s=0,l=e-r):(s=e-r-G,l=G),i<=t?(c=0,d=t-i):(c=t-i-G,d=G),{minX:s,maxX:l,minY:c,maxY:d}}const U={rows:d};const Z=({entityKey:e,entity:t,position:n,isExpanded:a,onClick:o,variant:r="interactive"})=>{const s="export"===r,c=a?[...t.featuredFields,...t.expandedFields]:t.featuredFields,d=t.expandedFields.length;return(0,E.jsxs)("div",{className:`${i.entityCard} ${a?i.expanded:""}`,"data-entity-key":e,style:{left:n.x,top:n.y},children:[(0,E.jsxs)("div",{className:i.cardHeader,onClick:s?void 0:o,style:s?{cursor:"default"}:void 0,children:[(0,E.jsx)("span",{className:i.entityName,children:t.name}),!s&&d>0&&(0,E.jsx)("span",{className:i.expandBadge,children:a?"\u2212":`+${d}`})]}),(0,E.jsxs)("div",{className:i.cardBody,children:[(s?t.featuredFields:c).map((e,n)=>(0,E.jsx)("div",{className:`${i.fieldItem} ${!s&&n>=t.featuredFields.length?i.expandedField:""}`,children:e},e)),!s&&d>0&&(0,E.jsx)("div",{className:i.expandPrompt,onClick:o,children:a?"Hide additional fields":`Click to see ${d} more`})]}),!s&&t.docPath&&(0,E.jsx)(l.default,{to:t.docPath,className:i.docLink,onClick:e=>e.stopPropagation(),children:"View docs \u2192"})]})};function K(){const[e,t]=(0,a.useState)(new Set),[n,o]=(0,a.useState)({}),[l,c]=(0,a.useState)(1),[d,h]=(0,a.useState)({x:0,y:0}),[x,p]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),[b,$]=(0,a.useState)(!1),v=(0,a.useRef)(null),k=(0,a.useRef)(null),M=(0,a.useRef)(null),j=(0,a.useRef)(null),P=(0,a.useRef)(null),L=(0,a.useRef)(null),I=(0,a.useRef)(l),F=(0,a.useRef)(null),T=(0,a.useRef)(!1),z=(0,a.useRef)(0);I.current=l;const A=l*D,R=s.O5,W=s.E3,B=(0,a.useMemo)(()=>y(R,t=>{const a=R[t];return a?n[t]??u(a,e.has(t)):0}),[R,e,n]),S=(0,a.useMemo)(()=>m(B,R,t=>{const a=R[t];return a?n[t]??u(a,e.has(t)):0}),[B,R,e,n]),G=(0,a.useMemo)(()=>{const t={positions:B,entities:R,entityDomHeights:n,expandedKeys:e,getEntityHeight:u};return W.map((e,n)=>{const a=w(e.from,e.to,t);return a?{rel:e,conn:a,index:n}:null}).filter(e=>null!=e)},[B,R,n,e,W]),K=(0,a.useMemo)(()=>function(e,t,n){const a={};for(const[o,r]of Object.entries(e))a[o]=u(r,t.has(o),n);return a}(R,new Set,{omitCardChrome:!0}),[R]),q=(0,a.useMemo)(()=>y(R,e=>K[e]??0),[R,K]),V=(0,a.useMemo)(()=>m(q,R,e=>K[e]??0),[q,R,K]),J=(0,a.useMemo)(()=>{const e={positions:q,entities:R,entityDomHeights:K,expandedKeys:new Set,getEntityHeight:e=>u(e,!1,{omitCardChrome:!0})};return W.map((t,n)=>{const a=w(t.from,t.to,e);return a?{rel:t,conn:a,index:n}:null}).filter(e=>null!=e)},[q,K,R,W]),Q=(0,a.useCallback)(async()=>{$(!0);try{!function(e,t){const n=document.createElement("a");n.download=t,n.href=e,n.click()}(await C({width:V.width,height:V.height,positions:q,heights:K,entities:R,connections:J}),"reddit-ads-api-erd.png")}catch(e){console.error("ERD download failed",e)}finally{$(!1)}},[V,q,K,R,J]),ee=(0,a.useRef)(B),te=(0,a.useRef)(n),ne=(0,a.useRef)(e),ae=(0,a.useRef)(d);ee.current=B,te.current=n,ne.current=e,ae.current=d,(0,a.useLayoutEffect)(()=>{const e=f?j.current:M.current;if(!e)return;const t={};
1e.querySelectorAll("[data-entity-key]").forEach(e=>{const n=e.getAttribute("data-entity-key");n&&(t[n]=e.offsetHeight)}),0!==Object.keys(t).length&&o(e=>{const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const a of n)if(e[a]!==t[a])return t;return e})},[f,e,R]);const oe=(0,a.useCallback)(()=>{const e=f?k.current:v.current;return e?X(e.clientWidth,e.clientHeight,S.width,S.height,A):{minX:-1e6,maxX:1e6,minY:-1e6,maxY:1e6}},[S,A,f]),re=(0,a.useCallback)(e=>{const t=oe();return{x:Math.max(t.minX,Math.min(t.maxX,e.x)),y:Math.max(t.minY,Math.min(t.maxY,e.y))}},[oe]),ie=(0,a.useRef)(re);ie.current=re;const se=(0,a.useRef)(S);se.current=S;const le=(0,a.useCallback)(e=>{const t=f?k.current:v.current,n=se.current,a=ee.current;if(!t||n.width<64)return void h({x:0,y:0});const o=t.clientWidth,r=t.clientHeight,i=e*D,s=X(o,r,n.width,n.height,i),l=a.catalog?.y??a.pixel?.y??a.audience?.y??O.padding,c=o/2-i*(null!=a.business?a.business.x+O.nodeWidth/2:l+O.nodeWidth/2),d=16-i*l;h({x:Math.max(s.minX,Math.min(s.maxX,c)),y:Math.max(s.minY,Math.min(s.maxY,d))})},[f]);(0,a.useEffect)(()=>{h(e=>ie.current(e))},[l,f]),(0,a.useEffect)(()=>{const e=()=>h(e=>ie.current(e));return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const ce=(0,a.useRef)(!1),de=(0,a.useRef)({}),ue=(0,a.useRef)(!1);(0,a.useLayoutEffect)(()=>{ce.current||f||S.width<64||0!==Object.keys(n).length&&v.current&&(ce.current=!0,le(1),de.current={...ee.current})},[S.width,S.height,f,le,n]),(0,a.useLayoutEffect)(()=>{f&&!ue.current&&S.width>=64&&(le(I.current),de.current={...ee.current}),ue.current=f},[f,le,S.width]),(0,a.useLayoutEffect)(()=>{if(!ce.current)return;const e=de.current,t=I.current*D,n=function(e,t,n){if(0===Object.keys(t).length)return 0;let a=0;for(let o=0;o<U.rows.length-1;o++){const r=U.rows[o+1]?.[0];if(!r)continue;const i=t[r]?.y,s=n[r]?.y;if(void 0===i||void 0===s)continue;const l=s-i;Math.abs(l)<.25||e>=i-.5&&(a+=l)}return a}(Math.max(0,-ae.current.y/t),e,B);de.current={...B},Math.abs(n)<.25||h(e=>{const a={x:e.x,y:e.y-t*n},o=oe();return a.x>=o.minX&&a.x<=o.maxX&&a.y>=o.minY&&a.y<=o.maxY?a:re(a)})},[B,oe,re]);const ye=(0,a.useCallback)(e=>{if("mouse"===e.pointerType&&0!==e.button)return;const t=e.target;t.closest("a")||t.closest(`.${i.expandPrompt}`)||t.closest(`.${i.cardHeader}`)||T.current||"touch"===e.pointerType&&(z.current+=1,z.current>1)||null===P.current&&(P.current=e.pointerId,L.current={originX:e.clientX,originY:e.clientY,panX:d.x,panY:d.y},p(!0),e.currentTarget.setPointerCapture(e.pointerId))},[d]),me=(0,a.useCallback)(e=>{if(T.current)return;if(P.current!==e.pointerId||!L.current)return;const t=L.current;h(ie.current({x:t.panX+(e.clientX-t.originX),y:t.panY+(e.clientY-t.originY)}))},[]),he=(0,a.useCallback)(e=>{"touch"===e.pointerType&&(z.current=Math.max(0,z.current-1)),P.current===e.pointerId&&(P.current=null,L.current=null,p(!1),e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},[]);(0,a.useEffect)(()=>{const e=e=>{e.preventDefault(),e.stopPropagation(),h(t=>ie.current({x:t.x-e.deltaX,y:t.y-e.deltaY}))},t=v.current,n=k.current;return t&&t.addEventListener("wheel",e,{passive:!1}),n&&n.addEventListener("wheel",e,{passive:!1}),()=>{t&&t.removeEventListener("wheel",e),n&&n.removeEventListener("wheel",e)}},[f]),(0,a.useEffect)(()=>{const e=e=>{if(e.length<2)return 0;const t=e.item(0),n=e.item(1);return Math.hypot(t.clientX-n.clientX,t.clientY-n.clientY)},t=t=>{if(2!==t.touches.length)return;const n=e(t.touches);if(n<2)return;F.current={initialDistance:n,initialZoom:I.current},T.current=!0,z.current=t.touches.length;const a=t.currentTarget;if(null!==P.current){const e=P.current;try{a.hasPointerCapture?.(e)&&a.releasePointerCapture(e)}catch{}}P.current=null,L.current=null,p(!1)},n=t=>{if(2!==t.touches.length||!F.current)return;t.preventDefault();const{initialDistance:n,initialZoom:a}=F.current,o=e(t.touches);if(n<2)return;const r=Math.max(.5,Math.min(2,a*(o/n)));c(r)},a=e=>{e.touches.length<2&&(F.current=null,T.current=!1)},o={passive:!1},r={passive:!0},i=e=>{e.addEventListener("touchstart",t,r),e.addEventListener("touchmove",n,o),e.addEventListener("touchend",a,r),e.addEventListener("touchcancel",a,r)},s=e=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",n),e.removeEventListener("touchend",a),e.removeEventListener("touchcancel",a)},l=v.current,d=k.current;return l&&i(l),d&&i(d),()=>{l&&s(l),d&&s(d)}},[f]),(0,a.useEffect)(()=>{const e=e=>{"Escape"===e.key&&f?g(!1):!e.metaKey&&!e.ctrlKey||"="!==e.key&&"+"!==e.key?(e.metaKey||e.ctrlKey)&&"-"===e.key?(e.preventDefault(),c(e=>Math.max(.5,.8*e))):(e.metaKey||e.ctrlKey)&&"0"===e.key&&(e.preventDefault(),c(1),requestAnimationFrame(()=>{requestAnimationFrame(()=>le(1))})):(e.preventDefault(),c(e=>Math.min(2,1.2*e)))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[f,le]),(0,a.useEffect)(()=>
1{if(f){const e=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%",()=>{const e=parseInt(document.body.style.top||"0",10);document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width="",window.scrollTo(0,-e)}}},[f]);const xe=e.size>0,pe=(0,a.useCallback)(()=>{t(new Set),c(1),de.current={},requestAnimationFrame(()=>{requestAnimationFrame(()=>{le(1),de.current={...ee.current}})})},[le]),fe="var(--color-neutral-content-strong)",ge="var(--color-neutral-background)",be=()=>Object.entries(R).map(([n,a])=>(0,E.jsx)(Z,{entityKey:n,entity:a,position:B[n],isExpanded:e.has(n),onClick:()=>(e=>{t(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})})(n)},n)),_e={zoom:l,onZoomIn:()=>c(e=>Math.min(2,1.2*e)),onZoomOut:()=>c(e=>Math.max(.5,.8*e)),onZoomInput:e=>{const t=parseInt(e.target.value,10);isNaN(t)||c(Math.max(.5,Math.min(2,t/100)))},hasExpandedEntities:xe,onToggleExpandAll:()=>{if(xe)t(new Set);else{const e=Object.keys(R).filter(e=>R[e].expandedFields.length>0);t(new Set(e))}},onResetView:pe,onDownload:Q,isDownloading:b},$e={width:S.width,height:S.height,pan:d,effectiveZoom:A,isPanning:x,connections:G,lineColor:fe,lineBg:ge,renderCardinalityMarker:(e,t,n,a,o,r)=>{const{ax:i,ay:s,drawAngle:l}=_(t,n,a,o,e),c=Math.cos(l),d=Math.sin(l),u=(e,t)=>
1({x:i+e*c-t*d,y:s+e*d+t*c}),y=[],m={stroke:fe,strokeWidth:2,fill:"none"};switch(e){case"one":case"one-only":{const t=u(4,-7),n=u(4,7);if(y.push((0,E.jsx)("line",{x1:t.x,y1:t.y,x2:n.x,y2:n.y,style:m},`${r}-l1`)),"one-only"===e){const e=u(10,-7),t=u(10,7);y.push((0,E.jsx)("line",{x1:e.x,y1:e.y,x2:t.x,y2:t.y,style:m},`${r}-l2`))}break}case"zero-one":{const e=u(4,-7),t=u(4,7),n=u(18,0);y.push((0,E.jsx)("line",{x1:e.x,y1:e.y,x2:t.x,y2:t.y,style:m},`${r}-l1`)),y.push((0,E.jsx)("circle",{cx:n.x,cy:n.y,r:6,style:{fill:ge,stroke:fe,strokeWidth:2}},`${r}-c`));break}case"many":case"one-many":{const t=u(14,0),n=u(0,-8),a=u(0,8);if(y.push((0,E.jsx)("line",{x1:t.x,y1:t.y,x2:n.x,y2:n.y,style:m},`${r}-t`)),y.push((0,E.jsx)("line",{x1:t.x,y1:t.y,x2:a.x,y2:a.y,style:m},`${r}-b`)),"one-many"===e){const e=u(18,-7),t=u(18,7);y.push((0,E.jsx)("line",{x1:e.x,y1:e.y,x2:t.x,y2:t.y,style:m},`${r}-l`))}break}case"zero-many":{const e=u(14,0),t=u(0,-8),n=u(0,8),a=u(26,0);y.push((0,E.jsx)("line",{x1:e.x,y1:e.y,x2:t.x,y2:t.y,style:m},`${r}-t`)),y.push((0,E.jsx)("line",{x1:e.x,y1:e.y,x2:n.x,y2:n.y,style:m},`${r}-b`)),y.push((0,E.jsx)("circle",{cx:a.x,cy:a.y,r:6,style:{fill:ge,stroke:fe,strokeWidth:2}},`${r}-c`));break}}return(0,E.jsx)("g",{children:y},r)},renderRelationshipLabel:(e,t,n)=>{const a=e.trim();if(!a)return null;const o=function(e){const t=e?.trim()??"";
1return t?Math.min(O.nodeWidth,Math.max(78,Math.ceil(5.6*t.length)+22)):0}(a),r=Y;return(0,E.jsxs)("g",{children:[(0,E.jsx)("rect",{x:t.x-o/2,y:t.y-r/2,width:o,height:r,rx:4,style:{fill:ge,stroke:"var(--color-neutral-border-weak)",strokeWidth:1}}),(0,E.jsx)("text",{x:t.x,y:t.y,textAnchor:"middle",dominantBaseline:"middle",style:{fill:fe,fontSize:11,fontWeight:600,fontFamily:"Reddit Sans, sans-serif"},children:a})]},n)}};return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("div",{className:i.container,children:[(0,E.jsxs)("div",{className:i.header,children:[(0,E.jsx)("h3",{children:"Entity Relationship Diagram"}),(0,E.jsx)("p",{className:i.subtitle,children:"Drag to pan \u2022 Pinch to zoom on touch \u2022 Scroll or +/\u2212 \u2022 \u2318+/\u2318-"})]}),(0,E.jsx)(H,{..._e,onFullscreen:()=>g(!0)}),(0,E.jsx)("div",{ref:v,className:i.canvasWrapper,onPointerDown:ye,onPointerMove:me,onPointerUp:he,onPointerCancel:he,children:(0,E.jsx)(N,{...$e,canvasRef:M,idPrefix:"inline",children:be()})}),(0,E.jsxs)("div",{className:i.legend,children:[(0,E.jsxs)("div",{className:i.legendItem,children:[(0,E.jsxs)("svg",{width:"80",height:"40",viewBox:"0 0 80 40",children:[(0,E.jsx)("line",{x1:"0",y1:"20",x2:"176",y2:"20",style:{stroke:fe,strokeWidth:4}}),(0,E.jsx)("line",{x1:"25",y1:"0",x2:"25",y2:"45",style:{stroke:fe,strokeWidth:4}}),(0,E.jsx)("line",{x1:"40",y1:"0",x2:"40",y2:"45",style:{stroke:fe,strokeWidth:4}})]}),(0,E.jsx)("span",{children:"One (only)"})]}),(0,E.jsxs)("div",{className:i.legendItem,children:[(0,E.jsxs)("svg",{width:"80",height:"40",viewBox:"0 0 80 40",children:[(0,E.jsx)("line",{x1:"0",y1:"20",x2:"176",y2:"20",style:{stroke:fe,strokeWidth:4}}),(0,E.jsx)("line",{x1:"10",y1:"0",x2:"10",y2:"45",style:{stroke:fe,strokeWidth:4}}),(0,E.jsx)("circle",{cx:"35",cy:"20",r:15,style:{fill:ge,stroke:fe,strokeWidth:4}})]}),(0,E.jsx)("span",{children:"Zero or One"})]}),(0,E.jsxs)("div",{className:i.legendItem,children:[(0,E.jsxs)("svg",{width:"80",height:"40",viewBox:"0 0 80 40",children:[(0,E.jsx)("line",{x1:"0",y1:"20",x2:"176",y2:"20",style:{stroke:fe,strokeWidth:4}}),(0,E.jsx)("line",{x1:"35",y1:"0",x2:"35",y2:"45",style:{stroke:fe,strokeWidth:4}}),(0,E.jsx)("line",{x1:"35",y1:"20",x2:"0",y2:"0",style:{stroke:fe,strokeWidth:4}}),(0,E.jsx)("line",{x1:"35",y1:"20",x2:"0",y2:"45",style:{stroke:fe,strokeWidth:4}})]}),(0,E.jsx)("span",{children:"One or Many"})]}),(0,E.jsxs)("div",{className:i.legendItem,children:[(0,E.jsxs)("svg",{width:"80",height:"40",viewBox:"0 0 80 40",children:[(0,E.jsx)("line",{x1:"0",y1:"20",x2:"176",y2:"20",style:{stroke:fe,strokeWidth:4}}),(0,E.jsx)("circle",{cx:"50",cy:"20",r:15,style:{fill:ge,stroke:fe,strokeWidth:4}}),(0,E.jsx)("line",{x1:"35",y1:"20",x2:"0",y2:"0",style:{stroke:fe,strokeWidth:4}}),(0,E.jsx)("line",{x1:"35",y1:"20",x2:"0",y2:"45",style:{stroke:fe,strokeWidth:4}})]}),(0,E.jsx)("span",{children:"Zero or Many"})]})]})]}),f?(0,r.createPortal)((0,E.jsx)("div",{className:i.fullscreenOverlay,onClick:()=>g(!1),children:(0,E.jsxs)("div",{className:i.fullscreenContent,onClick:e=>e.stopPropagation(),children:[(0,E.jsxs)("div",{className:i.fullscreenHeader,children:[(0,E.jsx)("h3",{children:"Entity Relationship Diagram"}),(0,E.jsx)("button",{className:i.closeFullscreenBtn,onClick:()=>g(!1),"aria-label":"Close fullscreen",children:"\u2715"})]}),(0,E.jsx)(H,{..._e,fullscreenLayout:!0}),(0,E.jsx)("div",{ref:k,className:i.fullscreenCanvasWrapper,onPointerDown:ye,onPointerMove:me,onPointerUp:he,onPointerCancel:he,children:(0,E.jsx)(N,{...$e,canvasRef:j,idPrefix:"fs",children:be()})})]})}),document.body):null]})}function q(){const[e,t]=(0,a.useState)(!1),[n,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const e="true"===new URLSearchParams(window.location.search).get("embed");if(t(e),r(!0),e){document.documentElement.setAttribute("data-theme","light"),document.documentElement.setAttribute("data-color-mode","light");const e=document.createElement("style");return e.id="erd-page-embed-styles",e.innerHTML="\n        /* Hide all Docusaurus chrome */\n        .navbar, .footer, .theme-doc-sidebar-container,\n        .pagination-nav, .theme-doc-breadcrumbs, .theme-doc-toc-mobile {\n          display: none !important;\n        }\n        \n        /* Remove margins/padding */\n        .main-wrapper { margin-top: 0 !important; }\n        html, body { \n          overflow: hidden !important; \n          background: transparent !important;\n        }\n        \n        /* Make content full width and remove margins */\n        .contaniner_BWfT {\n          max-width: 100% !important;\n        }\n        \n        /* Hide scrollbars but allow scrolling via controls */\n        .theme-doc-markdown {\n          overflow: hidden !important;\n        }\n        \n        /* Transparent background for seamless embedding */\n        .main-wrapper, main, .container, .theme-doc-markdown {\n          background: transparent !important;\n        }\n      ",document.head.appendChild(e),()=>{const e=document.getElementById("erd-page-embed-styles");e&&e.remove()}}},[]),(0,E.jsx)(o.A,{title:"Entity Relationship Diagram",children:(0,E.jsx)("div",{className:"theme-doc-markdown",style:{padding:e?0:"2rem",minHeight:e?"auto":"100vh",width:"100%",background:e?"transparent":void 0,overflow:e?"hidden":void 0},children:n?(0,E.jsx)(K,{}):(0,E.jsx)("p",{children:"Loading..."})})})}}}]);

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.