Im weltweit umfassendsten Index für Volltextbücher suchen

Meine Mediathek

VerlagInfoDatenschutzerklärungNutzungsbedingungenHilfe
",{justification:"Never attached to DOM."});return goog.dom.safe.parseFromStringHtml(new DOMParser,a).body.children[0]}; goog.html.sanitizer.CssSanitizer.sanitizeInlineStyle=function(a,b){if(!a)return module$contents$goog$html$SafeStyle_SafeStyle.EMPTY;var c=document.createElement("div").style,d=goog.html.sanitizer.CssSanitizer.getCssPropNames_(a);d.forEach(function(e){var f=goog.html.sanitizer.CssSanitizer.withoutVendorPrefix_(e);goog.html.sanitizer.CssSanitizer.isDisallowedPropertyName_(f)||(e=module$contents$goog$html$sanitizer$noclobber_getCssPropertyValue(a,e),e=goog.html.sanitizer.CssPropertySanitizer.sanitizeProperty(f, e,b),null!=e&&module$contents$goog$html$sanitizer$noclobber_setCssProperty(c,f,e))});return module$contents$google3$third_party$javascript$safevalues$restricted$reviewed_styleSafeByReview(c.cssText||"",{justification:"Output of CSS sanitizer"})}; goog.html.sanitizer.CssSanitizer.sanitizeInlineStyleString=function(a,b){if(goog.userAgent.IE&&10>document.documentMode)return module$contents$goog$html$SafeStyle_SafeStyle.EMPTY;var c=module$contents$goog$html$sanitizer$inertDocument_createInertDocument().createElement("DIV");c.style.cssText=a;return goog.html.sanitizer.CssSanitizer.sanitizeInlineStyle(c.style,b)}; goog.html.sanitizer.CssSanitizer.inlineStyleRules=function(a){var b=module$contents$goog$html$sanitizer$noclobber_getElementsByTagName(a,"STYLE"),c=module$contents$goog$array_concatMap(b,function(g){return module$contents$goog$array_toArray(module$contents$goog$html$sanitizer$noclobber_getElementStyleSheet(g).cssRules)});c=goog.html.sanitizer.CssSanitizer.getOnlyStyleRules_(c);for(var d=[],e=0;e");module$exports$google3$third_party$javascript$safevalues$dom$elements$element.setInnerHtml(goog.asserts.assertObject(d),module$contents$google3$third_party$javascript$safevalues$restricted$reviewed_htmlSafeByReview(a,{justification:"Added into an inert element"}));var e="\nExpected\n"+d.innerHTML+"\nActual\n"+b.innerHTML,f=goog.iter.filter(goog.iter.map(new goog.dom.TagIterator(b), module$contents$security$asserts$assert_endTagMap_),module$contents$security$asserts$assert_nodeFilter_);a=goog.iter.filter(new goog.dom.NodeIterator(d),module$contents$security$asserts$assert_nodeFilter_);var g,h=!1,k=function(){h||(g=goog.iter.nextOrValue(f,null));for(h=!1;g==module$contents$security$asserts$assert_END_TAG_MARKER_||g&&g.nodeType==Node.COMMENT_NODE;)g=goog.iter.nextOrValue(f,null)},l=module$contents$goog$labs$userAgent$browser_isAtMost(module$contents$goog$labs$userAgent$browser_Brand.IE, 8),m=!0,n=0;goog.iter.forEach(a,function(p){if(p.nodeType!=Node.COMMENT_NODE&&(k(),goog.asserts.assert(g,"Finished actual HTML before finishing expected HTML at node number "+n+": "+module$contents$security$asserts$assert_describeNode_(p)+e),p!=d)){module$contents$security$asserts$assert_assertEquals("Should have the same node type, got "+module$contents$security$asserts$assert_describeNode_(g)+" but expected "+module$contents$security$asserts$assert_describeNode_(p)+"."+e,p.nodeType,g.nodeType); if(p.nodeType==goog.dom.NodeType.ELEMENT){p=goog.asserts.assertElement(p);var q=goog.asserts.assertElement(g);module$contents$security$asserts$assert_assertEquals("Tag names should match"+e,p.tagName,q.tagName);module$contents$security$asserts$assert_assertObjectEquals("Should have same styles"+e,goog.style.parseStyleAttribute(p.style.cssText),goog.style.parseStyleAttribute(q.style.cssText));var r=e,t=p,x=q,u=!!c;if(u){var w=t,v=x;w=goog.dom.classlist.get(w);w=module$contents$goog$array_toArray(w); w.sort();var z=module$contents$goog$array_toArray(goog.dom.classlist.get(v));z.sort();module$contents$security$asserts$assert_assertArrayEquals("Expected class was: "+w.join(" ")+", but actual class was: "+v.className+" in node "+module$contents$security$asserts$assert_describeNode_(v),w,z)}v=t.attributes;w=x.attributes;z=0;for(var A=v.length;z"}function module$contents$security$asserts$assert_endTagMap_(a,b,c){return c.isEndTag()?module$contents$security$asserts$assert_END_TAG_MARKER_:a} function module$contents$security$asserts$assert_nodeFilter_(a){return a.nodeType!=goog.dom.NodeType.TEXT||!goog.string.isBreakingWhitespace(a.nodeValue)||a.previousSibling&&a.previousSibling.nodeType==goog.dom.NodeType.TEXT||a.nextSibling&&a.nextSibling.nodeType==goog.dom.NodeType.TEXT?!0:!1} function module$contents$security$asserts$assert_getAttributeValue_(a,b){return goog.userAgent.WEBKIT&&a.tagName==goog.dom.TagName.INPUT&&a.type==goog.dom.InputType.RADIO&&"checked"==b?!1:(goog.userAgent.IE||goog.userAgent.EDGE)&&"src"==b?a.getAttribute(b):void 0!==a[b]&&typeof a.getAttribute(b)!=typeof a[b]?a[b]:a.getAttribute(b)} function module$contents$security$asserts$assert_ignoreAttribute_(a){return"style"==a||"class"==a?!0:goog.userAgent.IE&&module$contents$security$asserts$assert_BAD_IE_ATTRIBUTES_.has(a)}function module$contents$security$asserts$assert_assertEquals(a,b,c){var d=module$contents$security$asserts$assert_nonCommentArg(1,2,arguments),e=module$contents$security$asserts$assert_nonCommentArg(2,2,arguments);goog.asserts.assert(d===e,module$contents$security$asserts$assert_commentArg(2,arguments))} function module$contents$security$asserts$assert_nonCommentArg(a,b,c){return c.length==b+1?c[a]:c[a-1]}function module$contents$security$asserts$assert_commentArg(a,b){return b.length==a+1?b[0]:null}function module$contents$security$asserts$assert_assertTrue(a,b){var c=module$contents$security$asserts$assert_nonCommentArg(1,1,arguments);goog.asserts.assert("boolean"===typeof c);goog.asserts.assert(c,"Call to assertTrue(boolean) with false")} function module$contents$security$asserts$assert_assertArrayEquals(a,b,c){var d=module$contents$security$asserts$assert_nonCommentArg(1,2,arguments),e=module$contents$security$asserts$assert_nonCommentArg(2,2,arguments),f=module$contents$security$asserts$assert_commentArg(2,arguments)?module$contents$security$asserts$assert_commentArg(2,arguments):"",g=module$contents$security$asserts$assert__trueTypeOf(d);goog.asserts.assert("Array"==g,"Expected an array for assertArrayEquals but found a "+g);g= module$contents$security$asserts$assert__trueTypeOf(e);goog.asserts.assert("Array"==g,"Expected an array for assertArrayEquals but found a "+g);module$contents$security$asserts$assert_assertObjectEquals(f,Array.prototype.concat.call(d),Array.prototype.concat.call(e))} function module$contents$security$asserts$assert_assertObjectEquals(a,b,c){var d=module$contents$security$asserts$assert_nonCommentArg(1,2,arguments),e=module$contents$security$asserts$assert_nonCommentArg(2,2,arguments);d=module$contents$security$asserts$assert_findDifferences(d,e);goog.asserts.assert(!d,d+(module$contents$security$asserts$assert_commentArg(2,arguments)?module$contents$security$asserts$assert_commentArg(2,arguments):""))} function module$contents$security$asserts$assert_findDifferences(a,b,c){function d(l,m,n){for(var p=0;p")+1,a.lastIndexOf(""+a+"");goog.asserts.assert(a,"Older browsers that don't support inert parsing should not get to this branch");goog.html.sanitizer.CssSanitizer.inlineStyleRules(a);return a.innerHTML}; goog.html.sanitizer.HtmlSanitizer.prototype.getStyleContainerId_=function(){var a=this.styleContainerId_==goog.html.sanitizer.RANDOM_CONTAINER_,b=!("STYLE"in this.tagBlacklist_)&&"STYLE"in this.tagWhitelist_;return a&&b?"sanitizer-"+goog.string.getRandomString():this.styleContainerId_}; goog.html.sanitizer.HtmlSanitizer.prototype.createTextNode=function(a){var b=a.data;(a=module$contents$goog$html$sanitizer$noclobber_getParentNode(a))&&"style"==module$contents$goog$html$sanitizer$noclobber_getNodeName(a).toLowerCase()&&!("STYLE"in this.tagBlacklist_)&&"STYLE"in this.tagWhitelist_&&(b=module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.unwrap(goog.html.sanitizer.CssSanitizer.sanitizeStyleSheetString(b,this.currentStyleContainerId_,goog.bind(function(c,d){return this.networkRequestUrlPolicy_(c, {cssProperty:d})},this))));return document.createTextNode(b)}; goog.html.sanitizer.HtmlSanitizer.prototype.createElementWithoutAttributes=function(a){var b=module$contents$goog$html$sanitizer$noclobber_getNodeName(a).toUpperCase();if(b in this.tagBlacklist_)return null;a=module$contents$goog$html$sanitizer$noclobber_getElementNamespaceURI(a);if(a!=goog.html.sanitizer.XHTML_NAMESPACE_URI_)return null;if(this.tagWhitelist_[b])return this.inertDocument_.createElement(b);a=this.inertDocument_.createElement("span");this.shouldAddOriginalTagNames_&&module$contents$goog$html$sanitizer$noclobber_setElementAttribute(a, goog.html.sanitizer.HTML_SANITIZER_SANITIZED_ATTR_NAME_,b.toLowerCase());return a}; goog.html.sanitizer.HtmlSanitizer.prototype.processElementAttribute=function(a,b){var c=b.name;if(goog.string.startsWith(c,goog.html.sanitizer.HTML_SANITIZER_BOOKKEEPING_PREFIX_))return null;var d=module$contents$goog$html$sanitizer$noclobber_getNodeName(a);b=b.value;var e={tagName:goog.string.trim(d).toLowerCase(),attributeName:goog.string.trim(c).toLowerCase()};a=goog.html.sanitizer.HtmlSanitizer.getContext_(e.attributeName,a);d=goog.html.sanitizer.HtmlSanitizer.attrIdentifier_(d,c);if(d in this.attributeHandlers_)return c= this.attributeHandlers_[d],c(b,e,a);c=goog.html.sanitizer.HtmlSanitizer.attrIdentifier_(null,c);return c in this.attributeHandlers_?(c=this.attributeHandlers_[c],c(b,e,a)):null};goog.html.sanitizer.HtmlSanitizer.sanitize=function(a){var b=(new goog.html.sanitizer.HtmlSanitizer.Builder).build();return b.sanitize(a)};security.sanitizer={};security.sanitizer.htmlSanitizer={};security.sanitizer.htmlSanitizer.sanitizeHtmlAssertUnchangedWithSanitizer=function(a,b){a=a.sanitize(b);if(goog.DEBUG){var c=goog.dom.createElement(goog.dom.TagName.DIV);module$exports$google3$third_party$javascript$safevalues$dom$elements$element.setInnerHtml(c,a);module$contents$security$asserts$assert_assertHtmlContentsMatch(b,c,!1)}return a}; security.sanitizer.htmlSanitizer.lenientlySanitizeHtmlAssertUnchanged=function(a){var b=(new goog.html.sanitizer.HtmlSanitizer.Builder).allowCssStyles().withCustomNamePolicy(goog.functions.identity).withCustomTokenPolicy(goog.functions.identity).withCustomNetworkRequestUrlPolicy(function(c){return module$contents$google3$third_party$javascript$safevalues$builders$url_builders_sanitizeUrl(c)}).withCustomUrlPolicy(function(c){return module$contents$google3$third_party$javascript$safevalues$builders$url_builders_sanitizeUrl(c)}).build();return security.sanitizer.htmlSanitizer.sanitizeHtmlAssertUnchangedWithSanitizer(b, a)};security.sanitizer.htmlSanitizer.sanitizeHtmlAssertUnchanged=function(a){var b=(new goog.html.sanitizer.HtmlSanitizer.Builder).build();return security.sanitizer.htmlSanitizer.sanitizeHtmlAssertUnchangedWithSanitizer(b,a)};ocean.basic.UnifiedLeftNav={}; function module$contents$ocean$basic$UnifiedLeftNav_addLeftNavListeners(){module$contents$ocean$basic$UnifiedLeftNav_addLeftNavArrowListener("my-library");var a=goog.dom.getElement("my-history-header");a&&goog.events.listen(a,goog.events.EventType.CLICK,function(){var b=goog.dom.getElement("my-history-expanded");module$contents$ocean$basic$UnifiedLeftNav_expandShelf(!goog.style.isElementShown(b),"my-history")});(a=goog.dom.getElement("my-library-more-link"))&&goog.events.listen(a,goog.events.EventType.CLICK, function(){var b=goog.dom.getElement("hidden-my-library-expanded");goog.style.setElementShown(b,!0);b=goog.dom.getElement("my-library-more-link");goog.style.setElementShown(b,!1)});(a=goog.dom.getElement("my-library-less-link"))&&goog.events.listen(a,goog.events.EventType.CLICK,function(){var b=goog.dom.getElement("hidden-my-library-expanded");goog.style.setElementShown(b,!1);b=goog.dom.getElement("my-library-more-link");goog.style.setElementShown(b,!0)})} function module$contents$ocean$basic$UnifiedLeftNav_addLeftNavArrowListener(a){var b=goog.dom.getElement(a.concat("-icon-right"));b&&goog.events.listen(b,goog.events.EventType.CLICK,goog.partial(module$contents$ocean$basic$UnifiedLeftNav_expandShelf,!0,a));(b=goog.dom.getElement(a.concat("-icon-down")))&&goog.events.listen(b,goog.events.EventType.CLICK,goog.partial(module$contents$ocean$basic$UnifiedLeftNav_expandShelf,!1,a))} function module$contents$ocean$basic$UnifiedLeftNav_expandShelf(a,b,c){c&&c.preventDefault();c=goog.dom.getElement(b.concat("-icon-right"));goog.style.setElementShown(c,!a);c=goog.dom.getElement(b.concat("-icon-down"));goog.style.setElementShown(c,a);b=goog.dom.getElement(b.concat("-expanded"));goog.style.setElementShown(b,a)}ocean.basic.UnifiedLeftNav.addLeftNavListeners=module$contents$ocean$basic$UnifiedLeftNav_addLeftNavListeners;ocean.basic.UnifiedLeftNav.expandShelf=module$contents$ocean$basic$UnifiedLeftNav_expandShelf;function module$contents$ocean$mylibrary$Dialog_Dialog(a,b,c,d){goog.ui.Dialog.call(this,module$contents$ocean$Flags_Flags.IsZipitFolderCollectionEnabled?void 0:module$contents$ocean$mylibrary$Dialog_Dialog.P13N_DIALOG,!0);this.setTitle(a);this.setDisposeOnHide(!0);this.setBackgroundElementOpacity(.5);this.callback=c;a=new goog.ui.Dialog.ButtonSet;a.set(goog.ui.Dialog.DefaultButtonKeys.OK,b,!0);(void 0!==d?d:1)&&a.set(goog.ui.Dialog.DefaultButtonKeys.CANCEL,"Cancel",!1,!0);this.setButtonSet(a);goog.events.listen(this, goog.ui.Dialog.EventType.SELECT,this.onSelect,!1,this)}goog.inherits(module$contents$ocean$mylibrary$Dialog_Dialog,goog.ui.Dialog);module$contents$ocean$mylibrary$Dialog_Dialog.P13N_DIALOG="p13nd"; module$contents$ocean$mylibrary$Dialog_Dialog.prototype.createDom=function(){module$contents$ocean$mylibrary$Dialog_Dialog.superClass_.createDom.call(this);goog.style.setStyle(this.buttons_.getButton(goog.ui.Dialog.DefaultButtonKeys.OK),"fontWeight","bold");goog.style.setStyle(this.getElement(),"width","500px")};module$contents$ocean$mylibrary$Dialog_Dialog.prototype.onSelect=function(a){a.key==goog.ui.Dialog.DefaultButtonKeys.OK&&this.selectCallback(a);return!0}; module$contents$ocean$mylibrary$Dialog_Dialog.prototype.disposeInternal=function(){goog.events.unlisten(this,goog.ui.Dialog.EventType.SELECT,this.onSelect,!0,this);module$contents$ocean$mylibrary$Dialog_Dialog.superClass_.disposeInternal.call(this)};module$contents$ocean$mylibrary$Dialog_Dialog.prototype.selectCallback=function(a){this.callback(a)};ocean.mylibrary.Dialog=module$contents$ocean$mylibrary$Dialog_Dialog;goog.events.InputHandler=function(a){goog.events.EventTarget.call(this);this.timer_=null;this.element_=a;a=goog.userAgent.IE||goog.userAgent.EDGE;this.eventHandler_=new goog.events.EventHandler(this);this.eventHandler_.listen(this.element_,a?["keydown","paste","cut","drop","input"]:"input",this)};goog.inherits(goog.events.InputHandler,goog.events.EventTarget);goog.events.InputHandler.EventType={INPUT:"input"}; goog.events.InputHandler.prototype.handleEvent=function(a){if("input"==a.type)goog.userAgent.IE&&0==a.keyCode&&0==a.charCode||(this.cancelTimerIfSet_(),this.dispatchEvent(this.createInputEvent_(a)));else if("keydown"!=a.type||goog.events.KeyCodes.isTextModifyingKeyEvent(a)){var b="keydown"==a.type?this.element_.value:null;goog.userAgent.IE&&a.keyCode==goog.events.KeyCodes.WIN_IME&&(b=null);var c=this.createInputEvent_(a);this.cancelTimerIfSet_();this.timer_=goog.Timer.callOnce(function(){this.timer_= null;this.element_.value!=b&&this.dispatchEvent(c)},0,this)}};goog.events.InputHandler.prototype.cancelTimerIfSet_=function(){null!=this.timer_&&(goog.Timer.clear(this.timer_),this.timer_=null)};goog.events.InputHandler.prototype.createInputEvent_=function(a){a=new goog.events.BrowserEvent(a.event_);a.type=goog.events.InputHandler.EventType.INPUT;return a}; goog.events.InputHandler.prototype.disposeInternal=function(){goog.events.InputHandler.superClass_.disposeInternal.call(this);this.eventHandler_.dispose();this.cancelTimerIfSet_();delete this.element_};goog.ui.CharCounter=function(a,b,c,d){goog.events.EventTarget.call(this);this.elInput_=a;this.elCount_=b;this.maxLength_=c;this.display_=d||goog.ui.CharCounter.Display.REMAINING;a.removeAttribute("maxlength");this.inputHandler_=new goog.events.InputHandler(a);goog.events.listen(this.inputHandler_,goog.events.InputHandler.EventType.INPUT,this.onChange_,!1,this);this.checkLength()};goog.inherits(goog.ui.CharCounter,goog.events.EventTarget);goog.ui.CharCounter.Display={REMAINING:0,INCREMENTAL:1}; goog.ui.CharCounter.prototype.setMaxLength=function(a){this.maxLength_=a;this.checkLength()};goog.ui.CharCounter.prototype.onChange_=function(){this.checkLength()}; goog.ui.CharCounter.prototype.checkLength=function(){var a=this.elInput_.value.length;if(a>this.maxLength_){var b=this.elInput_.scrollTop,c=this.elInput_.scrollLeft;this.elInput_.value=this.elInput_.value.substring(0,this.maxLength_);a=this.maxLength_;this.elInput_.scrollTop=b;this.elInput_.scrollLeft=c}this.elCount_&&(b=this.display_==goog.ui.CharCounter.Display.INCREMENTAL,goog.dom.setTextContent(this.elCount_,String(b?a:this.maxLength_-a)))}; goog.ui.CharCounter.prototype.disposeInternal=function(){goog.ui.CharCounter.superClass_.disposeInternal.call(this);delete this.elInput_;this.inputHandler_.dispose();this.inputHandler_=null};var module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog=function(a,b,c,d,e){module$contents$ocean$mylibrary$Dialog_Dialog.call(this,a,b,null,!0);this.shelves_=c;this.titleCheckMethod_=d;this.actionMenu_=e};$jscomp.inherits(module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog,module$contents$ocean$mylibrary$Dialog_Dialog); module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.createEditDialog=function(a,b){var c=module$contents$ocean$msg_getEditBookshelfDialogTitle(goog.string.unescapeEntities(a.getTitle()));b=new module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog(c,"Save",b);b.render();b.setBookshelf(a);b.setVisible(!0);return b}; module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.prototype.createDom=function(){module$contents$ocean$mylibrary$Dialog_Dialog.prototype.createDom.call(this);this.createDialogContent_();this.bookshelf_&&this.prefillDialog_();if(!module$contents$ocean$Flags_Flags.IsZipitFolderCollectionEnabled){var a=this.buttons_,b=a.getButton(goog.ui.Dialog.DefaultButtonKeys.OK);goog.style.setStyle(b,"fontWeight","bold");goog.dom.classlist.add(b,"gb-button");a=a.getButton(goog.ui.Dialog.DefaultButtonKeys.CANCEL); goog.dom.classlist.add(a,"gb-button")}};module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.prototype.setBookshelf=function(a){this.bookshelf_=a;this.isInDocument()&&this.prefillDialog_()}; module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.prototype.prefillDialog_=function(){this.collectionTitleInput_.value=goog.string.unescapeEntities(this.bookshelf_.getTitle());this.collectionTitleInput_.disabled=this.bookshelf_.predefined_;this.collectionDescriptionInput_.value=goog.string.unescapeEntities(this.bookshelf_.getDescription());this.makeBookshelfPublic_(this.bookshelf_.access_==ocean.info.Bookshelf.Access.PUBLIC);this.collectionTitleInput_.disabled&&goog.style.setStyle(this.collectionTitleInput_, "background","#f2f2f2")}; module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.prototype.createDialogContent_=function(){this.collectionTitleInput_=this.addLabelAndInput_("Name","input",!0);this.collectionDescriptionInput_=this.addLabelAndInput_("Description (optional)","textarea");this.addSharingControls_();this.makeBookshelfPublic_(!0);this.errorDiv_=goog.dom.createDom(goog.dom.TagName.DIV,{"class":"ccd-error"});goog.dom.appendChild(this.getContentElement(),this.errorDiv_); this.disclaimer_=goog.dom.createDom(goog.dom.TagName.P,"ccd-footnote","Please note that the contents and title of Public bookshelves can be viewed and shared by others.");goog.dom.appendChild(this.getContentElement(),this.disclaimer_)}; module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.prototype.addSharingControls_=function(){var a=this.getContentElement(),b=goog.dom.createDom(goog.dom.TagName.DIV,{"class":"ccd-label"}),c=goog.dom.createElement("span");c.textContent=goog.dom.textAssert.assertHtmlFree("Visibility");goog.dom.appendChild(b,c);goog.dom.appendChild(a,b);a=goog.dom.createDom(goog.dom.TagName.SPAN,{className:"ccd-mode-indicator"});c=goog.dom.createDom(goog.dom.TagName.IMG,{src:"/googlebooks/images/sharing_public.gif", style:"vertical-align:-2px;padding:0 2px"});var d=goog.dom.createElement("span");d.textContent=goog.dom.textAssert.assertHtmlFree("Public");goog.dom.appendChild(a,c);goog.dom.appendChild(a,d);goog.dom.appendChild(b,a);c=goog.dom.createDom(goog.dom.TagName.SPAN,{className:"ccd-mode-indicator"});d=goog.dom.createDom(goog.dom.TagName.IMG,{src:"/googlebooks/images/sharing_private.gif",style:"vertical-align:-2px;"});var e=goog.dom.createElement("span");e.textContent=goog.dom.textAssert.assertHtmlFree("Private"); goog.dom.appendChild(c,d);goog.dom.appendChild(c,e);goog.dom.appendChild(b,c);d=goog.dom.createDom(goog.dom.TagName.SPAN,{"class":"ccd-mode-link"});d.textContent=goog.dom.textAssert.assertHtmlFree("Make public");goog.dom.appendChild(b,d);goog.events.listen(d,goog.events.EventType.CLICK,goog.bind(this.makeBookshelfPublic_,this,!0));e=goog.dom.createDom(goog.dom.TagName.SPAN,{"class":"ccd-mode-link"});e.textContent=goog.dom.textAssert.assertHtmlFree("Make private");goog.dom.appendChild(b,e);goog.events.listen(e, goog.events.EventType.CLICK,goog.bind(this.makeBookshelfPublic_,this,!1));this.publicPrivatePair_=[a,e];this.privatePublicPair_=[c,d];null!=this.actionMenu_&&(goog.dom.setProperties(this.actionMenu_,{"class":"ccd-mode-link"}),goog.dom.appendChild(b,this.actionMenu_))}; module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.prototype.addLabelAndInput_=function(a,b){var c=this.getContentElement(),d=goog.dom.createDom(goog.dom.TagName.DIV,{"class":"gb-bookshelf-dialog-container"});goog.dom.appendChild(c,d);c=goog.dom.createDom(goog.dom.TagName.DIV,{"class":"ccd-label"});module$exports$google3$third_party$javascript$safevalues$dom$elements$element.setInnerHtml(c,security.sanitizer.htmlSanitizer.sanitizeHtmlAssertUnchanged(a));goog.dom.appendChild(d, c);a=goog.dom.createDom(b,{"class":"ccd-input"});"input"==b?(goog.dom.setProperties(a,{type:"text"}),a.setAttribute("maxlength",module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.MAX_COLLECTION_TITLE_LENGTH_)):"textarea"==b&&(goog.dom.setProperties(a,{rows:6,cols:50}),new goog.ui.CharCounter(a,goog.dom.createElement("span"),module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.MAX_COLLECTION_DESCRIPTION_LENGTH_));goog.dom.appendChild(d,a);return a}; module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.prototype.makeBookshelfPublic_=function(a){this.isPublic_=a;module$contents$goog$array_forEach(this.publicPrivatePair_,function(b){goog.style.setElementShown(b,a)});module$contents$goog$array_forEach(this.privatePublicPair_,function(b){goog.style.setElementShown(b,!a)})}; module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.prototype.onSelect=function(a){var b=this.collectionTitleInput_.value;if(a.key==goog.ui.Dialog.DefaultButtonKeys.CANCEL)return!0;if(goog.string.isEmptyOrWhitespace(b))return this.errorDiv_.textContent="Please enter a title for this bookshelf.",!1;if(this.titleCheckMethod_&&!this.titleCheckMethod_(b))return this.errorDiv_.textContent="Another bookshelf already has that title. Please enter a different title.",!1;a=this.bookshelf_|| new ocean.info.Bookshelf;a.setTitle(b);a.setDescription(this.collectionDescriptionInput_.value);this.isPublic_?a.setAccess(ocean.info.Bookshelf.Access.PUBLIC):a.setAccess(ocean.info.Bookshelf.Access.PRIVATE);this.bookshelf_?this.shelves_.updateShelf(a):this.shelves_.addShelf(a,!0);return!0}; module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.prototype.disposeInternal=function(){delete this.shelves_;delete this.actionMenu_;delete this.bookshelf_;delete this.errorDiv_;delete this.disclaimer_;delete this.collectionTitleInput_;delete this.collectionDescriptionInput_;delete this.titleCheckMethod_;module$contents$ocean$mylibrary$Dialog_Dialog.prototype.disposeInternal.call(this)}; module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.MAX_COLLECTION_TITLE_LENGTH_=100;module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog.MAX_COLLECTION_DESCRIPTION_LENGTH_=500;ocean.mylibrary.CreateBookshelfDialog=module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog;ocean.frontpage={}; ocean.frontpage.BookshelvesPanel=function(a,b,c,d,e){module$contents$ocean$EventManager_EventManager.call(this);this.visibleShelves_=a;this.moreLink_=b;this.createCollectionBtn_=c;this.hiddenShelvesContainer_=d;this.visibleShelves_&&(this.titles_=module$contents$goog$array_map(this.visibleShelves_.childNodes,ocean.frontpage.BookshelvesPanel.extractTitle_),this.hiddenShelvesContainer_&&module$contents$goog$array_extend(this.titles_,module$contents$goog$array_map(this.hiddenShelvesContainer_.childNodes,ocean.frontpage.BookshelvesPanel.extractTitle_))); this.bookshelves_=e;goog.Timer.callOnce(goog.bind(this.setupListeners_,this))};goog.inherits(ocean.frontpage.BookshelvesPanel,module$contents$ocean$EventManager_EventManager);ocean.frontpage.BookshelvesPanel.EventType={UPDATE:"update"}; ocean.frontpage.BookshelvesPanel.prototype.setupListeners_=function(){this.moreLink_&&this.hiddenShelvesContainer_&&this.getHandler().listen(this.moreLink_,goog.events.EventType.CLICK,this.togglehiddenShelvesContainer_);this.createCollectionBtn_&&this.getHandler().listen(this.createCollectionBtn_,goog.events.EventType.CLICK,this.handleCreateCollection_);this.getHandler().listen(this.bookshelves_,ocean.info.Bookshelves.EventType.ADD,this.addToDisplayedBookshelves_)}; ocean.frontpage.BookshelvesPanel.extractTitle_=function(a){a=goog.asserts.assertElement(a);var b=goog.dom.getElementsByTagNameAndClass(goog.dom.TagName.SPAN,"sidebar-collection-title",a)[0];b||(b=goog.dom.getElementsByTagNameAndClass(goog.dom.TagName.SPAN,"hp-collection-title",a)[0]);if(!b)return"";a=ocean.frontpage.BookshelvesPanel.normalizeTitle_(goog.dom.getTextContent(b));return goog.string.trim(a.split("(")[0])}; ocean.frontpage.BookshelvesPanel.prototype.handleCreateCollection_=function(){var a=new module$contents$ocean$mylibrary$CreateBookshelfDialog_CreateBookshelfDialog("Create new bookshelf","Create bookshelf",this.bookshelves_,goog.bind(this.isNewTitle_,this));a.render();a.setVisible(!0)};ocean.frontpage.BookshelvesPanel.normalizeTitle_=function(a){return goog.string.trim(goog.string.normalizeSpaces(a))}; ocean.frontpage.BookshelvesPanel.prototype.isNewTitle_=function(a){var b=ocean.frontpage.BookshelvesPanel.normalizeTitle_(a).toLowerCase();return!module$contents$goog$array_some(this.titles_,function(c){return c.toLowerCase()==b})}; ocean.frontpage.BookshelvesPanel.prototype.addToDisplayedBookshelves_=function(a){a=a.shelf;var b=ocean.frontpage.BookshelvesPanel.normalizeTitle_(a.getTitle()),c=a.access_==ocean.info.Bookshelf.Access.PUBLIC;this.titles_.push(b);var d=new goog.Uri("/books");module$contents$ocean$util$uri_setDefaultParameters(d);d.setParameterValue("as_coll",a.getId());d.setParameterValue("source","gbs_lp_bookshelf_list");if(module$contents$ocean$Flags_Flags.IsBooksUnifiedLeftNavEnabled){a=goog.dom.createDom(goog.dom.TagName.LI, {"class":"left-nav-shelf-item"});var e=goog.dom.createDom(goog.dom.TagName.A,{"class":"sidebar-link"});module$exports$google3$third_party$javascript$safevalues$dom$elements$anchor.setHref(e,d.toString());d=goog.dom.createDom(goog.dom.TagName.SPAN);goog.dom.classlist.add(d,"sidebar-collection-title");module$exports$google3$third_party$javascript$safevalues$dom$elements$element.setInnerHtml(d,module$exports$google3$third_party$javascript$safevalues$index.sanitizeHtml(b+" (0)"));goog.dom.appendChild(e, d);goog.dom.appendChild(a,e);c=goog.dom.getElement("hidden-my-library-expanded");goog.dom.insertSiblingBefore(a,c);module$contents$ocean$basic$UnifiedLeftNav_expandShelf(!0,"my-library")}else a=goog.dom.createElement(goog.dom.TagName.DIV),e=goog.dom.createDom(goog.dom.TagName.A,{"class":"hp-bookshelf-link",style:"line-height:19px"}),module$exports$google3$third_party$javascript$safevalues$dom$elements$anchor.setHref(e,d.toString()),d=goog.dom.createDom(goog.dom.TagName.SPAN,{"class":"hp-collection-title"}), module$exports$google3$third_party$javascript$safevalues$dom$elements$element.setInnerHtml(d,module$exports$google3$third_party$javascript$safevalues$index.sanitizeHtml(b)),goog.dom.appendChild(e,d),goog.dom.appendChild(a,e),b=c?"Public bookshelf":"Private bookshelf",c=goog.dom.createDom(goog.dom.TagName.IMG,{"class":"hp-bookshelf-access",src:"/googlebooks/images/sharing_"+(c?"public":"private")+".gif",title:b,alt:b,width:14,height:14}),goog.dom.appendChild(a,c),c=goog.dom.createDom(goog.dom.TagName.DIV, {style:"clear:both"}),goog.dom.appendChild(a,c),goog.dom.insertSiblingAfter(a,goog.dom.getElement("csStart"))};ocean.frontpage.BookshelvesPanel.MAX_HIDDEN_HEIGHT_=200; ocean.frontpage.BookshelvesPanel.prototype.togglehiddenShelvesContainer_=function(a){a.preventDefault();a=!goog.style.isElementShown(this.hiddenShelvesContainer_);goog.style.setElementShown(this.hiddenShelvesContainer_,a);a?(goog.positioning.positionAtAnchor(this.moreLink_,goog.positioning.Corner.BOTTOM_START,this.hiddenShelvesContainer_,goog.positioning.Corner.TOP_START),goog.style.getSize(this.hiddenShelvesContainer_).height>ocean.frontpage.BookshelvesPanel.MAX_HIDDEN_HEIGHT_&&(a=goog.style.getSize(this.hiddenShelvesContainer_).width, goog.style.setSize(this.hiddenShelvesContainer_,a,ocean.frontpage.BookshelvesPanel.MAX_HIDDEN_HEIGHT_),goog.style.setStyle(this.hiddenShelvesContainer_,"overflow","auto"),goog.style.setStyle(this.hiddenShelvesContainer_,"overflowX","hidden")),this.documentListenerKey_=goog.events.listen(goog.dom.getDocument(),goog.events.EventType.MOUSEDOWN,goog.bind(this.maybeHideExtendedCollectionList_,this))):goog.events.unlistenByKey(this.documentListenerKey_)}; ocean.frontpage.BookshelvesPanel.prototype.maybeHideExtendedCollectionList_=function(a){goog.dom.contains(this.hiddenShelvesContainer_,a.target)||goog.dom.contains(this.moreLink_,a.target)||this.togglehiddenShelvesContainer_(a)}; ocean.homepage={};ocean.homepage.startup={};ocean.homepage.startup.start=function(){var a=goog.dom.getElement("oc-search-input"),b=goog.dom.getElement("oc-search-form");b&&a&&(module$contents$ocean$common$AutoDirText_AutoDirText.setAutoDirectionality("oc-search-input"),new ocean.basic.AutoComplete(a),a.focus(),module$contents$ocean$util$searchbox_disableOnEmptyQuery("oc-search-form","oc-search-input"))};goog.exportSymbol("_OC_RunHomepage",ocean.homepage.startup.start);