forked from bombastictranz/builder.io
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path[...doc]-a4e3812cb637ee836ec7.js.download
1 lines (1 loc) · 14.8 KB
/
[...doc]-a4e3812cb637ee836ec7.js.download
1
_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[35],{"1OyB":function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},"20a2":function(e,t,n){e.exports=n("nOHt")},"HaE+":function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var a=e[c](i),s=a.value}catch(l){return void n(l)}a.done?t(s):Promise.resolve(s).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var i=e.apply(t,n);function a(e){r(i,o,c,a,s,"next",e)}function s(e){r(i,o,c,a,s,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},Ji7U:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return o}))},QIrW:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/c/docs/[...doc]",function(){return n("oSDi")}])},R0Im:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n("AeFk"),o=n("FdF9"),c=n("DzJC"),i=n.n(c),a=n("a8ZA");var s={name:"14idz41",styles:"font-size:16px;margin-bottom:8px"},l={name:"17b92ml",styles:"font-size:14px;margin-bottom:8px"},u={name:"j9sfhy",styles:"padding:8px 12px;margin-top:8px;background:#000000;color:#ffffff;border-radius:8px;border-style:none;font-size:16px;width:100%;display:inline-block"};function d(){var e=Object(o.useState)(!1),t=e[0],n=e[1];Object(o.useEffect)((function(){var e=i()((function(){window.pageYOffset>900&&(n(!0),removeEventListener("scroll",e))}),500,{leading:!1,trailing:!0});return addEventListener("scroll",e),function(){return removeEventListener("scroll",e)}}),[]);var c="cubic-bezier(.37,.01,0,.98)";return Object(r.c)("div",{className:"card",css:Object(r.b)({opacity:t?1:0,pointerEvents:t?"auto":"none",transform:t?"translateY(0)":"translateY(15px)",transition:"0.5s opacity ".concat(c,", 0.5s transform ").concat(c),border:"1px solid rgba(0,0,0,0.1)",borderRadius:8,padding:16},"","")},Object(r.c)("p",{css:s},"What can we improve?"),Object(r.c)("p",{css:l},"Your feedback helps us improve our documentation."),Object(r.c)(a.a,{css:u,onClick:function(){window.open("https://forms.gle/cxnrZ5K7ADiCDYfV7?entry.659826625=".concat(window.location.pathname),"_blank")}},"Give feedback"))}},USKV:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));var r="Builder.io: Drag & Drop Headless CMS",o="Drag and drop with your components, right within your existing site or app. Build and optimize digital experiences for any tech stack, visually."},foSv:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},md7G:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("U8pU"),o=n("JX7q");function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!==typeof t?Object(o.a)(e):t}},oSDi:function(e,t,n){"use strict";n.r(t),n.d(t,"__N_SSG",(function(){return te}));var r=n("1OyB"),o=n("vuIU"),c=n("JX7q"),i=n("Ji7U"),a=n("md7G"),s=n("foSv"),l=n("rePB"),u=n("AeFk"),d=n("ytZV"),f=n("20a2"),p=n.n(f),b=n("FdF9"),m=n("o0o1"),v=n.n(m),O=n("HaE+"),h=n("csfp"),y=n("PsDL"),j=n("a8ZA");function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(e){var t=d.Builder.isBrowser?Promise.all([n.e(12),n.e(11),n.e(13)]).then(n.bind(null,"8REp")):null;return Object(u.c)(y.a,{className:"emoji-button dark-mode-invert",css:Object(u.b)({"&.emoji-button":w(w({color:"black",fontSize:45,transform:"scale(0.8)",transition:"transform 0.2s ease-in-out, grayscale 0.2s ease-in-out","&:hover":{transform:"scale(1)"}},!1===e.selected&&{filter:"grayscale(100%)"}),!0===e.selected&&{transform:"scale(1)"})},"",""),onClick:Object(O.a)(v.a.mark((function n(){var r,o;return v.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null===(r=e.onClick)||void 0===r||r.call(e),n.next=3,t;case 3:o=n.sent,(0,o.track)("docsCsatResponse",{answer:e.type});case 6:case"end":return n.stop()}}),n)})))},e.children)},k={name:"1w404cr",styles:"padding:20px;display:flex;flex-direction:column;align-items:center"},S={name:"1fttcpj",styles:"display:flex;flex-direction:column"},E={name:"18ko2av",styles:"text-align:center;font-size:18px"},P={name:"pw2nvm",styles:"text-align:center;font-size:14px;opacity:0.8;margin-top:10px"},C={name:"kx7lqm",styles:"padding:8px 12px;margin:16px auto;background:#000000;color:#ffffff;border-radius:8px;font-size:16px"},D={name:"1c97d2e",styles:"text-align:center;font-size:18px;opacity:0.8"},_={name:"zjik7",styles:"display:flex"};function B(e){var t=Object(b.useState)(null),n=t[0],r=t[1];return Object(u.c)("div",{css:k,className:e.className},n?Object(u.c)("div",{css:S},Object(u.c)("div",{css:E},"Thank you for your input"),Object(u.c)("div",{css:P},"Have additional feedback? We read every reply and use it to improve our docs."),Object(u.c)(j.a,{css:C,onClick:function(){window.open("https://forms.gle/cxnrZ5K7ADiCDYfV7?entry.659826625=".concat(window.location.pathname),"_blank")}},"Give feedback")):Object(u.c)(b.default.Fragment,null,Object(u.c)("div",{css:D},"Was this article helpful?"),Object(u.c)("div",{css:_},Object(u.c)(h.a,{title:"Not helpful"},Object(u.c)("div",null,Object(u.c)(x,{selected:n?"negative"===n:void 0,onClick:function(){return r("negative")},type:"negative"},"\ud83d\ude1e"))),Object(u.c)(h.a,{title:"Helpful"},Object(u.c)("div",null,Object(u.c)(x,{selected:n?"positive"===n:void 0,onClick:function(){return r("positive")},type:"positive"},"\ud83d\ude03"))))))}var R=n("GRtX"),N=n("USKV"),A=n("9ixD"),L=n("vWJ7"),z=n("O/lF"),W=n("R0Im"),I=n("soLX"),F=n("RMBO"),G=n("CjGf"),T=n("/uEC");function q(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(a.a)(this,n)}}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}d.builder.init("YJIGb4i01jvw0SRdL5Bt"),d.builder.apiVersion=G.a,Object(F.a)();var V="@media (max-width: ".concat(800,"px)");function X(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],r=e;for(t&&n.push(r);r.parentElement;)n.unshift(r.parentElement),r=r.parentElement;return n}var K={name:"2qwb9g",styles:"width:100vw;margin-left:calc(50% - 50vw)"},Z={name:"lutbjm",styles:"margin-top:50px"},M={name:"iqoq9n",styles:"margin-top:20px"},Q={name:"iqoq9n",styles:"margin-top:20px"},$={name:"122blhx",styles:"color:steelblue"},ee={name:"u0v7r2",styles:"max-width:1200px;width:100%;margin:40px auto 0"};var te=!0,ne=(t.default=function(e){var t,n,r,o,c,i=e.docsContent,a=e.docsNav,s=e.docsHeader,m=e.footer,v=b.default.createRef();Object(b.useEffect)((function(){var e=function(){return ie()};return p.a.events.on("routeChangeComplete",e),function(){p.a.events.off("routeChangeComplete",e)}}),[]);var O=Object(b.useCallback)((function(e){var t=e.target;if(t instanceof Element){var n,r=U(X(t,!0));try{for(r.s();!(n=r.n()).done;){var o=n.value.nextElementSibling;if(null!==o&&void 0!==o&&o.classList.contains("collapsable")){o.classList.toggle("collapsed");break}}}catch(c){r.e(c)}finally{r.f()}}}),[]),h=Object(f.useRouter)(),y=i&&i.data.pageTitle?"".concat(i.data.pageTitle," - Builder.io"):N.b,j=h.asPath.split("?")[0];return d.Builder.isBrowser&&!d.Builder.isEditing&&Object(T.a)(i,j),Object(u.c)("div",{css:Object(u.b)(Object(l.a)({display:"flex",flexDirection:"column",fontSize:16,padding:"0 20px"},V,{padding:0}),"","")},Object(u.c)(L.a,null),Object(u.c)(A.c,{title:y,noindex:!i||(null===i||void 0===i||null===(t=i.data)||void 0===t?void 0:t.addNoIndex),nofollow:!i,description:i&&(i.data.pageDescription||i.data.description)||N.a,canonical:"https://www.builder.io".concat(j),openGraph:{type:"website",locale:"en_US",url:"https://www.builder.io".concat(j),title:y,description:i&&(i.data.pageDescription||i.data.description)||N.a,site_name:"Builder.io",images:null!==i&&void 0!==i&&null!==(n=i.data)&&void 0!==n&&n.image?[{url:"".concat(i.data.image,"?width=1200"),width:1200,height:630,alt:y}]:[]}}),Object(u.c)("header",{css:K},Object(u.c)(d.BuilderComponent,{renderLink:R.b,name:"docs-header",content:s})),Object(u.c)("div",{css:Object(u.b)({display:"flex",flexGrow:1,alignItems:"stretch",margin:"0 auto",maxWidth:1400,width:"100%",position:"relative"},"","")},Object(u.c)(z.a,null),Object(u.c)("div",{css:Object(u.b)(Object(l.a)({display:"flex",flexGrow:1,alignSelf:"stretch",maxWidth:"100%"},V,{flexDirection:"column-reverse"}),"","")},!0===(null===i||void 0===i?void 0:i.data.hideNav)?null:Object(u.c)("nav",{className:"docs-nav-scroll-container",css:Object(u.b)(Object(l.a)({width:280,flexShrink:0,position:"sticky",alignSelf:"flex-start",top:100,zIndex:10,overflowY:"auto",maxHeight:"calc(100vh - 180px)"},V,{overflowY:"visible",width:"auto",padding:20,maxHeight:"none",margin:"auto"}),"",""),onClick:O},Object(u.c)(re,{contentRef:v},Object(u.c)(d.BuilderComponent,{stopClickPropagationWhenEditing:!0,renderLink:R.b,name:"docs-nav",content:a}))),Object(u.c)("main",{className:"docs-content-container",css:Object(u.b)((r={minWidth:0,padding:"30px 50px 50px 50px",flexGrow:1,borderRadius:0},Object(l.a)(r,V,{padding:20,margin:"10px 0"}),Object(l.a)(r,"& .builder-text",{lineHeight:"1.5em"}),r),"",""),ref:v},i||d.Builder.isEditing||d.Builder.isPreviewing?Object(u.c)(b.default.Fragment,null,Object(u.c)("div",{className:"docs-builder-container"},Object(u.c)(d.BuilderComponent,{renderLink:R.b,key:null===i||void 0===i?void 0:i.id,name:"docs-content",content:i})),Object(u.c)(B,{key:h.asPath,css:Z})):Object(u.c)(b.default.Fragment,null,Object(u.c)("h3",{css:M},"Doc not found!"),Object(u.c)("p",{css:Q},"Try choosing another doc from the nav bar or"," ",Object(u.c)("a",{css:$,href:"/c/docs/intro"},"go to our docs homepage")))),Object(u.c)("aside",{className:"docs-sidebar",css:Object(u.b)(J(Object(l.a)({width:280,flexShrink:0,position:"sticky",top:200,alignSelf:"flex-start",textAlign:"center"},"@media (max-width: 1300px)",{display:"none"}),(null===i||void 0===i||null===(o=i.data)||void 0===o?void 0:o.hideFeedbackColumn)&&(c={},Object(l.a)(c,"@media (max-width: 2000px)",{display:"none"}),Object(l.a)(c,"position","fixed"),Object(l.a)(c,"top",250),Object(l.a)(c,"left","calc(50% + ".concat(700,"px)")),c)),"","")},Object(u.c)(I.default,{containerName:"docs-builder-container",verticalBreakpoint:V}),Object(u.c)(W.a,null)))),Object(u.c)("div",{css:ee},Object(u.c)(d.BuilderComponent,{name:"symbol",content:m})))},function(){return d.Builder.isBrowser&&(d.Builder.isEditing||!!document.querySelector(".docs-nav-menu"))}),re=function(e){Object(i.a)(n,e);var t=q(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),Object(l.a)(Object(c.a)(e),"containerRef",b.default.createRef()),e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var e=this;ne()||(setTimeout((function(){ie()})),this.containerRef.current.addEventListener("click",(function(t){if(t.target instanceof Element){var n=t.target.closest("a");!t.metaKey&&n&&n.pathname.startsWith("/c/docs")&&"_blank"!==n.target&&(ie(n.pathname),t.preventDefault(),t.stopPropagation(),p.a.push(n.pathname).then((function(){e.props.contentRef&&e.props.contentRef.current&&(e.props.contentRef.current.scrollTop=0),window.scrollTo(0,0)})))}})))}},{key:"render",value:function(){return Object(u.c)("div",{ref:this.containerRef},this.props.children)}}]),n}(b.default.Component),oe="active-link",ce="docs-nav";function ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:location.pathname;if(!ne()){var t='a[href="'.concat(e,'"],a[href="https://www.builder.io').concat(e,'"],a[href="https://builder.io').concat(e,'"]'),n='[builder-model="'.concat(ce,'"] .').concat(oe),r=document.querySelector(t);if(r){r.classList.add(oe);var o,c=U(X(r));try{for(c.s();!(o=c.n()).done;){var i=o.value;i.classList.contains("collapsed")&&i.classList.remove("collapsed")}}catch(s){c.e(s)}finally{c.f()}window.innerWidth>=800&&!d.Builder.isEditing&&r.scrollIntoView({behavior:"smooth",block:"center"})}var a=document.querySelectorAll(n);a.forEach((function(e){e&&e!==r&&e.classList.remove(oe)}))}}},vWJ7:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("AeFk");function o(e){var t=e.maxWidth,n=void 0===t?1380:t;return Object(r.c)("style",null,"\n .header-container {\n max-width: ".concat(n,"px !important;\n }\n "))}}},[["QIrW",1,3,15,0,2,4,5,6,7,8,9,10,22,18]]]);