PageSourceSearch

https://datahub.io/_next/static/chunks/7217.c10fc5bc1f712c0a.js

js datahub.io collected 2026-10-01 08:48:27 UTC 11,649 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7217],{40758:function(e,t,n){"use strict";n.d(t,{$:function(){return s}});var r=n(61354),o=n(24303),i=n(97266),a=n(57015),c=n(42224),l=n(81537);let s=e=>{let{publicationSlug:t,datasetSlug:n,viewIndex:s}=e,[u,d]=(0,o.useState)(!1),[p,f]=(0,o.useState)(!1),h="https://datahub.io/".concat(t,"/").concat(n,"/v/").concat(s),m='<iframe src="'.concat(h,'" width="800" height="500" frameborder="0"></iframe>');return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{onClick:()=>d(!0),className:"flex items-center gap-1.5 rounded border border-gray-200 px-2 py-1 text-xs text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800 transition-colors",title:"Get embed code",children:[(0,r.jsx)(i.Z,{className:"h-3.5 w-3.5"}),"Embed"]}),u&&(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",onClick:()=>d(!1),children:(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:"Embed this view"}),(0,r.jsx)("button",{onClick:()=>d(!1),className:"text-gray-400 hover:text-gray-600",children:(0,r.jsx)(a.Z,{className:"h-4 w-4"})})]}),(0,r.jsx)("p",{className:"mb-3 text-xs text-gray-500",children:"Copy this snippet and paste it into your HTML to embed this view."}),(0,r.jsxs)("div",{className:"relative rounded border border-gray-200 bg-gray-50 p-3",children:[(0,r.jsx)("code",{className:"block break-all text-xs text-gray-700",children:m}),(0,r.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(m).then(()=>{f(!0),setTimeout(()=>f(!1),2e3)})},className:"absolute right-2 top-2 flex items-center gap-1 rounded border border-gray-200 bg-white px-2 py-1 text-xs text-gray-600 hover:bg-gray-50",title:"Copy to clipboard",children:p?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z,{className:"h-3.5 w-3.5 text-green-600"}),(0,r.jsx)("span",{className:"text-green-600",children:"Copied!"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{className:"h-3.5 w-3.5"}),"Copy"]})})]})]})})]})}},77643:function(e,t,n){"use strict";var r=n(61354),o=n(36619),i=n.n(o);t.Z=e=>{let{color:t="#000"}=e;return(0,r.jsxs)("span",{className:i().loading,children:[(0,r.jsx)("span",{style:{backgroundColor:t}}),(0,r.jsx)("span",{style:{backgroundColor:t}}),(0,r.jsx)("span",{style:{backgroundColor:t}})]})}},94015:function(e,t,n){"use strict";var r,o,i,a,c,l,s,u,d,p,f,h;function m(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e.capture(t,n)}function y(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};m(e,"dataset_extraction",{type:t,...n,...r})}function g(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};m(e,"dataset_interaction",{type:t,...n,...r})}function v(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};m(e,"publication_subscription",{publication_slug:n,method:t,...r})}function b(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e&&m(e,t,{...n,...r})}function _(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e&&m(e,t,{...n,...r})}n.d(t,{BL:function(){return i},DH:function(){return g},FU:function(){return l},H_:function(){return c},_z:function(){return o},cR:function(){return v},dM:function(){return y},kY:function(){return a},vC:function(){return b},wF:function(){return _}}),(s=r||(r={})).DatasetExtraction="dataset_extraction",s.DatasetInteraction="dataset_interaction",s.PublicationSubscription="publication_subscription",s.AISurfaceClick="ai_surface_click",(u=o||(o={})).RawDownload="raw_download",u.FilteredDownload="filtered_download",u.CopyToClipboard="copy_to_clipboard",u.VisualizationExport="visualization_export",(d=i||(i={})).TableScroll="table_scroll",d.TableFilter="table_filter",d.RelatedDatasetClick="related_dataset_click",d.SolutionClick="solution_click",d.Like="like",d.VisualizationShare="visualization_share",d.ExplorePageView="explore_page_view",d.SqlQueryRun="sql_query_run",d.SqlQueryError="sql_query_error",d.SqlCsvDownload="sql_csv_download",d.SqlAiGenerate="sql_ai_generate",(p=a||(a={})).BannerViewed="premium_banner_viewed",p.CheckoutModalOpened="premium_checkout_modal_opened",p.CheckoutStarted="premium_checkout_started",p.CheckoutError="premium_checkout_error",p.DownloadReady="premium_download_ready",p.DownloadClicked="premium_download_clicked",p.EmailFallback="premium_email_fallback",(f=c||(c={})).ModalOpened="data_request_modal_opened",f.Submitted="data_request_submitted",(h=l||(l={})).PremiumDatasetBanner="premium_dataset_banner",h.SitewideBanner="sitewide_banner",h.FrontBanner="front_banner",h.FrontInline="front_inline",h.SolutionsPage="solutions_page",h.ComingSoonBanner="coming_soon_banner"},42224:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(18086).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},97266:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(18086).Z)("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},81537:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});
1let r=(0,n(18086).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},84268:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(18086).Z)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]])},57015:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(18086).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},76535:function(e,t,n){"use strict";var r,o;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(o=n.g.process)?void 0:o.env)?n.g.process:n(91077)},91077:function(e){!function(){var t={229:function(e){var t,n,r,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function c(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l=[],s=!1,u=-1;function d(){s&&r&&(s=!1,r.length?l=r.concat(l):u=-1,l.length&&p())}function p(){if(!s){var e=c(d);s=!0;for(var t=l.length;t;){for(r=l,l=[];++u<t;)r&&r[u].run();u=-1,t=l.length}r=null,s=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||s||c(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}},a=!0;try{t[e](i,i.exports,r),a=!1}finally{a&&delete n[e]}return i.exports}r.ab="//";var o=r(229);e.exports=o}()},22222:function(e,t,n){"use strict";n.d(t,{U0:function(){return l},zf:function(){return a}});var r=n(33569),o=n(24303),i=(0,o.createContext)({client:r.default,bootstrap:void 0});function a(e){var t,n,a=e.children,c=e.client,l=e.apiKey,s=e.options,u=(0,o.useRef)(null),d=(0,o.useMemo)(function(){return c?(l&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),s&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),c):(l||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),r.default)},[c,l,JSON.stringify(s)]);return(0,o.useEffect)(function(){if(!c){var e=u.current;e?(l!==e.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),s&&!function e(t,n,r){if(void 0===r&&(r=new WeakMap),t===n)return!0;if("object"!=typeof t||null===t||"object"!=typeof n||null===n)return!1;if(r.has(t)&&r.get(t)===n)return!0;r.set(t,n);var o=Object.keys(t),i=Object.keys(n);if(o.length!==i.length)return!1;for(var a=0;a<o.length;a++){var c=o[a];if(!i.includes(c)||!e(t[c],n[c],r))return!1}return!0}(s,e.options)&&r.default.set_config(s)):(r.default.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),r.default.init(l,s)),u.current={apiKey:l,options:null!=s?s:{}}}},[c,l,JSON.stringify(s)]),o.createElement(i.Provider,{value:{client:d,bootstrap:null!==(t=null==s?void 0:s.bootstrap)&&void 0!==t?t:null===(n=null==c?void 0:c.config)||void 0===n?void 0:n.bootstrap}},a)}var c=function(e){return"function"==typeof e},l=function(){return(0,o.useContext)(i).client}
1,s=function(e,t){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var u={componentStack:null,exceptionEvent:null,error:null};!function(e){function t(t){var n=e.call(this,t)||this;return n.state=u,n}!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidCatch=function(e,t){var n,r=this.props.additionalProperties;c(r)?n=r(e):"object"==typeof r&&(n=r);var o=this.context.client.captureException(e,n),i=t.componentStack;this.setState({error:e,componentStack:null!=i?i:null,exceptionEvent:o})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.fallback,r=this.state;if(null==r.componentStack)return c(t)?t():t;var i=c(n)?o.createElement(n,{error:r.error,componentStack:r.componentStack,exceptionEvent:r.exceptionEvent}):n;return o.isValidElement(i)?i:(console.warn("[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."),o.createElement(o.Fragment,null))},t.contextType=i}(o.Component)},36619:function(e){e.exports={loading:"loading-dots_loading__aXlCN",
1spacer:"loading-dots_spacer__Aoffy",blink:"loading-dots_blink__nZciI"}}}]);

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.