"use strict";
(() => {
var exports = {};
exports.id = 8753;
exports.ids = [8753,7206];
exports.modules = {

/***/ 410960:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"src":"/_next/static/media/api-screenshot.23d5bf1c.png","height":1066,"width":1400,"blurDataURL":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAMAAADJ2y/JAAAAIVBMVEX6+fu9vb309PbFxcXs6+3m7tTy+9zNzc3o5+bo7OD1/Ogvy6txAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAK0lEQVQImU3KuREAIAwDMMdxHth/YM4dnQphRgRARO5aiJREGqeq+/6QBx4Q+QCjkG7tKQAAAABJRU5ErkJggg==","blurWidth":8,"blurHeight":6});

/***/ }),

/***/ 426590:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ Info)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(920997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(545725);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(807772);
/* harmony import */ var _cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(975867);
/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(428053);
/* harmony import */ var lib_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(774872);






const showcase = {
    width: "100%",
    boxShadow: "2px 2px 4px rgb(0 0 0 / 25%), 0 2px 4px rgb(0 0 0 / 22%)",
    borderRadius: "3px"
};
function Info(props) {
    const { anchor , icon , title , image , alt , video , caption , children , wide , swapCols , textStyleExtra ,  } = props;
    const head = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("h1", {
        id: anchor,
        style: {
            textAlign: "center",
            marginBottom: "20px",
            color: "#333"
        },
        children: [
            icon && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", {
                style: {
                    fontSize: "24pt",
                    marginRight: "5px"
                },
                children: [
                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_2__.Icon, {
                        name: icon
                    }),
                    " "
                ]
            }),
            title
        ]
    });
    let graphic = null;
    if (image != null) {
        graphic = /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_image__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
            style: showcase,
            src: image,
            alt: alt ?? caption
        });
    } else if (video != null) {
        const videoSrcs = typeof video == "string" ? [
            video
        ] : video;
        verifyHasMp4(videoSrcs);
        graphic = /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
            style: {
                position: "relative",
                width: "100%"
            },
            children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("video", {
                style: showcase,
                loop: true,
                controls: true,
                children: sources(videoSrcs)
            })
        });
    }
    if (graphic != null && caption != null) {
        graphic = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
            children: [
                graphic,
                /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {}),
                /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {}),
                /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                    style: {
                        textAlign: "center",
                        color: "#666",
                        fontSize: "13pt"
                    },
                    children: caption
                })
            ]
        });
    }
    if (!graphic) {
        const noGraphicTextStyle = {
            background: "#fafafa",
            padding: "20px",
            marginBottom: "15px"
        };
        if (textStyleExtra != null) {
            // if textColStyleExtra is given, then merge it into noGraphicTextStyle.
            Object.assign(noGraphicTextStyle, textStyleExtra);
        }
        return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
            style: {
                width: "100%"
            },
            children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                style: {
                    maxWidth: lib_config__WEBPACK_IMPORTED_MODULE_5__/* .MAX_WIDTH */ .d,
                    margin: "0 auto"
                },
                children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
                    style: noGraphicTextStyle,
                    children: [
                        /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                            style: {
                                textAlign: "center"
                            },
                            children: head
                        }),
                        /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                            style: {
                                margin: "auto",
                                maxWidth: wide ? "600px" : undefined
                            },
                            children: children
                        })
                    ]
                })
            })
        });
    }
    const textColStyle = {
        border: "1px solid white",
        borderRadius: "5px",
        padding: "0 20px 0 20px",
        marginBottom: "15px",
        display: "flex",
        justifyContent: "start",
        alignContent: "start",
        flexDirection: "column",
        fontSize: "12pt"
    };
    if (textStyleExtra != null) {
        // if textColStyleExtra is given, then merge it into textColStyle.
        Object.assign(textColStyle, textStyleExtra);
    }
    const textCol = /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(antd__WEBPACK_IMPORTED_MODULE_1__.Col, {
        lg: wide ? 7 : 9,
        style: textColStyle,
        children: children
    }, "text");
    const graphicCol = /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(antd__WEBPACK_IMPORTED_MODULE_1__.Col, {
        lg: wide ? 17 : 15,
        style: {
            padding: "0 30px",
            width: "100%"
        },
        children: graphic
    }, "graphics");
    const cols = swapCols ? [
        textCol,
        graphicCol
    ] : [
        graphicCol,
        textCol
    ];
    return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
        style: {
            padding: "60px 5%",
            background: "white",
            fontSize: "11pt"
        },
        children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
            children: [
                head,
                /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(antd__WEBPACK_IMPORTED_MODULE_1__.Row, {
                    children: cols
                })
            ]
        })
    });
};
function sources(video) {
    const v = [];
    for (const x of video){
        v.push(/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("source", {
            src: (0,_util__WEBPACK_IMPORTED_MODULE_3__/* .MediaURL */ .c)(x)
        }, x));
    }
    return v;
}
function verifyHasMp4(video) {
    for (const x of video){
        if (x.endsWith(".mp4")) {
            return;
        }
    }
    console.warn("include mp4 format for the video, so that it is viewable on iOS!!", video);
}
Info.Heading = ({ children , description , style  })=>{
    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
        style: {
            ...{
                textAlign: "center",
                margin: "40px"
            },
            ...style
        },
        children: [
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h1", {
                style: {
                    fontSize: "400%",
                    color: "#444"
                },
                children: children
            }),
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                style: {
                    fontSize: "13pt",
                    color: "#666"
                },
                children: description
            })
        ]
    });
};


/***/ }),

/***/ 774872:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "d": () => (/* binding */ MAX_WIDTH),
/* harmony export */   "r": () => (/* binding */ SHARE_MAX_WIDTH)
/* harmony export */ });
/*
Constants and other configuration that impact the overall
look of all of the pages.
*/ const MAX_WIDTH = "900px";
const SHARE_MAX_WIDTH = "1100px";


/***/ }),

/***/ 81108:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ API),
/* harmony export */   "getServerSideProps": () => (/* binding */ getServerSideProps)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(920997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(545725);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var components_landing_footer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(831910);
/* harmony import */ var components_landing_header__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(131498);
/* harmony import */ var components_landing_content__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(499270);
/* harmony import */ var lib_with_customize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(601880);
/* harmony import */ var lib_customize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(400054);
/* harmony import */ var components_landing_head__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(373306);
/* harmony import */ var components_landing_info__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(426590);
/* harmony import */ var components_misc_A__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(940981);
/* harmony import */ var public_features_api_screenshot_png__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(410960);











const title = "API";
function API({ customize  }) {
    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(lib_customize__WEBPACK_IMPORTED_MODULE_6__/* .Customize */ .l, {
        value: customize,
        children: [
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(components_landing_head__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
                title: title
            }),
            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_1__.Layout, {
                children: [
                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(components_landing_header__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
                        page: "features",
                        subPage: "api"
                    }),
                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_1__.Layout.Content, {
                        children: [
                            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                                style: {
                                    backgroundColor: "#c7d9f5"
                                },
                                children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(components_landing_content__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
                                    startup: "CoCalc",
                                    title: title,
                                    subtitle: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
                                        children: "Programmatically control CoCalc from your own server. Embed CoCalc within other products with a customized external look and feel."
                                    }),
                                    image: public_features_api_screenshot_png__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z,
                                    alt: "Using the API"
                                })
                            }),
                            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(components_landing_info__WEBPACK_IMPORTED_MODULE_8__/* ["default"].Heading */ .Z.Heading, {
                                description: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
                                    children: "The documentation explains what you can do with the CoCalc API."
                                }),
                                children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(components_misc_A__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z, {
                                    href: "https://doc.cocalc.com/api/",
                                    children: "CoCalc API Documentation"
                                })
                            })
                        ]
                    }),
                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(components_landing_footer__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {})
                ]
            })
        ]
    });
};
async function getServerSideProps(context) {
    return await (0,lib_with_customize__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)({
        context
    });
}


/***/ }),

/***/ 545725:
/***/ ((module) => {

module.exports = require("antd");

/***/ }),

/***/ 770640:
/***/ ((module) => {

module.exports = require("cookies");

/***/ }),

/***/ 65680:
/***/ ((module) => {

module.exports = require("lru-cache");

/***/ }),

/***/ 903280:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/app-router-context.js");

/***/ }),

/***/ 492796:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/head-manager-context.js");

/***/ }),

/***/ 294957:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/head.js");

/***/ }),

/***/ 703539:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js");

/***/ }),

/***/ 734014:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js");

/***/ }),

/***/ 450744:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/image-config-context.js");

/***/ }),

/***/ 435843:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/image-config.js");

/***/ }),

/***/ 278524:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/is-plain-object.js");

/***/ }),

/***/ 878020:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/mitt.js");

/***/ }),

/***/ 664406:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js");

/***/ }),

/***/ 424964:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router-context.js");

/***/ }),

/***/ 493431:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/add-locale.js");

/***/ }),

/***/ 611751:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js");

/***/ }),

/***/ 746220:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/compare-states.js");

/***/ }),

/***/ 110299:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js");

/***/ }),

/***/ 623938:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/format-url.js");

/***/ }),

/***/ 329565:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js");

/***/ }),

/***/ 735789:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js");

/***/ }),

/***/ 901428:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js");

/***/ }),

/***/ 528854:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/parse-path.js");

/***/ }),

/***/ 491292:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js");

/***/ }),

/***/ 734567:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js");

/***/ }),

/***/ 980979:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/querystring.js");

/***/ }),

/***/ 393297:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js");

/***/ }),

/***/ 836052:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js");

/***/ }),

/***/ 584226:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js");

/***/ }),

/***/ 95052:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/route-regex.js");

/***/ }),

/***/ 359232:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/utils.js");

/***/ }),

/***/ 40968:
/***/ ((module) => {

module.exports = require("next/head");

/***/ }),

/***/ 371853:
/***/ ((module) => {

module.exports = require("next/router");

/***/ }),

/***/ 616689:
/***/ ((module) => {

module.exports = require("react");

/***/ }),

/***/ 566405:
/***/ ((module) => {

module.exports = require("react-dom");

/***/ }),

/***/ 271704:
/***/ ((module) => {

module.exports = require("react-google-recaptcha-v3");

/***/ }),

/***/ 920997:
/***/ ((module) => {

module.exports = require("react/jsx-runtime");

/***/ }),

/***/ 439491:
/***/ ((module) => {

module.exports = require("assert");

/***/ }),

/***/ 714300:
/***/ ((module) => {

module.exports = require("buffer");

/***/ }),

/***/ 706113:
/***/ ((module) => {

module.exports = require("crypto");

/***/ }),

/***/ 809523:
/***/ ((module) => {

module.exports = require("dns");

/***/ }),

/***/ 582361:
/***/ ((module) => {

module.exports = require("events");

/***/ }),

/***/ 657147:
/***/ ((module) => {

module.exports = require("fs");

/***/ }),

/***/ 241808:
/***/ ((module) => {

module.exports = require("net");

/***/ }),

/***/ 822037:
/***/ ((module) => {

module.exports = require("os");

/***/ }),

/***/ 371017:
/***/ ((module) => {

module.exports = require("path");

/***/ }),

/***/ 677282:
/***/ ((module) => {

module.exports = require("process");

/***/ }),

/***/ 285477:
/***/ ((module) => {

module.exports = require("punycode");

/***/ }),

/***/ 12781:
/***/ ((module) => {

module.exports = require("stream");

/***/ }),

/***/ 371576:
/***/ ((module) => {

module.exports = require("string_decoder");

/***/ }),

/***/ 924404:
/***/ ((module) => {

module.exports = require("tls");

/***/ }),

/***/ 76224:
/***/ ((module) => {

module.exports = require("tty");

/***/ }),

/***/ 257310:
/***/ ((module) => {

module.exports = require("url");

/***/ }),

/***/ 473837:
/***/ ((module) => {

module.exports = require("util");

/***/ })

};
;

// load runtime
var __webpack_require__ = require("../../webpack-runtime.js");
__webpack_require__.C(exports);
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
var __webpack_exports__ = __webpack_require__.X(0, [6918,582,676,1746,1664,7545,3734,5373,6975,9715,9554,9066,981,5997,6202,7264,722,9924,5379,6087,6009,6952,5863,8572,4868,5123,3722,9270], () => (__webpack_exec__(81108)));
module.exports = __webpack_exports__;

})();