PageSourceSearch

https://entitree.com/_next/static/chunks/pages/factgrid-2425f09726e88fdc.js

js entitree.com collected 2026-10-02 10:04:14 UTC 15,105 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[467],{7276:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/factgrid",function(){return t(7439)}])},3940:function(e,n,t){"use strict";t.d(n,{T3:function(){return c},VY:function(){return d},or:function(){return u}});var r=t(7297),i=t(6409),o=t(9521);function a(){let e=(0,r.Z)(["\n  display: flex;\n  flex-direction: column;\n"]);return a=function(){return e},e}function s(){let e=(0,r.Z)(["\n  flex-grow: 1;\n  position: relative;\n"]);return s=function(){return e},e}function l(){let e=(0,r.Z)(["\n  max-width: 680px;\n  margin: 0 auto;\n"]);return l=function(){return e},e}let c=(0,o.ZP)(i.ZP)(a()),u=o.ZP.main(s()),d=o.ZP.div(l())},815:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(7297),i=t(5893),o=t(682),a=t(1328),s=t(2318),l=t(9499),c=t(1162),u=t(3489),d=t(7294),p=t(1189),f=t(9583),h=t(6968),g=t(5005),m=t(5464),v=t(6197),w=t(9521),x=t(2485),b=t(5617),y=function(e,n){(0,d.useEffect)(()=>{let t=t=>{let r=null==e?void 0:e.current;!r||r.contains(t.target)||n(t)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,n])},Z=t(1163);function E(){let e=(0,r.Z)(["\n  position: absolute;\n  top: 50px;\n  width: 100%;\n  background-color: #f8f9fa;\n  .searchingMessage {\n    padding: 0.375rem 0.75rem;\n    color: grey;\n    .spinner-border {\n      width: 1.2em;\n      height: 1.2em;\n      margin-right: 10px;\n    }\n  }\n  .searchResultBtn {\n    width: 100%;\n    text-align: left;\n    line-height: 1.2;\n    b {\n      display: block;\n      white-space: nowrap;\n      overflow: hidden;\n      text-overflow: ellipsis;\n    }\n    i {\n      display: block;\n      color: gray;\n      text-decoration: gray;\n      white-space: nowrap;\n      overflow: hidden;\n      text-overflow: ellipsis;\n    }\n  }\n"]);return E=function(){return e},e}function j(e){let{loadingSuggestions:n,searchResults:t,setShowSuggestions:r}=e,o=(0,d.useRef)(null),a=(0,b.I0)();y(o,()=>r(!1));let s=(0,Z.useRouter)(),{currentProp:l}=(0,x.CG)(e=>{let{tree:n}=e;return n}),{languageCode:c,dataSource:u}=(0,x.CG)(e=>{let{settings:n}=e;return n}),f=async e=>{r(!1),a((0,v.mc)());let n="";switch(u){case"factgrid":n=(0,m.z)(c,(null==l?void 0:l.slug)||"",u,e.id);break;case"geni":n=(0,m.z)("en","family_tree",u,e.id);break;default:{let t=await (0,p.getEntityWikipediaSlug)(e.id,c,u);n=(0,m.z)(c,(null==l?void 0:l.slug)||"",u,e.id,t)}}if(!n)throw Error("targetUrl is empty");s.push(n)};return(0,i.jsxs)(P,{ref:o,className:"dropdown-menu show d-relative",children:[n&&(0,i.jsxs)("div",{className:"searchingMessage",children:[(0,i.jsx)(h.Z,{animation:"border",variant:"secondary"})," Searching"]}),!n&&!t.length&&(0,i.jsx)("div",{className:"searchingMessage",children:"Sorry, no results found"}),t.map(e=>(0,i.jsxs)(g.Z,{className:"searchResultBtn",variant:"light",onClick:()=>f(e),children:[(0,i.jsx)("b",{children:e.title}
1),e.subtitle&&(0,i.jsx)("i",{children:e.subtitle})]},e.id))]})}let P=w.ZP.div(E());var C=t(2857),N=t(1098),k=t(9871),S=t(2082);function _(){let e=(0,r.Z)(["\n  flex: 0 0 ","px;\n  background-color: #eee;\n  @media print {\n    display: none;\n  }\n  .container {\n    height: 100%;\n  }\n  .searchBox {\n    position: relative;\n    color: #212529;\n    margin: 0;\n    display: flex;\n    align-items: center;\n    height: 100%;\n\n    .input-group {\n      position: relative;\n      .input-group-prepend {\n        position: absolute;\n        z-index: 5;\n        top: 11px;\n        left: 10px;\n        color: var(--gray);\n      }\n    }\n\n    #searchBox {\n      border-top-left-radius: 0.25rem;\n      border-bottom-left-radius: 0.25rem;\n      padding-left: 32px;\n    }\n\n    .shouldSelectProp {\n      //border-color: green;\n      //background-color: #ffc107;\n      font-style: italic;\n    }\n  }\n  .dropdown-toggle {\n    border: 1px solid #ced4da;\n    border-radius: 0 0.25rem 0.25rem 0;\n    width: 100%;\n  }\n  .dropdown-menu {\n    max-height: 60vh;\n    overflow-y: auto;\n    .fav {\n      font-weight: bold;\n    }\n  }\n  .submitButton {\n    margin-bottom: 1rem;\n    width: 100%;\n  }\n"]);return _=function(){return e},e}function O(){let{currentEntity:e,currentProp:n,loadingEntity:t,currentEntityProps:r}=(0,x.CG)(e=>{let{tree:n}=e;return n}),{dataSource:h}=(0,x.CG)(e=>{let{settings:n}=e;return n}),g=(0,k.b)(),w=(0,Z.useRouter)(),y=(0,b.I0)(),[E,P]=(0,d.useState)(""),[_,O]=(0,d.useState)(!1),[z,L]=(0,d.useState)([]),[G,D]=(0,d.useState)(!1),[B,T]=(0,d.useState)(!0),I=(0,S.Z)(E,500);(0,d.useEffect)(()=>{(async()=>{if(I&&B&&g){D(!0),O(!0);try{if("wikidata"===h||"factgrid"===h){let n=await (0,p.wikibaseSearchEntities)(I,g.code,(0,p.getWikibaseURL)(h)),t=n.filter(n=>{let{id:t,description:r}=n;return(null==e?void 0:e.id)!==t&&(null==g?void 0:g.disambPageDesc)!==r});L(t),L(t.map(e=>({id:e.id,title:e.label,subtitle:e.description})))}if("geni"===h){let e=await (0,N.gk)(I);L(e.map(e=>{var n,t;return{id:"G"+e.guid,title:e.name,subtitle:null===(n=e.birth)||void 0===n?void 0:null===(t=n.date)||void 0===t?void 0:t.formatted_date}}))}}catch(e){(0,C.P)(e)}finally{O(!1)}}else O(!1),D(!1)})()},[I]),(0,d.useEffect)(()=>{e&&(T(!1),P(e.label||""))},[e]);let U=(0,d.useRef)(null);return(0,i.jsx)(R,{className:"SearchBar",onSubmit:e=>{e.preventDefault(),D(!0)},children:(0,i.jsx)(o.Z,{children:(0,i.jsxs)(a.Z.Group,{className:"searchBox",controlId:"searchBox",children:[(0,i.jsxs)(s.Z,{children:[(0,i.jsx)(s.Z.Prepend,{children:(0,i.jsx)(f.U41,{})}),(0,i.jsx)(a.Z.Control,{onKeyDown:()=>T(!0),onChange:e=>{P(e.target.value)},value:t?"Loading entity...":E,type:"search",readOnly:!!t,placeholder:"Start typing to search...",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false"}),e&&(0,i.jsx)(s.Z.Append,{children:(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(c.Z,{placement:"bottom",show:!1,target:U.current,children:(0,i.jsx)(u.Z,{id:"select-prop",children:"Select a property to show a tree"})}),!!(null==r?void 0:r.length)&&(0,i.jsx)(l.Z.Toggle,{variant:"none",ref:U,id:"dropdown-props",className:e&&!n?"shouldSelectProp btn-warning":void 0,children:n?n.overrideLabel||n.label:"Choose a property "}),(0,i.jsx)(l.Z.Menu,{alignRight:!0,children:null==r?void 0:r.map(n=>(0,i.jsx)(l.Z.Item,{className:n.isFav?"fav":"",onClick:()=>{y((0,v.eb)(!0));let t=(0,m.z)(g.code,n.slug,h,e.id,e.wikipediaSlug);w.push(t)},children:n.overrideLabel||n.label},n.id))})]})})]}),G&&(0,i.jsx)(j,{loadingSuggestions:_,searchResults:z,setShowSuggestions:D})]})})})}let R=(0,w.ZP)(a.Z)(_(),e=>{let{theme:n}=e;return n.searchBarHeight})},7063:function(e,n,t){"use strict";t.d(n,{D:function(){return a}});var r=t(7297),i=t(9521);function o(){let e=(0,r.Z)(["\n  font-weight: 200;\n  margin-bottom: 20px;\n  margin-top: 15px;\n"]);return o=function(){return e},e}let a=i.ZP.h1(o())},9536:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(7297),i=t(5893),o=t(9421);t(7294);var a=t(9521);function s(){let e=(0,r.Z)(["\n  position: relative;\n  height: 100%;\n  flex: 1;\n  font-size: 18px;\n  svg {\n    stroke-dasharray: 170 110;\n    animation: dash 8s linear infinite alternate;\n  }\n  @keyframes dash {\n    to {\n      stroke-dashoffset: 1000;\n    }\n  }\n  .center {\n    text-align: center;\n    top: 50%;\n    left: 50%;\n    position: absolute;\n    color: lightgray;\n    transform: translate(-50%, -50%);\n    svg,\n    .spinner-grow {\n      font-size: 10em;\n      margin-bottom: 10px;\n    }\n  }\n"]);return s=function(){return e},e}function l(){return(0,i.jsx)(c,{children:(0,i.jsxs)("div",{className:"center",children:[(0,i.jsx)(o.Z,{height:".5em"}),(0,i.jsx)("div",{children:"Loading tree"})]})})}let c=a.ZP.div(s())},7439:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return g}});var r=t(5893),i=t(3940),o=t(7294),a=t(682),s=t(1177),l=t(9694),c=t(815),u=t(7063),d=t(9536),p=t(2926),f=t(2485),h=t(5617);function g(){let e=(0,h.I0)();(0,o.useEffect)(()=>{e((0,p.Lt)({dataSource:"factgrid"}))},[]);let{loadingEntity:n}=(0,f.CG)(e=>{let{tree:n}=e;return n});return(0,r.jsxs)(i.T3,{children:[(0,r.jsx)(l.Z,{}),(0,r.jsx)(c.Z,{}),(0,r.jsx)(i.or,{children:n?(0,r.jsx)(d.Z,{}):(0,r.jsx)(a.Z,{children:(0,r.jsxs)(i.VY,{children:[(0,r.jsx)(u.D,{children:"EntiTree for FactGrid"}),(0,r.jsx)("p",{children:"Visualize connected FactGrid items on a dynamic, navigable tree diagram. Discover properties of People, Organizations and Events with a direct link to Wikipedia Aticles."}),(0,r.jsx)("img",{src:"/icons/factgrid.png",style:{width:"300px"},alt:"FactGrid Logo"})," "]})})}),(0,r.jsx)(s.Z,{})]})}},1098:function(e,n,t){"use strict";t.d(n,{Yi:function(){return l},gk:function(){return s},zx:function(){return c}});var r=t(9669),i=t.n(r),o=t(6607);let a=i().create({baseURL:"/api"});a.interceptors.response.use(o.Z);let s=e=>a.get("/searchGeniEndpoint",{params:{term:e}}),l=e=>a.get("/getGeniProfilesEndpoint",{params:{guids:e.map(e=>e.substring(1)).join(",")}}),c=e=>a.get("/getGeniImmediateFamilyEndpoint",{params:{guids:e.map(e=>e.substring(1)).join(",")}})},1162:function(e,n,t){"use strict";t.d(n,{Z:function(){return j}});var r=t(7462),i=t(3366),o=t(7294),a=t(3967),s=t.n(a),l=t(5697),c=t.n(l),u=t
1(3935),d=t(3298);let p=e=>e&&"function"!=typeof e?n=>{e.current=n}:e;var f=t(7701),h=t(8137),g=t(6453),m=t(3446),v=t(2343),w=o.forwardRef(function(e,n){var t=e.flip,a=e.offset,s=e.placement,l=e.containerPadding,c=e.popperConfig,f=e.transition,w=(0,d.Z)(),x=w[0],b=w[1],y=(0,d.Z)(),Z=y[0],E=y[1],j=(0,o.useMemo)(()=>(function(e,n){let t=p(e),r=p(n);return e=>{t&&t(e),r&&r(e)}})(b,n),[b,n]),P=(0,m.Z)(e.container),C=(0,m.Z)(e.target),N=(0,o.useState)(!e.show),k=N[0],S=N[1],_=(0,h.Z)(C,x,(0,v.ZP)({placement:s,enableEvents:!!e.show,containerPadding:(void 0===l?5:l)||5,flip:t,offset:a,arrowElement:Z,popperConfig:void 0===c?{}:c})),O=_.styles,R=_.attributes,z=(0,i.Z)(_,["styles","attributes"]);e.show?k&&S(!1):e.transition||k||S(!0);var L=e.show||f&&!k;if((0,g.Z)(x,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!L)return null;var G=e.children((0,r.Z)({},z,{show:!!e.show,props:(0,r.Z)({},R.popper,{style:O.popper,ref:j}),arrowProps:(0,r.Z)({},R.arrow,{style:O.arrow,ref:E})}));if(f){var D=e.onExit,B=e.onExiting,T=e.onEnter,I=e.onEntering,U=e.onEntered;G=o.createElement(f,{in:e.show,appear:!0,onExit:D,onExiting:B,onExited:function(){S(!0),e.onExited&&e.onExited.apply(e,arguments)},onEnter:T,onEntering:I,onEntered:U},G)}return P?u.createPortal(G,P):null});w.displayName="Overlay",w.propTypes={show:c().bool,placement:c().oneOf(f.Ct),target:c().any,container:c().any,flip:c().bool,children:c().func.isRequired,containerPadding:c().number,popperConfig:c().object,rootClose:c().bool,rootCloseEvent:c().oneOf(["click","mousedown"]),rootCloseDisabled:c().bool,onHide:function(e){for(var n,t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return e.rootClose?(n=c().func).isRequired.apply(n,[e].concat(r)):c().func.apply(c(),[e].concat(r))},transition:c().elementType,onEnter:c().func,onEntering:c().func,onEntered:c().func,onExit:c().func,onExiting:c().func,onExited:c().func};var x=t(6390),b=t(3509),y=t(1068),Z={transition:y.Z,rootClose:!1,show:!1,placement:"top"};function E(e){var n=e.children,t=e.transition,a=e.popperConfig,l=void 0===a?{}:a,c=(0,i.Z)(e,["children","transition","popperConfig"]),u=(0,o.useRef)({}),d=(0,b.Z)(),p=d[0],f=d[1],h=!0===t?y.Z:t||null;return o.createElement(w,(0,r.Z)({},c,{ref:p,popperConfig:(0,r.Z)({},l,{modifiers:f.concat(l.modifiers||[])}),transition:h}),function(e){var a,l,c,d,p,f=e.props,h=e.arrowProps,g=e.show,m=e.update,v=(e.forceUpdate,e.placement),w=e.state,b=(0,i.Z)(e,["props","arrowProps","show","update","forceUpdate","placement","state"]);a=f,l=h,c=a.ref,d=l.ref,a.ref=c.__wrapped||(c.__wrapped=function(e){return c((0,x.Z)(e))}),l.ref=d.__wrapped||(d.__wrapped=function(e){return d((0,x.Z)(e))});var y=Object.assign(u.current,{state:w,scheduleUpdate:m,placement:v,outOfBoundaries:(null==w?void 0:null==(p=w.modifiersData.hide)?void 0:p.isReferenceHidden)||!1});return"function"==typeof n?n((0,r.Z)({},b,f,{placement:v,show:g},!t&&g&&{className:"show"},{popper:y,arrowProps:h})):o.cloneElement(n,(0,r.Z)({},b,f,{placement:v,arrowProps:h,popper:y,className:s()(n.props.className,!t&&g&&"show"),style:(0,r.Z)({},n.props.style,f.style)}))})}E.defaultProps=Z;var j=E},6968:function(e,n,t){"use strict";var r=t(7462),i=t(3366),o=t(3967),a=t.n(o),s=t(7294),l=t(6792),c=s.forwardRef(function(e,n){var t=e.bsPrefix,o=e.variant,c=e.animation,u=e.size,d=e.children,p=e.as,f=e.className,h=(0,i.Z)(e,["bsPrefix","variant","animation","size","children","as","className"]),g=(t=(0,l.vE)(t,"spinner"))+"-"+c;return s.createElement(void 0===p?"div":p,(0,r.Z)({ref:n},h,{className:a()(f,g,u&&g+"-"+u,o&&"text-"+o)}),d)});c.displayName="Spinner",n.Z=c},3489:function(e,n,t){"use strict";var r=t(7462),i=t(3366),o=t(3967),a=t.n(o),s=t(7294);t(5638);var l=t(6792),c=s.forwardRef(function(e,n){var t=e.bsPrefix,o=e.placement,c=e.className,u=e.style,d=e.children,p=e.arrowProps,f=(e.popper,e.show,(0,i.Z)(e,["bsPrefix","placement","className","style","children","arrowProps","popper","show"]));t=(0,l.vE)(t,"tooltip");var h=((null==o?void 0:o.split("-"))||[])[0];return s.createElement("div",(0,r.Z)({ref:n,style:u,role:"tooltip","x-placement":h,className:a()(c,t,"bs-tooltip-"+h)},f),s.createElement("div",(0,r.Z)({className:"arrow"},p)),s.createElement("div",{className:t+"-inner"},d))});c.defaultProps={placement:"right"},c.displayName="Tooltip",n.Z=c},6409:function(e,n,t){"use strict";t.d(n,{g:function(){return l}});var r=t(7294),i=function(){return(i=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)},o=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>n.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t},a=!1,s=(0,r.forwardRef)(function(e,n){var t=e.style,s=o(e,["style"]),c=l();!a&&(null==t?void 0:t.height)&&(a=!0,console.warn("<Div100vh /> overrides the height property of the style prop"));var u=i(i({},t),{height:c?c+"px":"100vh"});return r.createElement("div",i({ref:n,style:u},s))});function l(){var e,n,t,i=(0,r.useState)(c),o=i[0],a=i[1],s=(n=(e=(0,r.useState)(!1))[0],t=e[1],(0,r.useEffect)(function(){u()&&t(!0)},[]),n);return(0,r.useEffect)(function(){if(s)return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)};function e(){a(c())}},[s]),s?o:null}function c(){return u()?window.innerHeight:null}function u(){return"undefined"!=typeof window&&"undefined"!=typeof document}s.displayName="Div100vh",n.ZP=s}},function(e){e.O(0,[445,688,928,774,888,179],function(){return e(e.s=7276)}),_N_E=e.O()}]);

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.