@cocalc/static
Version:
CoCalc's static frontend Webpack-based build system and framework
1 lines • 2.8 kB
JavaScript
;(self.webpackChunk_cocalc_static=self.webpackChunk_cocalc_static||[]).push([[4843,242],{74843:(t,e,n)=>{n.r(e),n.d(e,{Actions:()=>l});var o=n(5010),r=n(78193),i=n(12430),c=n(49169),a=n(30242);function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function u(t,e){return!e||"object"!==_(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}var _=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(_,t);var e,n,o=(e=_,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,o=s(e);if(n){var r=s(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return u(this,t)});function _(){var t;return f(this,_),(t=o.apply(this,arguments)).doctype="none",t}var l=_.prototype;return l._raw_default_frame_tree=function(){return{type:"pdfjs_canvas"}},l._init2=function(){this.is_public||this.reload("")},l.reload=function(t){var e,n=(new Date).valueOf();for(e in a.EDITOR_SPEC)this.set_reload(e,n)},l.print=function(){this.print_pdf()},l.print_pdf=function(){(0,r.kX)({src:(0,i.v)(this.project_id,this.path)})},l.zoom_page_width=function(t){this.setState({zoom_page_width:t})},l.zoom_page_height=function(t){this.setState({zoom_page_height:t})},l.scroll_pdf_into_view=function(t,e,n){this.setState({scroll_pdf_into_view:new c.ScrollIntoViewRecord({page:t,y:e,id:n})})},_}(o.e)},30242:(t,e,n)=>{n.r(e),n.d(e,{EDITOR_SPEC:()=>s,Editor:()=>u});var o=n(24620),r=n(28459),i=n(47975),c=n(10552),a=n(67941),f=(0,o.set)(["reload","print","download","decrease_font_size","increase_font_size","zoom_page_width","zoom_page_height","set_zoom"]),s={pdfjs_canvas:{short:"PDF.js",name:"PDF.js",icon:"file-pdf",component:i.a,buttons:f,style:{background:"#525659"},renderer:"canvas"}};a.IS_IPAD||a.IS_IOS||(s.pdf_embed={short:"PDF (native)",name:"PDF - Native",icon:"file-pdf",buttons:(0,o.set)(["reload","print","download"]),component:c.X});var u=(0,r.J)({format_bar:!1,editor_spec:s,display_name:"PDFEditor"})}}]);