<commit_before>define [
	"models/User"
	"models/ProjectMemberList"
	"account/AccountManager"
	"utils/Modal"
	"moment"
	"libs/backbone"
	"libs/mustache"
], (User, ProjectMemberList, AccountManager, Modal, moment) ->
	INFINITE_COLLABORATORS = -1

	class ProjectMembersManager
		templates:
			userPanel: $("#userPanelTemplate").html()

		constructor: (@ide, options) ->
			options || = {}
			setupArea = _.once =>
				@ide.tabManager.addTab
					id : "collaborators"
					name: "Share"
					content : $(@templates.userPanel)
					lock: true
					onShown: () =>
						@publishProjectView.refreshPublishStatus()

			setupPublish = _.once =>
				@publishProjectView = new PublishProjectView
					ide: @ide
					el: $("#publishProject")
				@publishProjectView.render()

			setupArea()
			if @ide?
				@ide.on "afterJoinProject", (project) =>
					@project = project
					if !@view?
						@members = @project.get("members")<commit_msg>Fix broken sharing page when not the owner of a project<commit_after>define [
	"models/User"
	"models/ProjectMemberList"
	"account/AccountManager"
	"utils/Modal"
	"moment"
	"libs/backbone"
	"libs/mustache"
], (User, ProjectMemberList, AccountManager, Modal, moment) ->
	INFINITE_COLLABORATORS = -1

	class ProjectMembersManager
		templates:
			userPanel: $("#userPanelTemplate").html()

		constructor: (@ide, options) ->
			options || = {}
			setupArea = _.once =>
				@ide.tabManager.addTab
					id : "collaborators"
					name: "Share"
					content : $(@templates.userPanel)
					lock: true
					onShown: () =>
						@publishProjectView?.refreshPublishStatus()

			setupPublish = _.once =>
				@publishProjectView = new PublishProjectView
					ide: @ide
					el: $("#publishProject")
				@publishProjectView.render()

			setupArea()
			if @ide?
				@ide.on "afterJoinProject", (project) =>
					@project = project
					if !@view?
						@members = @project.get("members")
{'fraction_non_alphanumeric': 0.1406003159557662, 'fraction_numerical': 0.00105318588730911, 'mean_word_length': 3.513064133016627, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4556877', 'n_tokens_mistral': 761, 'n_tokens_neox': 606, 'n_words': 127}